Repository navigation
Reader toolbar fits phones: history and Review move into a More menu, Go to becomes an icon - #22
Merged
Conversation
… Go to becomes an icon Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
- Replace wrapper onBlur with document focusin so Safari's null-target blur on button mousedown and taps on disabled items don't swallow or close the menu, while shortcuts moving focus elsewhere still dismiss it - Close More and move focus off its hidden subtree when widening past 600px so Esc and focus-mode toolbar auto-hide aren't stuck - Tighten the <=600px toolbar grid tracks and gap so 4-digit unlabelled page counts fit at 320px without overlapping Go to, and cap/truncate long printed labels inside More Co-authored-by: Copilot App <[email protected]> Copilot-Session: b1393a3b-8b09-49e5-aa20-78201068a159
Kevin-Taha
marked this pull request as ready for review
November 14, 2026 20:41
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.
On phones the reader toolbar doesn't fit. At 390px the Go to button squeezes to 34px and its
Ghint covers the page field. At 320px the toolbar is 356px wide and gets clipped. This PR covers the "toolbar that fits" part of the narrow-layouts work. The note rail, responsive margin and overlay sidebar were already in place.All changes apply only at
max-width: 600px, the phone breakpoint the library and settings screens already use. Screenshots at 1440, 1280, 1180, 820 and 601px are byte-identical tomain. At 820px the toolbar already fit: the 868px overflow reported in the issue comes from hidden tooltip::afterelements, not from the toolbar.Changes
ToolbarMore.tsx(new): a More menu holding Back, Forward and Review notes, each 44px tall.aria-keyshortcuts.Esc handling: Esc is caught by a capture-phase
keydownlistener ondocumentthat callsstopPropagation, the same approach asAppearanceMenu. Safari doesn't focus a tapped button, so a handler on the menu's wrapper never receives the key. Esc would then reach the app-widedismissshortcut, which hides the Return pill or exits focus mode, and the menu would stay open.ReaderView.tsx:HistoryButtonsis wrapped in.reader__history(display: contents, so desktop layout is unchanged) so CSS can hide it. Adds anopenReviewcallback that the toolbar Review button and the More menu both use.reader.css: below 600px:Ghint, and the(N of M)total next to printed page labels.Hiding the page-label total is needed: books with printed labels still overflowed at 320px without it.
Tests and docs
e2e/narrow.spec.ts: a newexpectToolbarFitshelper checks that every visible toolbar control is inside the window and doesn't overlap its neighbour. Two phone tests:DESIGN.md§5.2 describes the phone toolbar.ROADMAP.mdnow lists only pinch-to-zoom and touch selection as remaining.Not included
env(safe-area-inset-*): it needsviewport-fit=coverplus padding on every screen, not just the reader.phone/tabletPlaywright projects: the narrow specs set their own viewports and run in the existing project.