Skip to content

feat(desktop): draw frostui's Frostyard look - #202

Merged
bketelsen merged 3 commits into
mainfrom
feat/frostyard-look
Nov 12, 2026
Merged

bketelsen merged 3 commits into
mainfrom
feat/frostyard-look

Conversation

@bketelsen

Copy link
Copy Markdown
Contributor

Summary

Phase 5 of frostui's Frostyard look plan: the desktop app moves to frostui v0.5.0 and its Frostyard look (frostui's ADR-0011). Recorded as ADR-0042 (Proposed), which supersedes in part ADR-0038's "the theme follows the desktop's accent".

  • frostui v0.5.0 (go get, go mod tidy, make flatpak-sources). The MyGo replace to the bketelsen/mygo fork stays; frostui v0.5.0 builds against it, and make verify's go test github.com/frostyard/frostui/... step passes on the fork.
  • Appearance. applyAppearance sets frostui.FrostyardTheme(dark).WithPreferences(p) with the accent cleared, at the start of every frame: Light and Dark pick a theme, System follows the desktop's light or dark. High contrast and the desktop's text size apply; the accent no longer does. Zoom stays MyGo's whole-window zoom.
  • Editor. Live preview sets heading lines in Inter, bold, in the text color (MyGo's heading token color only in source mode), at their level's multiple of the editor's text size. The scanner reports every code block's lines, fences included and selected or not (livepreview.Result.Code), and the editor puts them on frostui's code color with LineBackgrounds. The fence header (language and Copy) stays on the editor's ground: MyGo places a block within the text's width, narrower than a line's background, so a header on the code color would not line up with the lines. The reading view (and live preview's rendered blocks) draws code blocks on the code color inside a hairline at RadiusChip, callouts as frostui's banner (tone fill and line, with the tone bar), and note embeds square.
  • Literals. The 13 literal FontSize(n) and 5 literal .Radius(n) in internal/desktop are now frostui styles (Title, Body, Muted, Caption), TextSize, the theme's Radius, RadiusChip and RadiusCard. The brand tile is the brand gradient, as frostui's shell draws it. Selected rows (vault list, history, panes) use frostui's selected row via a new uikit.SelectedRow; pane tabs take the selected fill; hovered rows and tool buttons change their text color, not their background.
  • Docs. ADR-0042, the design doc's new The native look section, the UI spec's native section, plan 0009, the docs index and AGENTS.md's module list.

Risk tier

Risk tier: 3 — risk:high: two changed files are on the L1 list (the glob {internal/render/sanitize.go,…,internal/desktop/reading/view.go,internal/desktop/editor/live.go}, "what a rendered note may reach").

  • internal/desktop/editor/live.go: only how live preview draws. Heading fonts, line backgrounds for code lines, a sparse editor theme that colors headings, and the code header's text styles change. embedKind, the link and tag objects, activate, resolved and the image and media decisions are unchanged.
  • internal/desktop/reading/view.go: only the Markdown view's theme (setLook: code block background, border and radius) and the callout and embed boxes' colors, radius and text style change. loadImage, the remote image fetch, its limits, link, task toggling and which fenced blocks are drawn are unchanged.

Docs housekeeping

  • New docs started from their category's TEMPLATE.md (ADR-0042)
  • Every new doc indexed in docs/README.md
  • Cross-links added in both directions (ADR-0042 ↔ ADR-0038, design/app.md, specs/ui.md, plan 0009)
  • New significant decision recorded as an ADR first, in this PR
  • New or edited ADRs are fact-only: context, decision and consequences

Verification

  • make ci IN_NSL=true green on the host, under the shared lock and a 16G cap: make verify (tidy, gen-check, vet, gofmt, the pinned golangci-lint 2.15.0, unit tests, frostui's tests against the MyGo fork), make desktop-build, and go test -race ./.... ui-check was replaced with a no-op (IN_NSL=true) because this host has no frostnotes nsl machine. Nothing under app/ changed.
  • make flatpak-sources run (frostui v0.4.0 → v0.5.0 in packaging/flatpak/go-sources.json)
  • New test TestTheWindowDrawsInTheFrostyardThemes (internal/desktop/window/look_test.go) draws the main window over a vault in both themes, both as the desktop picks them and as the Theme setting overrides the desktop. It checks the theme's ground and font, the pixels of the note pane (background) and sidebar (chrome), that Inter is registered and measures differently from the default sans, live preview's heading font and code-line backgrounds, the reading view's code-block color, and that zooming keeps the theme. Revert check: with headings back in the editor's family and the fence lines on another color, it fails on both checks in every subtest.
  • TestCodeBlocksKeepTheirLines covers the scanner's code lines (fenced, indented, an open fence, spaces-only lines).
  • Reviewed by hand: PNGs from FROSTNOTES_SCREENS=… go test -run 'TestTheWindowDrawsInTheFrostyardThemes|TestEveryScreenDraws' (live preview, reading view, vault manager, palette, settings; light and dark) compared with the Frostyard Desktop design system's README, tokens and component notes.

Not done here: the Flatpak metainfo screenshots in docs/images (make screenshots) still show the old look; frostui's plan leaves refreshing them for after phases 3 to 5.

frostui v0.5.0 draws the Frostyard look (frostui ADR-0011). It builds
and its tests pass against the MyGo fork the replace keeps.
The Theme setting picks FrostyardTheme with the desktop's preferences
but not its accent. Live preview sets headings in Inter in the text
color and puts code blocks' lines, fences included, on the code color;
the reading view draws code blocks on it inside a hairline and callouts
as frostui's banners. The literal font sizes and corners become kit
styles and metrics, selected rows take frostui's selected row, and a
Tester test draws the window over a vault in both themes.
ADR-0042 records the move to frostui's Frostyard themes and supersedes
in part ADR-0038's accent; the app design, the UI spec, plan 0009 and
AGENTS.md describe the new look.
@github-actions github-actions Bot added level:L1 Read every line risk:high Touches a path in .github/risk-paths.json labels Nov 12, 2026
@bketelsen
bketelsen merged commit 22c0655 into main Nov 12, 2026
15 of 16 checks passed
@bketelsen
bketelsen deleted the feat/frostyard-look branch November 12, 2026 01:03
bketelsen pushed a commit to frostyard/frostui that referenced this pull request Nov 13, 2026
The Frostyard look's phases 1 to 5 all landed (frostui #18 and #19,
released in v0.5.0; frostyard/chairlift#295, frostyard/frostmail#277,
frostyard/frostnotes#202). Add a status line with that evidence, and
point its open "Later" items to #32, #33 and #34. The README and
store screenshots item landed in frostyard/chairlift#296,
frostyard/frostmail#281 and frostyard/frostnotes#204.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:L1 Read every line risk:high Touches a path in .github/risk-paths.json

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants