fix(Dashboard): wire theme toggle to Storybook globals for proper dark mode#150
Merged
Merged
Conversation
…k mode Replace hardcoded neutral-X dark:neutral-Y color pairs with semantic tokens (bg-card, bg-background, border-border, text-muted-foreground, hover:bg-muted) so components respond to the brand system. Remove ThemeProvider wrapper — the Dashboard story's in-app toggle now emits updateGlobals via Storybook's addons channel, which triggers preview.tsx's applyGlobalTheme() to handle class toggling, data-theme, and CSS custom property injection. This keeps the toolbar icon in sync and avoids duplicating brand/CSS-variable logic in the story file.
3abc1cd to
d0a431f
Compare
Deploying ui with
|
| Latest commit: |
d0a431f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://120ec96c.ui-6d0.pages.dev |
| Branch Preview URL: | https://bugfix-dashboard-example-dar.ui-6d0.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Dashboard Storybook story to rely on Storybook globals for theme switching (so preview-level theme/brand logic stays centralized) and replaces hardcoded neutral dark/light class pairs with semantic Tailwind tokens so the story responds to brand theming.
Changes:
- Emit
updateGlobalson the Storybook channel from the in-story theme controls and remove theThemeProviderwrapper. - Replace
neutral-*/dark:neutral-*styling pairs with semantic tokens (e.g.bg-card,bg-background,border-border,text-muted-foreground,hover:bg-muted).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Replace hardcoded neutral-X dark:neutral-Y color pairs with semantic tokens (bg-card, bg-background, border-border, text-muted-foreground, hover:bg-muted) so components respond to the brand system.
Remove ThemeProvider wrapper — the Dashboard story's in-app toggle now emits updateGlobals via Storybook's addons channel, which triggers preview.tsx's applyGlobalTheme() to handle class toggling, data-theme, and CSS custom property injection. This keeps the toolbar icon in sync and avoids duplicating brand/CSS-variable logic in the story file.