Repository navigation
Dashboard design tokens: one type ramp, a 4px spacing scale, radii and semantic colors - #551
Merged
Merged
Conversation
…d semantic colors The root font size was 18px, so every Tailwind size rendered on a fraction (13.5, 15.75, 20.25, 27px) and spacing on a 4.5px grid; pages added their own arbitrary sizes and raw palette colors on top. The root is back to the browser's 16px and src/app/tokens.css defines the system: - a seven-step ramp (13, 15, 16, 18, 20, 24, 32px), each with a fixed line height on the 4px grid, three weights, and semantic text styles (text-page-title, text-section-title, text-body, text-caption, text-data, text-numeric, text-display); - radii (4, 6, 8, 12px), two elevations for floating surfaces; - semantic colors for surfaces, lines, text and status (good, warn, bad, info, severe, done, accent) as --ch-* variables named in @theme, ready for a light theme; src/lib/tokens.ts mirrors them for charts and QR codes. The UI lint fails an arbitrary font size, an off-ramp weight, an arbitrary or off-scale padding, margin or gap, a raw hex color outside the token files, and a tokens.ts value that drifts from tokens.css; palette classes are counted against a baseline that only goes down. A rare real case is allowed with a ui-lint-allow comment that says why. The shell and every shared component move onto the tokens; buttons and fields share one height and radius; PageHeader draws the one title style and the first block under it sits 24px below on every page. Pages under src/app move in their own change (TOKENS_LATER in the lint). DESIGN.md is the guide, and e2e/design-tokens.spec.ts checks what renders on the shell and three pages at 1440 and 375 wide.
…e page column Section and settings tabs keep the 44px touch height below md: now that the root is 16px. The combobox trigger matches the 36px field height. The settings column takes the one page width, so its left edge lines up with every other page. The lint and the class rewrite read data-attribute variants and the trailing important mark. Specs that matched palette class names match the semantic ones; the phone menu test closes the full-screen sheet with its Close button.
…kens Inline code draws at the caption size instead of 0.9em of its line, so it never lands between ramp steps; bold text in prose is semibold. The token rules cover src/app/foryou/ from the start, and DESIGN.md spells out row titles, group headers, rail numbers and button sizes in lists.
nambok
added a commit
that referenced
this pull request
Dec 6, 2026
# Conflicts: # dashboard/src/components/command-palette.tsx
coderhelm
Bot
dismissed
their stale review
December 6, 2026 05:05
Superseded by CoderHelm's latest review
…sentence case From the review: dark ink on a status fill (a check on green, a badge count on red) maps to fg-inverse instead of the status text color; a mostly opaque status fill used as a dot or a moving bar stays a solid mark; sticky bars and headers keep their opaque background; a hover that landed on the same token as its base moves one step (text-accent to accent-strong, the sign-in button from accent-emphasis to accent-solid). The filled accent button uses accent-emphasis, deep enough for white text. Uppercase overlines become sentence-case labels, headings become section titles, and the lint fails an uppercase class. The spacing rule checks gap-x and gap-y, and token-drift points at the right line.
coderhelm
Bot
dismissed
their stale review
December 6, 2026 05:44
Superseded by CoderHelm's latest review
Contributor
|
💚 Post-merge health check passed: the deploy of
|
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.
Summary
The dashboard's text sizes looked uneven because the root font size was 18px: every Tailwind size rendered on a fraction (13.5, 15.75, 20.25, 27px), spacing on a 4.5px grid, and pages added arbitrary sizes and raw palette colors on top. This puts the dashboard on one design system: a fixed type ramp, a 4px spacing scale, four radii, two elevations and semantic colors, enforced by the UI lint, with the shell and every shared component moved onto it. Pages under
src/appmove in a follow-up pull request; For you (src/app/foryou/, merged to main meanwhile) moves onto the tokens here and is held to them.Changes
dashboard/src/app/tokens.css: the tokens. Root back to the browser's 16px. Type ramp 13 / 15 / 16 / 18 / 20 / 24 / 32px, each with a fixed line height on the 4px grid, three weights (400, 500, 600). Semantic text styles:text-page-title,text-section-title,text-body,text-caption,text-data,text-numeric,text-display,text-code-inline. Radii 4 / 6 / 8 / 12px.shadow-popoverandshadow-dialog. Colors as--ch-*variables named in@theme inline(bg-surface,border-line,text-fg-muted,bg-warn-soft,text-done...), so a light theme later redefines only the variables.dashboard/src/lib/tokens.ts: the same values for code that can't take a class (charts, QR codes, Mermaid).dashboard/scripts/ui-lint.mjs: new errorstype-ramp,spacing-scale,raw-hex,token-drift, and araw-colorcount that may only go down. Escape hatch:ui-lint-allow <rule>: <reason>on the line, orui-lint-allow-filefor a whole file (other companies' logos, the code highlighting theme). The low-contrast rule knows the token names.src/components,src/lib): palette classes replaced by semantic tokens, sizes on the ramp,font-boldto semibold, buttons and fields one height (36px) and radius (6px), floating surfaces on the elevation tokens, chart colors fromTOKENS.PageHeaderdraws the page title style; the first block under a page header sits 24px below it on every page (globals.css).dashboard/DESIGN.md: the guide, the rules for row titles, group headers, rail numbers and button sizes in lists, and the steps to move a page onto the tokens.uppercaseclass. Dark ink on a status fill usestext-fg-inverse, sticky bars stay opaque, and hover states never land on their base token.e2e/design-tokens.spec.ts: on the shell, Inbox, Members and roles and a run's page, at 1440 and 375 wide, every rendered text is on the ramp in one of three weights, the page title is 24/32 semibold with 24px under its header, and the shell uses only the spacing scale and the radii.Verification
npm run lint,npm run typecheck,npm run build, the docs build, the text guards, and the full Playwright suite against the static build (2,276 passed, 29 skipped).main(15.75px and 13.5px text in the shell) and passes on this branch.