Skip to content

Keep the Riverbank layout in narrow desktop windows - #10

Merged
sanjaydotpro merged 2 commits into
mainfrom
riverbank/3b-narrow-window
Nov 17, 2026
Merged

sanjaydotpro merged 2 commits into
mainfrom
riverbank/3b-narrow-window

Conversation

@sanjaydotpro

Copy link
Copy Markdown
Contributor

Narrow macOS and Windows windows keep the Riverbank layout instead of falling back to the phone's (HIS-16). This is stacked on #9, which is stacked on #8 and #7. The editor page (HIS-10) stacks on this branch.

The default window is 600×720 and the two-pane breakpoint is 720, so until now a fresh desktop launch opened in the phone layout. A desktop window now never builds the compact layout. Phones and tablets still use it below 720, and their goldens don't move.

Before, 600pt wide After, list hidden After, list open
Before: the phone layout in a 600pt desktop window After: the rail and the page After: the list open over the page

These are the goldens: widget-test renders at 600pt wide, not captures of a running build. The bright line in the first two is the results divider under the pointer, which is what those two goldens test.

The list over the page

Below 720, the window keeps the rail and the page, and the page keeps its 12pt margin from the rail, as in Paper's window with the list hidden. Showing the list opens it over the page, flush against the rail, with the page dimmed behind it by the palette's scrim. It closes when a note is chosen, opened to the side or created, on Escape, on a click on the page, and from its own hide button. The page keeps its place and width underneath, so nothing reflows.

Resizing moves between the two. A list open over the page stands beside it once the window has room, and a list beside the page folds away when the window narrows and comes back when it widens.

SplitView takes an overlay flag for this. Over the page, it draws the list above a ModalBarrier (sidebar-overlay-barrier) and leaves at least 48pt of the page in view to click. Beside the page, the page still keeps at least 320pt. The list now slides open and shut only beside the page: when the room for it comes or goes, it appears or disappears at once. That fixes the page's wordmark overflowing for a few frames when a window jumped from wide to narrow.

One way to show and hide the list

_setListShown(bool) in home_page.dart decides between beside and over, and _toggleList() and _dismissListOverlay() go through it. Every control uses it: the shortcut, the toolbar's show-list button, the list header's hide button, the divider, a trackpad swipe, the empty state's Show notes, and Find notes. Beside the page it still sets LayoutPrefs.sidebarVisible. Over the page it is session state, so opening the list in a narrow window doesn't change what a wide one shows. The Notes list setting ("Show the notes list beside your editor") keeps its meaning, and settings_dialog.dart is untouched to stay clear of #8.

For HIS-10: the editor page's show-list button should call _toggleList. NoteToolbar.atWindowLeftEdge is gone, so the new toolbar doesn't need to keep it.

Minimum window size

The minimum grows from 520×360 to 520×520, so the rail fits with every space, the streak, Settings and the account on it. A new test renders that rail at the minimum height on macOS, and on Windows less the 40pt its caption and frame take, and checks that nothing overflows. MainFlutterWindow.swift and the Windows runner are untouched.

Removed

With no narrow desktop layout left, these go:

  • NoteToolbar.atWindowLeftEdge and its traffic-light inset, with WindowChrome.leadingInset and topInset. Only a narrow macOS window put the toolbar under the traffic lights. The rail now always takes them.
  • The compact drawer's desktop paths: its edge drag, _toggleCompactSidebarFromTrackpad, and the compact list's desktop-only Hidden Notes row and shortcut hint (showHiddenFolder, hiddenShortcut, _FolderShortcutHint). The phone drawer opens as before, through MobilePageSwipe.
  • The compact editor's desktop results divider.

Testing

  • Flutter 3.47.4 from ~/dev/flutter with flutter pub get --enforce-lockfile, because the 3.47.2 install on the build Mac is damaged.
  • flutter analyze: no issues.
  • flutter test: 2116 passed, 8 skipped, on top of Build the notes list beside the rail as Riverbank's cards #9's head (2d7b716).
  • app_test.dart has a new narrow window group. It checks that the default window keeps the rail and the page. It also checks that the list opens over the page and closes on a click, on Escape, from its hide button, on a chosen note (which opens ready to type) and on a new note, without touching the wide window's setting. Another test resizes a window across 720 and back with the list open. The tests that drove the compact drawer in a narrow desktop window (the notes shortcut, Find notes, the search row, the results divider) now drive the list over the page.
  • spaces_rail_test.dart: the rail fits the smallest macOS and Windows windows with every space.
  • welcome_note_test.dart's phone test now runs as iOS, and toolbar_test.dart drops the traffic-light test.
  • Goldens regenerated on macOS:
    • desktop_dark_narrow_results_divider_hover.png replaces desktop_dark_compact_results_divider_hover.png.
    • desktop_dark_narrow_list.png is new: the list open over the page.
    • toolbar_shared_note_dark.png and toolbar_shared_note_light.png: the menu and avatars start 9pt from the bar's edge instead of after the traffic lights.
    • Every other golden is unchanged, the phone ones included.

Not verified: I didn't launch the app or resize a real window, because this thread has no screen capture on the build Mac. CI builds the desktop apps.

Open in Capy

A desktop window no longer falls back to the phone's compact layout.
Below the width that holds the notes list beside the page, it keeps the
rail and the page, and the list opens over the page instead: flush
against the rail, with the page dimmed behind it, until a note is chosen
or created, Escape is pressed, or the page is clicked.

One method, _setListShown, decides between beside and over, and every
control goes through it: the shortcut, the toolbar's button, the list's
hide button and divider, a trackpad swipe, an empty pane and Find notes.
A list open over the page moves beside it once the window widens.

The window's minimum grows to 520x520, tall enough for the rail with
every space, the streak and the account on it.

What only a narrow desktop window used goes with it: the toolbar's
traffic-light inset, the drawer's edge drag, its Hidden Notes row and
shortcut hint, and the compact editor's desktop results divider. Tests
of the phone's layout now run as a phone.
The narrow window's goldens now show the rail and the page, with the
list hidden and with it open over the page, where the compact golden
showed the phone's layout. The shared-note toolbar goldens lose the
traffic-light inset.
@sanjaydotpro
sanjaydotpro changed the base branch from riverbank/notes-list to main November 17, 2026 03:50
@sanjaydotpro
sanjaydotpro merged commit 2ad9a16 into main Nov 17, 2026
4 checks passed
@sanjaydotpro
sanjaydotpro deleted the riverbank/3b-narrow-window branch November 17, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant