YPE-2573 - Center Bible card content#243
Open
cameronapak wants to merge 5 commits into
Open
Conversation
Remove the outer BibleCard max width while keeping the rendered card content centered at a readable line length. This lets host layouts size the card while preserving balanced whitespace inside wide containers.
Center the VerseOfTheDay content within a full-width card and update Storybook framing for realistic width behavior. Keep card shells border-box so full-width cards fit narrow containers without adding minimum widths.
🦋 Changeset detectedLatest commit: a382db7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Add a minor changeset for the card layout update so the UI package version captures the new full-width centered card behavior.
Keep BibleTextView readable by default while moving card layout constraints into Tailwind classes. Remove tests that only checked inline style state instead of real layout behavior.
Resolve conflicts in bible-card.tsx and verse-of-the-day.tsx by keeping the card-content wrapper layout from this branch while preserving main's onFootnotePress support and i18n aria-label/share strings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ticket
https://lifechurch.atlassian.net/browse/YPE-2573
Test plan
Greptile Summary
This PR removes the fixed
max-w-mdconstraint fromBibleCardandVerseOfTheDay, allowing both components to fill their container at full width while keeping content readable by centering it at a600pxmax-width via a newcard-contentTailwind utility. The[data-slot='yv-bible-renderer']CSS now accepts a--yv-reader-max-widthcustom property (defaulting to65ch) so standaloneBibleTextViewconsumers retain their readability constraint.global.css: Adds@utility card-content(width: 100%; max-width: 600px; margin-inline: auto) and both components wrap their inner content in adivwith this class.bible-reader.css: Converts the hard-codedmax-width: 65chtovar(--yv-reader-max-width, 65ch), preserving the default while enabling per-context overrides.fullscreenlayout; newWideContainerintegration stories withplayfunctions verify centering and width constraints in a 900 px container.Confidence Score: 5/5
Safe to merge — changes are purely additive layout adjustments with no logic mutations.
The change replaces a fixed max-w-md cap with a centered 600px content wrapper, adds box-border to the outer section, and converts one hard-coded CSS max-width to a CSS custom property that defaults to the same value. All three layers — CSS utility, component JSX, and tests — are consistent with each other. The --yv-reader-max-width fallback preserves existing behaviour for standalone BibleTextView consumers. Integration stories exercise real browser geometry through play functions. No data-fetching paths, auth logic, or public API shapes are touched.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD subgraph Before S1["section\n(max-w-md, p-6)"] S1 --> H1["Header div"] S1 --> A1["AnimatedHeight\n(BibleTextView)"] S1 --> F1["Footer / Attribution"] end subgraph After S2["section\n(w-full, box-border, p-6)"] S2 --> CC["div.card-content\n(max-w: 600px, mx: auto)"] CC --> H2["Header div"] CC --> A2["AnimatedHeight\n(BibleTextView — max-w: 65ch)"] CC --> F2["Footer / Attribution"] end style CC fill:#e0f2fe,stroke:#0284c7Reviews (3): Last reviewed commit: "Merge origin/main into codex/ype-2573-ca..." | Re-trigger Greptile