chore: design system colour tokens, primitives & Storybook#6883
chore: design system colour tokens, primitives & Storybook#6883talissoncosta wants to merge 13 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6883 +/- ##
=======================================
Coverage 98.31% 98.31%
=======================================
Files 1335 1335
Lines 49689 49689
=======================================
Hits 48851 48851
Misses 838 838 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Blocker: #6866 (Decouple Button from Redux store) should land before or alongside this PR — Button's dependency on |
Introduce a structured colour system with primitive SCSS scales (_primitives.scss) and semantic CSS custom properties (_tokens.scss) with light/dark mode support. Align existing _variables.scss colour values to the new primitives. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Configure Storybook 8 with webpack5, SWC, SCSS support, and dark mode toggle. Add ColourPalette and SemanticTokens stories to visualise the design system. Include eslint-plugin-storybook and gitignore entries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Run Chromatic on PRs that touch frontend files to catch visual regressions automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce Storybook as the frontend development hub with getting started instructions, story writing guidelines, and project structure overview. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Run Storybook automigrations and manually convert main.js to ESM (.mjs). Remove @storybook/blocks (consolidated into addon-docs), replace @storybook/addon-essentials with core equivalents, and update all Storybook packages to v10.2.17. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add manager.js with custom theme using our primitive palette colours, Flagsmith logo, and dark sidebar. Add manager-head.html to constrain logo size. Configure staticDirs to serve assets from web/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extend semantic token layer with surface-hover, surface-active, and hover/active states for danger, success, and warning feedback colours. Dark mode inverts to lighter steps. These are generic role-based tokens — no component-specific tokens needed. Refs #6904 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite SemanticTokens story to read --color-* CSS custom properties from the DOM at render time instead of hardcoding values. Tokens are auto-discovered, grouped by prefix, and computed values update when toggling themes. Rewrite ColourPalette story to parse _primitives.scss via raw-loader at build time. Adding a new SCSS variable automatically adds a swatch. No more manual story updates when tokens or primitives change. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix <code> elements inheriting Storybook/Bootstrap colour overrides that made them invisible in light mode. Fix colour palette swatches wrapping to a second row by using flex layout instead of fixed widths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42b4c1e to
87a4eae
Compare
Storybook 10 requires TypeScript >= 4.9 but the project uses 4.6.4. Add --legacy-peer-deps to npm ci to unblock CI until TypeScript is upgraded in a separate effort. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Revert the Storybook 8→10 upgrade and the --legacy-peer-deps CI workaround. SB10 requires TypeScript >= 4.9 but the project uses 4.6.4, causing 805 type errors on upgrade. Staying on SB8 avoids masking dependency issues with --legacy-peer-deps. The SB10 upgrade can be revisited alongside TypeScript 5.x (#6919). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move repeated inline CSS from story files into stories/docs.scss and reusable components (DocPage, ScaleRow, TokenGroup) under stories/components/. Keeps stories focused on data logic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 10. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
Remove --legacy-peer-deps (unnecessary with SB8), enable draft PR gate, pin chromaui/action to v11. Add clarifying comment on no-deps useEffect in SemanticTokens story. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to #6606
Establishes the foundational colour architecture for the design system:
_primitives.scsswith full 50–950 tonal scales (Tailwind convention) for all 7 colour families. Existing hex anchors are locked — zero visual change to shipped UI._tokens.scsswith CSS custom properties organised by role (brand, surface, text, border, feedback) with light/dark mode variants. Wire intostyles.scss._variables.scssalpha values with correct primitive RGB bases._primitives.scss) and Semantic Tokens (auto-discovered from CSS custom properties).CHROMATIC_PROJECT_TOKENsecret).How did you test this code?
npm run build-storybookbuilds without errorsENV=local npm run dev— app builds and renders identically (no visual regression)CHROMATIC_PROJECT_TOKENsecret to be added to the repo