Open the dictionary as a sheet where a panel would crush the poem #3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/dictionary-panel-crushes-narrow-page"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The bug
On a book-style foldable held open in portrait — 700dp wide, inside the design's 600–839dp band — tapping a word made the poem unreadable.
The dictionary panel is a fixed 360dp and the columns keep their widths, so the page was left about 75dp. The verse broke to one or two characters a line:
The breadcrumbs and the metre line shattered the same way.
Why
The panel was chosen from the width of the window (
wide, ≥600dp). That is the wrong question — what matters is what is left of the page once the columns have taken their room.The fix
Both side panels now ask that instead:
Where they do not fit, the bottom sheet is used, exactly as on a phone: it covers the foot of the poem but leaves every line whole.
The two panels also now share one width constant (
SidePanelWidth) instead of repeating360.dp.Verified on device
63 unit tests pass; debug APK builds.
Design docs
design/components/ColumnBrowser/README.mdrecords the rule for both panels, so the spec and the code say the same thing.Conflicts resolved — and the scope has shrunk
mainmoved on while this sat open (it was 7 ahead / 1 behind, conflicting in 4 files). Mergedmainin; mergeable again. Most of what this branch originally carried has since been answered better on main, so it was dropped rather than forced through:aab8b2efolds the columns away for the settings panel, which is a better answer than falling back to a sheet. Dropped.SidePanelWidthis gone. The two panels no longer want the same width — the dictionary is now 216dp against the settings' 360dp. Dropped.Conflicting files were taken from
mainas they stand.What survives
The reason the branch exists. Which container the dictionary uses is still decided by the width of the window, and that is the wrong question — what matters is what's left of the page once the columns have taken theirs.
Recalculated for the narrower 216dp panel:
So the guard is still needed even at 216dp — 236dp is a cramped phone column, not a measure for a hemistich.
The diff is now 3 files, +22/−2
Builds clean, 63 tests pass.
Note on the other two PRs
#4 and #5 are already in
main(merged directly at your request — both now show 0 commits ahead of main). They can be closed as merged; there is nothing left to pull from them.Still unverified
The 700dp behaviour was confirmed on device before the dictionary narrowed to 216dp. The arithmetic above says the sheet still wins there, but I have not re-run it since that change.
Pull request closed