One side panel at a time, and a narrower one for the dictionary #5

Closed
anas wants to merge 0 commits from fix/one-side-panel-at-a-time into main
Owner

Two fixes to the left-hand side of the reader, both reported from use.

1. Both panels could be open at once

Tapping a word opened the dictionary; opening the reading settings then put a second panel beside it — or, where there was no longer room for two, left the dictionary as a sheet in the middle of the page while the settings sat on the left. Either way the reader is asked to look in two places for one answer.

The settings now replace the dictionary rather than stacking with it:

val sidePanelOpen = LocalSidePanelOpen.current
LaunchedEffect(sidePanelOpen) { if (sidePanelOpen) tapped = null }

Closing the settings leaves the poem, which is where the reader was.

This reuses LocalSidePanelOpen from aab8b2e rather than introducing a second notion of "a panel is open".

2. The dictionary was as wide as the settings

Both were 360dp. They do not deserve the same room: the settings fold the columns away and take what that frees, while the dictionary is read against the line it came from — so the verse should keep the width.

The dictionary panel is now 216dp, a little over half. A definition is short; a hemistich is not. The settings keep 360dp, which costs the poem nothing.

Note

This supersedes the settings half of PR #3. That PR made the settings fall back to a bottom sheet when the browser could not keep 600dp beside the panel; folding the columns away is the better answer and already landed on main. PR #3's dictionary half is still needed and I'll rebase it on top of this.

Builds clean, 63 tests pass.

Two fixes to the left-hand side of the reader, both reported from use. ## 1. Both panels could be open at once Tapping a word opened the dictionary; opening the reading settings then put a **second** panel beside it — or, where there was no longer room for two, left the dictionary as a sheet in the middle of the page while the settings sat on the left. Either way the reader is asked to look in two places for one answer. The settings now **replace** the dictionary rather than stacking with it: ```kotlin val sidePanelOpen = LocalSidePanelOpen.current LaunchedEffect(sidePanelOpen) { if (sidePanelOpen) tapped = null } ``` Closing the settings leaves the poem, which is where the reader was. This reuses `LocalSidePanelOpen` from `aab8b2e` rather than introducing a second notion of "a panel is open". ## 2. The dictionary was as wide as the settings Both were 360dp. They do not deserve the same room: the settings **fold the columns away** and take what that frees, while the dictionary is read *against* the line it came from — so the verse should keep the width. The dictionary panel is now **216dp**, a little over half. A definition is short; a hemistich is not. The settings keep 360dp, which costs the poem nothing. ## Note This supersedes the settings half of **PR #3**. That PR made the settings fall back to a bottom sheet when the browser could not keep 600dp beside the panel; folding the columns away is the better answer and already landed on main. PR #3's dictionary half is still needed and I'll rebase it on top of this. Builds clean, 63 tests pass.
anas added 1 commit 2026-10-07 16:26:03 +00:00
Two fixes to the left of the reader.

The dictionary and the reading settings both want that side of the screen, and
opening the second put two panels there at once — or, where there was no longer
room for two, left the dictionary as a sheet in the middle of the page while the
settings sat beside it. Either way the reader is asked to look in two places.
The settings now replace the dictionary; closing them leaves the poem, which is
where the reader was.

The dictionary also no longer takes the settings' full 360dp. It is read against
the line it came from, so the verse should keep the width: 216dp, a little over
half. The settings keep 360dp, which costs nothing — they fold the columns away
and take the room that frees.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
anas closed this pull request 2026-10-07 16:53:24 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: anas/ganjoorandroid#5
No description provided.