Skip to content

feat(web): design-token Phase A — declare missing CSS vars, add Konjo scales - #209

Open
wesleyscholl wants to merge 1 commit into
mainfrom
feat/design-tokens-phase-a
Open

feat(web): design-token Phase A — declare missing CSS vars, add Konjo scales#209
wesleyscholl wants to merge 1 commit into
mainfrom
feat/design-tokens-phase-a

Conversation

@wesleyscholl

Copy link
Copy Markdown
Contributor

Summary

Phase A of the DESIGN_LANGUAGE.md proposal (#208): additive-only token completion on the web platform, scoped exactly per the doc's phased plan — no literal-value replacement in existing components, no SwiftUI changes, no new motion tokens.

  • Fixes two live bugs: --font-mono (referenced via var(--font-mono, monospace) in 30+ .svelte components, never declared, silently falling back to generic monospace instead of JetBrains Mono) and --konjo-panel (referenced with a #0a0d0f fallback in 10 files / 12 call sites, never declared).
  • Adds the missing scales: --konjo-space-1 through -7, --konjo-radius-xs/sm/md/lg/pill, --konjo-text-xs/sm/base/md/lg/xl — values exactly as specified in the doc's Phase 3 token tables.
  • Collapses dead elevation tokens: --glow-sm (zero consumers), --glow-md (one consumer), and --shadow-pane (zero consumers) are replaced with --konjo-shadow-sm/md/lg + one --konjo-glow token. HelpOverlay.svelte's sole --glow-md reference is repointed to --konjo-glow so nothing is left dangling — verified no other file in the repo references any of the three removed tokens.

Explicitly out of scope (per the doc's own phasing)

  • No mass-replace of existing literal spacing/radius/font-size values — StackCard.svelte and other legacy files are untouched; that's Phase B.
  • No KonjoTheme.swift changes — native mirroring is Phase C, gated on Phase B shipping first.
  • No new motion tokens — the doc found lopi's existing --dur-*/--ease-* set already adequate.

Test plan

  • cargo build clean, cargo test --workspace green (no Rust touched, confirmed anyway per repo convention)
  • web (npm run build) clean
  • konjo-prose clean on the diff (pre-existing em dashes elsewhere in app.css left untouched, out of scope for this PR)
  • Repo-wide grep confirms zero remaining references to --glow-sm, --glow-md, --shadow-pane
  • Live devtools check (npm run dev via the Browser pane): --font-mono now resolves to "JetBrains Mono", ui-monospace, monospace on both AppSidebar.svelte's .shead .brand and .snav a, all new tokens resolve to their declared values, sidebar/dashboard/stack-card surfaces render pixel-identical to before (screenshot-checked)

🤖 Generated with Claude Code

Phase A of DESIGN_LANGUAGE.md (#208): additive-only token completion on
the web platform, no literal-value replacement in existing components.

- Declare --font-mono (referenced by 30+ .svelte components via
  var(--font-mono, monospace) but never declared, silently falling back
  to generic monospace instead of JetBrains Mono).
- Declare --konjo-panel (referenced with a #0a0d0f fallback in 10 files/
  12 call sites, never declared; same value, now an actual token).
- Add --konjo-space-1..7, --konjo-radius-xs/sm/md/lg/pill, and
  --konjo-text-xs/sm/base/md/lg/xl per DESIGN_LANGUAGE.md's Phase 3 spec.
- Replace --glow-sm/--glow-md/--shadow-pane (zero, one, and zero
  consumers respectively) with --konjo-shadow-sm/md/lg and one
  --konjo-glow token; repoint HelpOverlay.svelte's sole --glow-md
  reference to --konjo-glow so nothing is left dangling.

Verified: cargo build/test green, web build green, konjo-prose clean on
the diff, live devtools check confirms --font-mono now resolves to
JetBrains Mono and no other repo file references the removed tokens.
StackCard.svelte and other legacy literal-value files are untouched;
that's Phase B's decomposition, not this sprint's.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant