Skip to content

feat: add semantic design system tokens (DS-001, DS-002, DS-003, DS-004) - #446

Open
PrimeFactor-Dev wants to merge 4 commits into
SO4-Markets:mainfrom
PrimeFactor-Dev:feat/design-system-tokens
Open

feat: add semantic design system tokens (DS-001, DS-002, DS-003, DS-004)#446
PrimeFactor-Dev wants to merge 4 commits into
SO4-Markets:mainfrom
PrimeFactor-Dev:feat/design-system-tokens

Conversation

@PrimeFactor-Dev

Copy link
Copy Markdown

Closes #388, Closes #389, Closes #390, Closes #391

Type of Change

  • New feature (non-breaking change that adds functionality)
  • Bug fix (non-breaking change that fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional or behavioral changes)
  • Performance improvement
  • Documentation update
  • Build / CI configuration change
  • Dependency update
  • Other:

Summary

This PR adds three layers of semantic design tokens to the SO4 design system and documents them in DESIGN.md. Surface tokens (canvas, sunken, raised, overlay, interactive) replace the generic page/card/popover hierarchy with an explicit layer system. Text role tokens (primary, secondary, tertiary, disabled, inverse, link) replace scattered opacity modifiers. Trading-state tokens add foreground, subtle background, and border variants for each market state (long, short, liquidation, success, warning, info, danger, neutral), with chart colors mapped to the same semantic palette.

Motivation / Context

The existing token system used generic shadcn aliases (card, popover, muted-foreground) that didn't express the app's actual surface hierarchy or text roles. Trading-state colors lacked foreground/subtle/border variants, forcing developers to either use raw OKLCH values or inconsistent opacity hacks. Chart colors were defined as standalone blue values disconnected from the semantic palette.

This PR addresses all four DS issues by adding explicit, theme-aware tokens that make the design system self-documenting and eliminate ad hoc color values across the codebase.

Closes #388, Closes #389, Closes #390, Closes #391

Define five explicit surface roles (canvas, sunken, raised, overlay,
interactive) in both light and dark themes using OKLCH values. These
replace the generic page/card/popover hierarchy with a clear layer
system. Tokens are exposed as Tailwind utilities via @theme inline.

Closes SO4-Markets#389
Define explicit text role tokens: primary (default body), secondary
(supporting labels), tertiary (placeholders/hints), disabled (inactive
UI), inverse (text on solid fills), and link (interactive text). Both
light and dark themes included. Existing foreground and muted-foreground
aliases remain compatible.

Closes SO4-Markets#390
Add foreground, subtle background, and border tokens for each trading
state (long, short, liquidation, success, warning, info, danger,
neutral). Color is never the only signal — shape or label accompanies it.
Chart colors (chart-1 through chart-5) are mapped to the same semantic
palette so the entire app uses one consistent color language.

Closes SO4-Markets#391
…DS-001)

Add token documentation for surface roles, text/icon roles, and
trading-state colors added in DS-002/3/4. Includes when-to-use
guidance for Geist Mono and chart-to-semantic-palette mapping.

Closes SO4-Markets#388
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@PrimeFactor-Dev is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@PrimeFactor-Dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant