Skip to content

feat(workspaceui): add the Frostyard themes, Inter and the appearance choice - #72

Merged
bketelsen merged 1 commit into
mainfrom
feat/workspaceui-theme
Nov 24, 2026
Merged

bketelsen merged 1 commit into
mainfrom
feat/workspaceui-theme

Conversation

@bketelsen

Copy link
Copy Markdown
Contributor

Summary

The kit's part of Phase 1 of the plan: the NSGo kit gets the Frostyard look. Until now it set no theme, and an app drew NSGo's gray and blue.

  • Theme() is one NSGo theme with two palettes, Frostyard for the dark appearance and Frostyard light for the light one. Every color is a value of the themes' spec, under NSGo's own roles, so NSGo's controls draw them with no change in an app. It keeps NSGo's corners (ADR-0014).
  • ColorsOf(cx) reads the Frostyard colors NSGo has no role for: the chrome, the panel, a chosen row's fill, the label, and each tone's fill and line.
  • Apply(cx) sets the theme and registers the bundled Inter. Frame(...) is the window's root view: it paints the ground and sets the text's color and font family.
  • AppearanceChoice is the System, Light or Dark setting, as NSGo's segmented tabs.
  • Shell leaves the app's name to the system's title bar where there is one (Linux).
  • A fix: the compact shell paints its ground. In a dark narrow window it drew its light text on the window's white, which Frostnotes' pictures showed (test(nsgo): run the client's suite in a real window and keep its pictures frostnotes#277).

An app takes all of it with workspaceui.Apply(cx) at its root and workspaceui.Frame(...) around its views.

Risk tier

Risk tier: 2 — new code in the kit, and 2 changes of what Shell draws (the brand on Linux, the compact ground). No path of .github/risk-paths.json is matched: workspaceui/go.mod and go.sum are unchanged.

workspaceui/fonts/InterVariable.ttf is a copy of fonts/InterVariable.ttf (Inter 4.001, OFL-1.1), with its OFL.txt: a module embeds only files under its own directory. NOTICE and AGENTS.md say so. It adds about 0.9 MB to an app's binary.

Docs housekeeping

  • Cross-links added in both directions (ADR ↔ design ↔ spec ↔ plan)
  • Conformance aliases and canonical symlinks are unchanged; canonical targets are edited instead

The spec gains "The themes" (each NSGo role and each kit role beside the themes' spec's name for it) and the rules the tests hold.

Verification

  • make verify green, as part of make ci BASE=origin/main (host, exit 0, ==> ci passed): both modules' tests, the js/wasm tests, the race detector and the 7 cross-builds.
  • Revert test for a fix: TestCompactShellPaintsItsGround fails with the compact ground removed (the compact shell's ground is 0x00000000, want 0x06111dff); command: go test -run TestCompactShellPaintsItsGround . in workspaceui/.
  • What the tests hold: the palettes' values against the spec; that no role NSGo's default theme names is left at NSGo's color, the chart colors aside; 69 pairs in each theme at 4.5:1 or over (the lowest is Frostyard light's accent on surface, 4.53:1; the test was seen to fail at a threshold of 7, with ratios that match the themes' spec's table); ColorsOf and the appearance choice in both appearances.
  • Looked at in a real window: FrostMail's 5 picture tours, built against this branch, in a GTK 4 window on Xvfb's X11 in both appearances (2026-11-24). They drew Frostyard's colors in the shell, the list, a menu and a dialog; the narrow dark window on its ground; and the text in the bundled Inter, where the same tours without Apply draw Xvfb's own sans-serif face. The first trial named the family "Inter" and drew that fallback: the variable file names "Inter Variable", which FontFamily now names first. The pictures are not kept in this repository.
  • Not checked: the web build and Windows (the font there, and the theme), the brand's absence on a Linux desktop outside the test host, and the high-contrast values of the themes' spec, which the kit does not carry.

After the merge the maintainer tags the module (make bump-workspaceui; svu gives workspaceui/v0.2.0), and the three apps call Apply and take their pictures again.

… choice

The NSGo kit set no theme: an app drew NSGo's gray and blue. Theme returns
the Frostyard look as one NSGo theme, Frostyard for the dark appearance
and Frostyard light for the light one, with the colors of the themes'
spec under NSGo's roles and under roles of the kit's own (ColorsOf: the
chrome, the panel, a chosen row's fill, the label, each tone's fill and
line). Apply sets it and registers the bundled Inter; Frame is the
window's root view, which paints the ground and sets the font family;
AppearanceChoice is the System, Light or Dark setting.

Shell leaves the app's name to the system's title bar where there is one
(Linux), and its compact layout paints its ground: in a dark narrow
window it drew its light text on the window's white.

Tests hold the palettes to the spec, fail on a role NSGo names that has
no Frostyard color, and hold 69 pairs in each theme to 4.5:1. The look was
checked in a GTK window on Xvfb's X11 through FrostMail's picture tours.
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.

1 participant