Skip to content

feat(web): design system foundations (lot 1) - #263

Merged
jplanckeel merged 8 commits into
mainfrom
feat/ds-foundations
Nov 2, 2026
Merged

jplanckeel merged 8 commits into
mainfrom
feat/ds-foundations

Conversation

@jplanckeel

Copy link
Copy Markdown
Contributor

Summary

First of the five lots of docs/design-system/IMPLEMENTATION.md: the foundations of the "Surligneur" design system. Layout and components do not change yet; the whole app takes the new palette and fonts, in both themes.

  • Design system docs in docs/design-system/ (brand book, tokens, component specs, reference implementation, mockups, logos, fonts, implementation plan).
  • Tokens: web/scripts/build-tokens.mjs generates web/src/design/tokens.css from web/src/design/tokens.json (light under :root, .light, dark under .dark, plus -rgb channels). Runs before dev and every build script; a test fails if the generated file or the copy of tokens.json drifts.
  • Tailwind utilities: every colour token (bg-paper, text-ink, border-rule-strong, bg-signature, text-impact…), spacing and size aliases, shadow-overlay, and the twelve type styles (text-metric, text-title, text-summary, text-data-sm…). cn() knows the type styles, so tailwind-merge no longer drops text-title next to text-ink.
  • Fonts: Spline Sans and Spline Sans Mono from Fontsource; Plus Jakarta Sans, IBM Plex Mono and the inline Space Grotesk / JetBrains Mono declarations are gone.
  • Temporary --hud-* bridge (removed in lot 5): the legacy variables point to the tokens, so every screen adopts the palette without touching the files that use hud-*. Success stays neutral. White text on primary / error fills now uses on-ink / on-status, since primary (ink) is light in the dark theme.
  • lib/status.ts: toDsStatus() and toTypeIcon(), with tests.
  • Showcase: /theme-test shows every token and type style in light and dark side by side.
  • CLAUDE.md: Design system section with the ten rules.

Not in this lot, by design: the navy sidebar, coloured pills, blue links and gradient banners are hard-coded and change in lots 3 to 5.

Test plan

  • npm run lint, npm run build:check, npm test (64 tests) pass in web/
  • Screenshots of 18 routes in light and dark (static mode) compared with main: palette and fonts applied, no page errors
  • Look at /theme-test and a few pages in both themes

🤖 Generated with Claude Code

jplanckeel and others added 8 commits November 2, 2026 09:16
Brand book, tokens, component specs, reference implementation, page
mockups, logos and fonts, plus the implementation plan in five batches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/build-tokens.mjs turns src/design/tokens.json into
src/design/tokens.css: light colours under :root, dark under .dark, an
-rgb channel variable for each opaque colour, then fonts, type styles,
spacing, radii, sizes and the overlay shadow. It runs before dev and
every build script; a test fails when the generated file or the copy of
tokens.json drifts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
index.css imports tokens.css and maps every colour token in an
@theme inline block (bg-paper, text-ink, border-rule-strong,
bg-signature, text-impact...), plus spacing and size aliases,
shadow-overlay and the twelve type styles (text-metric, text-title,
text-summary, text-data-sm...). Fonts and radii share Tailwind's theme
names, so the tokens override its defaults directly.

cn() now knows the type styles: tailwind-merge used to read text-title
as a colour and drop it next to text-ink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Load both variable fonts from Fontsource and drop the Google Fonts link
(Plus Jakarta Sans, IBM Plex Mono). The body uses --font-sans. Inline
'Space Grotesk' declarations are removed so titles inherit Spline Sans;
inline 'JetBrains Mono' ones now point to --font-mono.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TEMPORARY, removed in lot 5. Every --hud-* variable now points to the
RGB channels of a token (bg -> paper, primary -> ink, error -> failed,
success and tertiary -> muted...), so all screens adopt the new palette
in both themes without touching the files that use hud-*. The body uses
paper and ink directly.

primary is light in the dark theme, so text set in white on primary,
error or muted fills now uses on-ink or on-status (ui/button, btn-primary,
the New Event button and the pages that hardcoded it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
toDsStatus() folds the fourteen API statuses into failed, warning,
running, done and open (open by default, including the proto spelling
recommandation). toTypeIcon() gives the custom icon of each event type,
operation by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/theme-test now shows every colour token, the twelve type styles, the
radii, spacing, sizes and the overlay shadow in the light and the dark
theme side by side, plus the temporary hud-* bridge. Later lots add each
component here.

To render a light panel inside a dark page, the light tokens and the
bridge are also declared on .light, and the legacy @theme block is
inline so hud-* utilities follow the subtree they are used in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a Design system section (sources, token pipeline, showcase, the ten
non-negotiable rules) and list npm test and npm run tokens among the
frontend commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jplanckeel
jplanckeel merged commit f52c08e into main Nov 2, 2026
6 checks passed
@jplanckeel
jplanckeel deleted the feat/ds-foundations branch November 2, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant