Repository navigation
feat(ui): add a design guideline for the UI, and pin its typefaces - #93
Merged
Merged
Conversation
The UI had no font-family of its own, so it inherited Tailwind's platform stack and rendered differently on every OS. Both families are now pinned. Inter for sans and JetBrains Mono for mono, chosen for legibility at the sizes this UI actually uses: the scale tops out at 18px and most of the app sits at 11-13px. JetBrains Mono separates 0/O and 1/l/I unambiguously, which matters because mono here is not decorative - every step name, type, ref and slot is a string someone may retype into the CLI. Self-hosted via Fontsource rather than linked from a CDN: `wayful ui` serves the built client from inside the binary, so a CDN link would make the embedded UI depend on the network. The old platform stack stays behind each face, so a failed load degrades to the previous look. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Records the design identity the UI already has, in the google-labs DESIGN.md format (YAML token frontmatter plus prose), so new surfaces land in the same place. Deliberately a guideline rather than a full design system: the Components section pins down only the six identity-carrying pieces and defers the rest to shadcn defaults. Values are taken from the source - styles.css, graph-layout.ts, viewport.ts and use-media-query.ts - rather than eyeballed, and those files stay canonical where the document drifts. The three reference screenshots are captured from the running app against a throwaway demo project. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two related changes: a written design guideline for the UI, and the first change made under it.
design/design.mdA rough visual guideline in the google-labs DESIGN.md format — YAML token frontmatter for machine-readable values, prose for the reasoning. Deliberately a guideline, not a design system: the Components section pins down only the six identity-carrying pieces (step card, status pill, section label, floating toolbar, ref chip, waypoint) and explicitly defers everything else to shadcn defaults.
Values are read out of the source rather than eyeballed —
styles.css,graph-layout.ts,viewport.ts,use-media-query.ts— and the doc says those files stay canonical where it drifts.What it names as the identity:
0in OKLCH) with status as the only saturated colour, driven by one--statusvariable andcolor-mixtints.oklch(0.86 0.176 89.2)as a highlight, not a brand fill — focus ring, selection, hot graph edges. One of the few values identical in light and dark.Three reference screenshots captured from the running app against a throwaway demo project.
Inter + JetBrains Mono
The UI had no
font-familyof its own, so it inherited Tailwind's platform stack and rendered differently on every OS. Both families are now pinned, chosen for the sizes this UI actually uses — the scale tops out at 18px and most of the app sits at 11–13px.JetBrains Mono separates
0/Oand1/l/Iunambiguously, which matters given the mono rule above.Self-hosted via Fontsource rather than linked from a CDN, because
wayful uiserves the built client from inside the binary and a CDN link would make the embedded UI depend on the network. The old platform stack stays behind each face, so a failed load degrades to the previous look.Two things worth a look
font-display: swap. Inter's metrics are close to the system fallback so the reflow is small, but the UI was genuinely flash-free before and now isn't quite. Preloading the latin subset would close it.layer-the-graphnearly fills its card now. Noted in the doc as something to design around; if it reads too tight, the node wants to be wider or mono wants to drop to 12px on cards.Validation
bun checkgreen — lint, typecheck, 49 UI tests and 320 CLI tests, 0 failures.npx @google/design.md linton the doc reports 0 errors; the 22 warnings are allorphaned-tokens, because the dark palette and status colours are documented in prose rather than wired intocomponentsentries. That's deliberate — the status tints are derived at runtime from--status, so hard-coding one onto a component token would misrepresent how they work.Fonts verified in a real browser, not assumed:
document.fonts.check()returns true for both families against the running dev server.🤖 Generated with Claude Code