Polish storybook interaction and presentation - #232
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
It introduces a JSX compile error (duplicate prop) and some of the new theme controls are not actually wired through in mocked SuperfluidCampaign stories / deterministic GoodReserve stories.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR addresses #64 by expanding Storybook story interactivity, adding standardized Theme + “brand preset” controls and wiring those controls through to multiple widget showcase/QA stories.
Changes:
- Introduces
defaultThemeandbrandPresetcontrols across several Storybook stories (QA + showcase). - Threads
defaultTheme/themeOverridesthrough story helpers to support host-branding demonstrations. - Updates GoodReserveWidget stories to apply
themeOverridesconsistently across deterministic and interactive variants.
File summaries
| File | Description |
|---|---|
| examples/storybook/src/stories/superfluid-campaign-widget/SuperfluidCampaignWidgetQA.stories.tsx | Adds Theme + brand preset controls and passes them into QA fixture stories. |
| examples/storybook/src/stories/helpers/superfluidCampaignWidgetStories.tsx | Extends helper story props to carry theme settings through mocked/runtime shells. |
| examples/storybook/src/stories/helpers/aiCreditsWidgetStories.tsx | Adds theme props to helper shells and forwards them into AiCreditsWidget instances. |
| examples/storybook/src/stories/governance-widget/GovernanceWidgetShowcase.stories.tsx | Adds brand preset control and applies themeOverrides to showcase flows. |
| examples/storybook/src/stories/governance-widget/GovernanceWidgetQA.stories.tsx | Adds Theme + brand preset controls to QA stories and forwards overrides into runtime fixtures. |
| examples/storybook/src/stories/goodreserve-widget/GoodReserveWidget.stories.tsx | Adds Theme + brand preset controls and applies overrides to all reserve widget story states. |
| examples/storybook/src/stories/ai-credits-widget/AiCreditsWidgetShowcase.stories.tsx | Adds Theme + brand preset controls and forwards overrides into showcase stories. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| <RuntimeStory defaultTheme={args.defaultTheme} themeOverrides={brandPresetOverrides(args.brandPreset)} | ||
| useInjectedProvider | ||
| defaultTheme="light" | ||
| state={createState('active_alignment', { |
| const renderStory = ( | ||
| mockState: Story['args']['mockState'], | ||
| mockState: any, | ||
| dataTestId: string, | ||
| defaultTheme?: 'light' | 'dark', | ||
| themeOverrides?: import('@goodwidget/core').GoodWidgetThemeOverrides | ||
| ) => ( | ||
| // <div data-testid={dataTestId} style={{ width: 390 }}> | ||
| <GoodReserveWidget provider={provider} mockState={mockState} defaultTheme={defaultTheme} /> | ||
| // </div> | ||
| <GoodReserveWidget provider={provider} mockState={mockState} defaultTheme={defaultTheme} themeOverrides={themeOverrides} /> | ||
| ) |
| defaultTheme?: 'light' | 'dark' | ||
| themeOverrides?: import('@goodwidget/core').GoodWidgetThemeOverrides | ||
| initialView?: SuperfluidCampaignView | ||
| leaderboardScenario?: MockLeaderboardScenario | ||
| programSupTotalsScenario?: MockProgramSupTotalsScenario |
|
Your submission is not accepted and was already closed. the bounty is already resolved and having follow-up items |
Resolves #64. Adds Theme controls to all stories.