From afe310d66c6eae82cec88f656b27c3af2c7a9513 Mon Sep 17 00:00:00 2001 From: Luan Nguyen Date: Thu, 12 Nov 2026 03:01:24 +1100 Subject: [PATCH 1/2] fix(notes): match compact library toolbar controls --- docs/architecture.md | 17 + web/src/styles/library.css | 87 +++++ web/src/ui/Workspace.tsx | 55 ++- .../integration/library-toolbar-browser.mjs | 332 ++++++++++++++++++ 4 files changed, 461 insertions(+), 30 deletions(-) create mode 100644 web/tests/integration/library-toolbar-browser.mjs diff --git a/docs/architecture.md b/docs/architecture.md index 45d84fd..4b3b9b1 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -315,3 +315,20 @@ Search 240/170ms surface motion, review/Done, errors, Settings sections and the absent native caption title remain separate contracts. The source is design revision f610ced1da443b04699137333c1309925092fffa, Motion `sidenav`, Notes `layout-desktop` and `lock`. + + +## Notes library toolbar geometry + +The Notes list/grid/filter/Trash header uses a dedicated scoped toolbar. View +choices form a 28px segmented group with 24px buttons; the real sort select is a +single 28px control; Import Markdown/New note and Empty Trash use 30px controls. +The sort select retains its accessible name and existing CAS/disable behavior. +Explicit centered cross-axis alignment prevents a stacked form label from +stretching every action to the tallest control. Header title/count are inline; +the current h1 node and heading-motion ref are retained. Narrow/long-title layouts +wrap the actual actions without a fixed total header height. Import Markdown is +an existing beta action retained alongside the source main-toolbar controls. +All CSS is scoped to Notes library classes; other action groups, dialogs and the +native caption/editor toolbar retain their own geometry. Design reference: +f610ced1da443b04699137333c1309925092fffa, Notes `library-list`, `library-grid` +and `empty-library` (blob 706a8d07e5ccfb77850f4a490ab38e0c90a31a04). diff --git a/web/src/styles/library.css b/web/src/styles/library.css index d883823..4f70339 100644 --- a/web/src/styles/library.css +++ b/web/src/styles/library.css @@ -148,3 +148,90 @@ flex: 1; min-width: 180px; } + +/* Notes706a8d07 #library-list / #library-grid: scoped full-library header. */ +.page-heading.notes-library-heading { + align-items: baseline; + justify-content: flex-start; + gap: 12px; + padding: 22px 28px 6px; + flex-wrap: wrap; + line-height: 1.45; +} +.notes-library-heading > div:first-child { display: contents; } +.notes-library-heading h1 { + margin: 0; + min-width: 0; + max-width: 100%; + overflow-wrap: anywhere; + font-size: 22px; + font-weight: 500; + letter-spacing: -.015em; +} +.notes-library-heading .notes-library-count { + display: inline-flex; + align-items: center; + gap: 8px; + flex-shrink: 0; + color: var(--t3); + font-size: 13px; + white-space: nowrap; +} +.notes-library-heading .notes-library-toolbar { + display: flex; + align-items: center; + align-self: center; + gap: 6px; + margin-left: auto; + max-width: 100%; + flex-wrap: wrap; +} +.notes-library-toolbar > button { + height: 30px; + min-height: 30px; + padding: 0 12px; + border-radius: 9px; + font-size: 12.5px; + white-space: nowrap; +} +.notes-library-toolbar > button:not(.primary):not(.danger) { color: var(--t2); } +.notes-library-toolbar > button.primary { padding: 0 13px; font-weight: 500; } +.notes-library-toolbar .library-sort { display: inline-flex; flex: none; } +.notes-library-toolbar .library-sort select { + width: auto; + max-width: 100%; + height: 28px; + min-height: 28px; + padding: 0 10px; + border: 0; + border-radius: 8px; + background: var(--raise); + color: var(--t1); + font-size: 12.5px; +} +.notes-library-toolbar .notes-library-view { + display: inline-flex; + flex: none; + gap: 2px; + padding: 2px; + border-radius: 9px; + background: var(--raise); +} +.notes-library-view > button { + height: 24px; + min-height: 24px; + padding: 0 10px; + border-radius: 7px; + background: transparent; + color: var(--t3); + font-size: 12px; + white-space: nowrap; +} +.notes-library-view > button[aria-pressed="true"] { + background: var(--main); + color: var(--t1); + box-shadow: 0 0 0 1px var(--line); +} +@media (max-width: 899px) { + .page-heading.notes-library-heading { padding: 22px 20px 6px; } +} diff --git a/web/src/ui/Workspace.tsx b/web/src/ui/Workspace.tsx index 0f0860e..46360fd 100644 --- a/web/src/ui/Workspace.tsx +++ b/web/src/ui/Workspace.tsx @@ -15,8 +15,6 @@ import { Settings, Plus, Menu, - Grid2X2, - List, Pin, Paperclip, Tags, @@ -2437,7 +2435,7 @@ export function Workspace({ {(module === "notes" || editing) && !editing && ( <> -
+

{linkedOnly @@ -2452,22 +2450,33 @@ export function Workspace({ ? "Search results" : "All notes"}

- + {linkedOnly && linkedQuery?.status !== "ready" ? "Checking links" - : `${visible.length} ${visible.length === 1 ? "note" : "notes"}`}{" "} - · - {sort === "created" - ? "Created" - : sort === "title" - ? "Title" - : "Edited"} + : `${visible.length} ${visible.length === 1 ? "note" : "notes"}`}
-
+
+ {!trash && ( +
+ + +
+ )} {library && snapshot && ( -