Skip to content

feat(nsgo): put the note's actions in the toolbar and the dialogs on the kit's parts - #281

Merged
bketelsen merged 2 commits into
mainfrom
feat/nsgo-toolbar-and-dialogs
Nov 25, 2026
Merged

bketelsen merged 2 commits into
mainfrom
feat/nsgo-toolbar-and-dialogs

Conversation

@bketelsen

@bketelsen bketelsen commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The NSGo client keeps to the kit's standard for an app (frostui's docs/specs/workspaceui.md, rules 3 to 7; frostyard/frostmail's plan 0016, Phase 5). It follows #280, the notes tree.

  • The toolbar (cmd/frostnotes-nsgo/shell.go). The row over the editor is gone. The window's toolbar holds the vault's name over the open note's path and state, New note as the window's one filled button, the editor's 2 modes as a segmented control, the note's actions (Save, Rename or move note, Move to trash) and the vault's (Quick open, Search vault) as icon buttons, and a More menu with Restore deleted note and Refresh vaults and notes. The note's actions are dim with no note open. Where the pane under the toolbar is under 660 wide, or the window under 720, New note is an icon button and one menu holds every other action.
  • The editor's pane. What notesd says about the open note (overlapping edits, a refused save, a deletion, a failed load) is the kit's Banner over its text, in the tone of what happened. A note still loading is a skeleton, and a pane with no note the kit's EmptyState. The app's own failures stay the kit's Notice over the window, now in the danger tone.
  • Dialogs (dialogs.go). A form is NSGo's dialog on the kit's panel: Cancel, quiet and first, then the one filled button, and what went wrong as a danger Banner. Move to trash and removing a vault ask in NSGo's alert dialog, which names the note or the vault, with the action in the danger variant. The alert closes as its action starts, so a failure of the action shows over the window, not in the dialog.
  • Settings (vaults_native.go). Manage vaults, a dialog of 5 filled buttons, is Settings on NSGo's settings view: a gear at the navigation's foot and mod+, show it in place of the vault, and Done or a press of a vault's row leaves it. Its rows start the vault forms, show the vault's sync and hold the device's choices. The tree and the editor are kept while it shows, so the open note and its undo history are there after it. A vault form that makes or opens a vault shows that vault next.
  • The rest. The navigation's foot is the kit's ConnectionItem. The tree shows a skeleton until the vault's notes are read. mod+K is Quick open, beside mod+O. With no vault, the 3 ways to get one are 1 filled button and 2 quiet ones.
  • TestNoLiteralLooks holds the client to no look written as a number, but the 2 the kit has no token for in v0.3.0: the editor's inset, and a Markdown heading's size in live preview.

Names that changed (the tests' handles, rule 9): Manage vaults is Settings; Live preview and Source are tabs, not one button whose text changes; Restore deleted note and Refresh vaults and notes are in the More menu. The pictures vault-manager.png and dark-vault-manager.png are settings.png and dark-settings.png.

Not in this change: the window's size, place and pane widths are not kept (rule 8); nothing answers mod+F; the kit's spacing (frostui#78) is not taken, since the kit has no tag with it yet.

Risk tier

Risk tier: 2 — a change of where the client's controls are and of how its dialogs ask. No path of .github/risk-paths.json is touched. How a note opens, saves and is left (open, leave, Flush) is the code it was. The move and the trash of a note run the same checks and calls in the same order (manage, taken out of the dialog that held them), with one difference: the trash's confirmation closes before the delete runs, so a refusal shows over the window.

Docs housekeeping

  • Cross-links added in both directions (ADR ↔ design ↔ spec ↔ plan): docs/design/app.md describes the toolbar, the dialogs, Settings and the pictures; docs/development.md and README.md name the controls as they are now; no new doc

Verification

  • make check green (host): exit 0
  • make nsgo-check, in make verify: the suite headless, 13 tests and the 9 picture tours; 5 tests are new (TestToolbarHoldsTheNotesActions, TestNarrowWindowKeepsTheActionsInOneMenu, TestSettingsTakesTheVaultsPlaceAndGivesItBack, TestEscapeLeavesAForm, TestNoLiteralLooks), and TestManageNotes now checks that the trash's alert names the note
  • make nsgo-live on Xvfb's X11: 22 passed, 0 failed, 0 skipped
  • make nsgo-pictures: 24 kept pictures; 20 changed, 2 are new (more-menu, narrow-menu), 2 are renamed
  • The web build compiles (GOOS=js GOARCH=wasm go build, in make nsgo-check)
  • The web build under Lodge in a browser (make nsgo-lodge-evidence IN_NSL='sh -c', on the host, headless Firefox 153, a window 1160 by 760), on 633cc60 with the second commit's 2 test edits: the 4 TestNSGoLodge* tests passed, in 2 runs of the target. Before the edits 2 of the 4 failed: one looked for the vault's note among buttons (the rows are tree items since feat(nsgo): list a vault's notes as a tree #280), the other for Restore deleted note outside the More menu
    • The Notes frame is 1112 wide there and the toolbar shows its full set of buttons. Measured in the page, no control is cut or over another: More ends 18 inside the frame's right edge, and the title is not shortened
    • The tests run in NSGo's touch presentation (headless Firefox reports no pointer). With Firefox set to report a fine pointer, the 4 passed once
    • Found, not fixed: in the web build, Escape does not close a form (New note, Rename or move note, Restore deleted note) while its text field has the keyboard, in either presentation; it closes the trash's alert, the More menu and Quick open. In the desktop client Escape closes those forms, headless and in a real window (TestEscapeLeavesAForm). Whether the web build did this before this change was not checked
    • Not covered in the browser: the narrow window's one menu
  • Not run: a person's mouse on a real desktop; Windows

…the kit's parts

The window's toolbar holds what the row over the editor held: the open
note's path and state under the vault's name, New note as the window's
one filled button, the editor's 2 modes as a segmented control, and the
note's and the vault's actions as icon buttons. A window with no room
for them keeps New note and one menu.

A form is NSGo's dialog on the kit's panel, with Cancel quiet and first.
The trash and the removal of a vault ask in the alert dialog, with the
action in the danger variant. What notesd says about the open note is a
banner in its pane. Manage vaults, a dialog of filled buttons, is
Settings on NSGo's settings view, behind a gear at the navigation's foot
and mod+,.

TestNoLiteralLooks holds the client to no look written as a number, but
the 2 the kit has no token for yet.
@github-actions github-actions Bot added the level:L3 Skim label Nov 25, 2026
The NSGo client's notes are a tree, so its rows are tree items, and
Restore deleted note is in the toolbar's More menu. TestEscapeLeavesAForm
holds that Escape closes a form whose field has the keyboard, and the
trash's alert, in the desktop client.
@bketelsen
bketelsen merged commit 3c9ce9b into main Nov 25, 2026
23 of 25 checks passed
@bketelsen
bketelsen deleted the feat/nsgo-toolbar-and-dialogs branch November 25, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants