Skip to content

📖 Storybook-Design | Comprehensive Component Design System Specs in Storybook - #672

Open
milah-247 wants to merge 1 commit into
StellarFlow-Network:mainfrom
milah-247:feat/632-storybook-design-system
Open

📖 Storybook-Design | Comprehensive Component Design System Specs in Storybook#672
milah-247 wants to merge 1 commit into
StellarFlow-Network:mainfrom
milah-247:feat/632-storybook-design-system

Conversation

@milah-247

Copy link
Copy Markdown
Contributor

Summary

  • Adds four new Docs-tagged story files under src/stories/foundations/Colors, Typography, Shadows, Radii — documenting the app's real design tokens rather than invented ones:
    • Colors: the theme-aware CSS custom properties from src/app/globals.css (--color-background, --color-foreground, --color-surface, --color-surface-raised, --color-border, --color-muted), the static brand tokens (--color-neon-green, --color-oracle-navy, --color-oracle-border), and a reference table of hardcoded brand accent hexes used around the app (wallet button, admin tab "cyber lime") that aren't yet exposed as tokens.
    • Typography: --font-sans/--font-mono (both currently Geist Sans, loaded via next/font/google in layout.tsx), plus Tailwind v4's default type scale and font weights (not overridden in tailwind.config.js).
    • Shadows / Radii: Tailwind v4's default shadow-* / rounded-* scales, since tailwind.config.js doesn't extend either.
  • Updates .storybook/preview.tsx with a globalTypes.theme toolbar toggle (Light/Dark) and a decorator that applies the app's real .dark class — the same mechanism next-themes uses on <html> via attribute="class" — to a wrapper div around every story. This makes the theme toggle work across all stories, not just the new token docs, without touching the existing AddressBadge/RelayerStatusTable/WalletConnectButton/OptimizedDialog stories.
  • All new content uses inline styles / CSS custom properties rather than Tailwind utility classes, since tailwind.config.js's content globs explicitly exclude *.stories.tsx files — Tailwind classes written only in story files wouldn't be generated.

Technical Requirements Addressed

  • Document design tokens (Colors, Shadows, Typography, Radii) in Storybook Docs pages
  • Interactive controls for testing dark/light theme shifts across all basic UI primitives
  • Verify zero console warnings when mounting Storybook components — blocked, see Testing

Files Changed

  • .storybook/preview.tsx
  • src/stories/foundations/Colors.stories.tsx (new)
  • src/stories/foundations/Typography.stories.tsx (new)
  • src/stories/foundations/Shadows.stories.tsx (new)
  • src/stories/foundations/Radii.stories.tsx (new)
  • src/stories/foundations/shared.tsx (new — small internal layout helpers, not a story file)

Testing

  • npx tsc --noEmit — no new type errors introduced.
  • npx eslint src/stories .storybook — clean.
  • npx storybook build currently fails on main, unrelated to this change: the storybook core package isn't pinned in package.json at all, so tooling resolves a fresh storybook@10.5.5, while @storybook/addon-essentials and @storybook/addon-interactions are pinned at 8.6.14 (@storybook/addon-a11y, addon-links, @storybook/nextjs, and @storybook/react are on 10.5.5). The 8.x addons import storybook/internal/common, which doesn't exist in the 10.x layout, so Storybook can't load addon-essentials'/addon-interactions' presets and fails before rendering anything — this affects all 4 pre-existing story files too, not just the ones added here. Confirmed via npm ls storybook (no resolved version) and the addon-essentials/addon-interactions package.json versions. Fixing the version matrix is a separate, larger change (would need every @storybook/* package aligned to one major, plus verifying addon-essentials/addon-interactions's config surface against 10.x) that I've left out of scope here to avoid touching unrelated tooling; flagging it since it blocks verifying "zero console warnings" for this issue. npx eslint/npx tsc --noEmit are clean, and the new files avoid Tailwind utility classes (excluded from Storybook's content scan) so they render using the same CSS custom properties the app itself relies on.

Closes #632

Documents Colors, Typography, Shadows, and Radii tokens as Storybook
Docs pages under Foundations/*, sourced from the real CSS custom
properties in globals.css and Tailwind's default scale (not
overridden in tailwind.config.js). Adds a Theme toolbar toggle in
preview.tsx that applies the app's .dark class to every story via a
decorator, so existing component stories can be inspected in both
themes.
@drips-wave

drips-wave Bot commented Aug 1, 2026

Copy link
Copy Markdown

@milah-247 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

Development

Successfully merging this pull request may close these issues.

📖 Storybook-Design | Comprehensive Component Design System Specs in Storybook

1 participant