fix(reader): reveal chapter selection when tapping a book in the reader - #167
Closed
anthonyraj wants to merge 3 commits into
Closed
fix(reader): reveal chapter selection when tapping a book in the reader#167anthonyraj wants to merge 3 commits into
anthonyraj wants to merge 3 commits into
Conversation
Contributor
✅ Commit Lint: passedAll commit messages in this PR conform to Conventional Commits. 📦 Release preview:
|
Pull the duplicated listRowInsets/background/separator modifiers on the book row and the expanded chapter list into a single bookPickerRow(background:verticalInset:) helper.
Contributor
Code Coverage ReportCoverage after merging air/fix-book-chapter-picker-expand-BL-1909 into feat/bible-loop will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
anthonyraj
marked this pull request as draft
July 1, 2026 04:23
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.
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-06-29.at.16.39.26.mov
Description
Type of Change
feat:New feature (non-breaking change which adds functionality)fix:Bug fix (non-breaking change which fixes an issue)docs:Documentation updaterefactor:Code refactoring (no functional changes)perf:Performance improvementtest:Test additions or updatesbuild:Build system or dependency changesci:CI configuration changeschore:Other changes (maintenance, etc.)Breaking Changes
Breaking Change Details:
Migration Guide:
Checklist
Conventional Commits
✅ All commits in this PR follow conventional commit format:
Example commit messages:
feat(api): add Bible verse lookup methodfix(auth): resolve token refresh race conditiondocs: update installation instructionsFor breaking changes:
feat(api)!: redesign Bible content APISee CONTRIBUTING.md for detailed guidelines.
Related Issues
Closes #
Relates to #
Additional Context
Reviewer Notes
Greptile Summary
This PR fixes the book/chapter picker so it scrolls to and expands the currently-reading book when opened from the reader. The picker's list structure is refactored from
Section-based rows to plain sibling rows, aScrollViewReaderis introduced for programmatic scroll positioning, and shared row styling is extracted into a cleanbookPickerRowView extension (with the required tvOS compile guard).Confidence Score: 5/5
Safe to merge — the change is a focused, well-structured fix with no regressions in error handling, state management, or platform guards.
Both files make straightforward, targeted changes. headerExpandedBookCode is set only on open (not close), cleared on dismiss, and the ScrollViewReader+onAppear scroll pattern follows the standard SwiftUI idiom. The tvOS guard on listRowSeparator is correctly placed in the shared bookPickerRow modifier, addressing the platform-availability concern.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[User taps book/chapter pill] --> B{showingBookPicker?} B -- false / opening --> C[Set headerExpandedBookCode = reference.bookUSFM] C --> D[Toggle showingBookPicker = true] B -- true / closing --> D2[Toggle showingBookPicker = false] D --> E[Sheet presents BibleReaderBookAndChapterPickerView] E --> F[ScrollViewReader wraps List] F --> G[List.onAppear] G --> H{expandedBookCode set?} H -- yes --> I[proxy.scrollTo expandedBookCode, anchor: .top] H -- no --> J[List shown at top] D2 --> K[onDismiss: headerExpandedBookCode = nil]%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD A[User taps book/chapter pill] --> B{showingBookPicker?} B -- false / opening --> C[Set headerExpandedBookCode = reference.bookUSFM] C --> D[Toggle showingBookPicker = true] B -- true / closing --> D2[Toggle showingBookPicker = false] D --> E[Sheet presents BibleReaderBookAndChapterPickerView] E --> F[ScrollViewReader wraps List] F --> G[List.onAppear] G --> H{expandedBookCode set?} H -- yes --> I[proxy.scrollTo expandedBookCode, anchor: .top] H -- no --> J[List shown at top] D2 --> K[onDismiss: headerExpandedBookCode = nil]Reviews (3): Last reviewed commit: "fix(reader): guard listRowSeparator for ..." | Re-trigger Greptile