Repository navigation
Keep selections on the page, keep search matches in view, and clear the phone footer - #10
Merged
Merged
Conversation
…he phone footer - A selection in paginated text stays on the page showing. foliate turned the page when a drag (or a long press's handles) held past its edge, and Ctrl+A selected the whole chapter; both now stop at the page. Shift+arrow keys extend a selection instead of turning pages. - A search result gone to stays marked after the search closes, until the reader turns the page. Closing the sheet relays the text (one column to two, say), and the outline went with it, so the match was easy to lose; if the new layout lands off the match, it's gone to again. - On phones the footer (time and pages left in the chapter) has the page behind it and fits on one line, instead of printing over the last line of text. - Relocations that foliate reports before a section is laid out, with no fraction, are skipped, so the progress bar and saved progress never get NaN. - Clicking a read-aloud or search mark counts as a tap rather than being swallowed, and taking either mark off brings back a highlight it covered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011d6aBsdw5zNEaRoJx1ciHF
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.
What changes
Selections stay on the page (paginated text)
selectionchangelistener inBookViewnow runs before foliate's, stops it, and trims the selection to the text on the page or spread showing (trimToPagein the newsrc/reader/pageSelection.ts).Search results stay findable after the sheet closes
BookViewHandle.showMatch). The mark survives the sheet closing and goes away when the reader turns the page, navigates elsewhere or searches again.Phone footer
Smaller fixes
Testing
bun run checkpasses: types, lint, formatting and tests, including six new tests fortrimToPage.Generated by Claude Code