Conversation
Adds a button to select the introduction chapter for a book in the bible chapter picker. This allows users to easily navigate to the book's introduction.
Conditionally renders the book and chapter header in the bible reader component. This ensures the header is only displayed when the chapter is a valid numerical value.
Adjust the `grid-cols` class in the Bible reader toolbar to dynamically render either `auto_1fr_auto` or `1fr_auto` based on the `authEnabled` state from the `yvContext`.
This class handles intended list items, ensuring correct styling for elements like the Acts Intro in certain Bible versions.
Corrected "Intended" to "Indented" in a CSS comment for clarity.
|
This commit adds and updates several CSS classes within the bible reader styling to ensure accurate rendering of scripture content. Key changes include: - Applying `display: block` to the root element for better layout control. - Inheriting typography from the root for improved cascade and em-based sizing. - Adding detailed styling for various scripture formatting tags such as titles, headings, paragraphs, poetry, quotes, and special text styles. - Updating comments to better reflect the purpose of each CSS class.
This commit introduces CSS rules for the `.yv-vlbl` class, ensuring that verse labels are displayed with the correct sans-serif font. This enhances the visual consistency and readability of biblical content within the UI.
This commit introduces CSS styling for additional USFM tags within the Bible reader component. These additions include: - Hiding metadata and navigation tags like `\usfm`, `\h`, `\toca1`, `\toca2`, `\toca3`. - Correcting the display of scripture quotations in introductions (`\iqt`). - Adjusting the styling for inline elements like footnotes (`\fl`). - Improving the handling of proper names (`\pn`). - Updating styling for footnotes and endnotes (`\f`, `\fe`). - Adding styling for secondary language text (`\sls`). - Refining styles for major section headings (`\ms2`). - Ensuring proper alignment for table cells (`\tcr`, `\tcr1`). - Adding styling for indented list items (`\ph3`, `\lim3`).
spacing on the wrong side. Every other property in the file was converted to logical properties, but this one slipped through.
- Replace parseInt with regex for chapterIsNumerical check - Make chapterUnavailable validate against chapters array and intro ID - Remove redundant || false in toolbar grid conditional - Add JSDoc on chapter render prop clarifying it's a display label - Add IntroChapter Storybook story with play function - Add JHN intro mock data and MSW handler using real API response
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Wait for the "Intro" label to appear in the bible reader toolbar in the story. This ensures that the test correctly accounts for asynchronous data loading before asserting the label's presence.
Greptile SummaryThis PR adds support for rendering Bible introduction chapters (e.g.,
Confidence Score: 4/5
Important Files Changed
Flowchartflowchart TD
A["User selects chapter\n(chapter picker)"] --> B{Is chapter intro?}
B -->|Yes| C["Set chapter = intro.passage_id\n(e.g. 'INTRO')"]
B -->|No| D["Set chapter = chapterId\n(e.g. '1')"]
C --> E["BibleReader.Content renders"]
D --> E
E --> F{chapterIsNumerical?}
F -->|Yes| G["Show h1 header\n(book title + chapter number)"]
F -->|No| H["Hide h1 header"]
G --> I{chapterUnavailable?}
H --> I
I -->|Yes| J["Show unavailable message"]
I -->|No| K["Render BibleTextView\n(USFM content)"]
E --> L["Toolbar.Trigger"]
L --> M["Resolve display label\n(chapter title or 'Intro')"]
M --> N["Show: 'John Intro'"]
Last reviewed commit: 9dc55a9 |
Refine the bible reader story for intro chapters to accurately reflect real-world content. This includes using the TPT version for Joshua's intro, which contains structured sections, and updating assertions to verify specific formatting and content elements.
- Add top margin to .is/.s/.heading section headings for spacing - Add IntroChapter story for JHN.INTRO rendering - Fix JoshuaIntroChapter story to wait for content before assertions
This commit refactors the `BibleChapterPicker` component to correctly display the chapter label in the toolbar trigger. Previously, it was using the raw chapter ID, which could lead to incorrect display for introductory chapters. The `TriggerProps` type has been updated to include `chapterLabel` and the component logic now correctly derives and uses this label for rendering. Unit tests have also been updated to reflect this change and ensure accurate display.
Organize the CSS rules for the bible reader component into logical sections. This improves readability and maintainability. New sections include major titles, section headings, introduction outlines, paragraphs, character styles, and notes. Additionally, styles for specific USFM tags have been refined for better accuracy and consistency.
Adjust CSS for bible reader component to use shorthand margin properties and more consistent text indentation for blockquotes.
Update text-indent for list items within the bible reader styles to improve readability and visual consistency.
Jira Issue: https://lifechurch.atlassian.net/browse/YPE-1332
Context: https://www.notion.so/yvproduct/Bible-Versions-with-an-INTRO-chapter-309f1f2d1b92809aa3b9f08412a23b0c?source=copy_link
Warning
Before proceeding watch the overview video ~10min
👉 WATCH OVERVIEW VIDEO (~10min) 👈