feat: add semantic design system tokens (DS-001, DS-002, DS-003, DS-004) - #446
Open
PrimeFactor-Dev wants to merge 4 commits into
Open
feat: add semantic design system tokens (DS-001, DS-002, DS-003, DS-004)#446PrimeFactor-Dev wants to merge 4 commits into
PrimeFactor-Dev wants to merge 4 commits into
Conversation
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
|
@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. |
|
@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! 🚀 |
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.
Closes #388, Closes #389, Closes #390, Closes #391
Type of Change
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