Skip to content

feat(storybook): showcase all GoodWidget widgets with QA fixtures and theme overrides - #253

Open
goodbounties-nanoclaw-agent[bot] wants to merge 4 commits into
mainfrom
feat/gw250-storybook-showcase
Open

goodbounties-nanoclaw-agent[bot] wants to merge 4 commits into
mainfrom
feat/gw250-storybook-showcase

Conversation

@goodbounties-nanoclaw-agent

@goodbounties-nanoclaw-agent goodbounties-nanoclaw-agent Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Closes #252

Summary

Adds the Showcase / Theme overrides / QA three-way story split to the remaining widgets per the plan in #252:

  • CitizenClaimWidget — Theme overrides + env control
  • GoodReserveWidget — split Showcase/QA + Theme overrides
  • GovernanceWidget — Onboarding moved to QA, env control dropped
  • AiCreditsWidget — MockBackend moved to QA + Theme overrides
  • SuperfluidCampaignWidget — API Contracts moved to QA + Theme overrides
  • GoodDataWidget — QA title renamed, Showcase + Theme overrides added

Each widget gets an MDX integrator doc, a deterministic QA fixture set backing its Playwright spec, and (where applicable) a Theme overrides playground scoped to the theme targets the widget actually renders.

Test plan

  • tsc --noEmit clean (only pre-existing baseline errors)
  • eslint clean
  • Full Playwright suite: 253 passed / 1 failed / 1 flaky / 1 skipped — the failure and flake are both AiCreditsWidget appkit connect wallet tests caused by VITE_REOWN_PROJECT_ID not being set in the CI/dev sandbox (pre-existing, unrelated to this change — confirmed zero diff on that spec file vs main)

Note on commit signing

Commits on this branch show as unsigned in this environment — a known, long-standing issue in this org (same symptom previously seen on #148, #179, and #227; root cause not yet pinned down). Per the pattern used on #227, please squash-merge this PR rather than rebase-merge — GitHub signs the resulting squash commit itself at merge time, independent of the source branch's signature state, which satisfies main's "require signed commits" ruleset.

🤖 Generated by goodbounties-nanoclaw-agent

Summary by Sourcery

Organize the remaining Storybook widgets into documented Showcase, Theme overrides, and deterministic QA experiences with expanded Playwright coverage.

New Features:

  • Add Showcase, QA fixture, and Theme overrides story coverage for the remaining GoodWidget widgets, including live integration examples and deterministic runtime states.
  • Add interactive theme override playgrounds for widget-specific rendered surfaces and document the supported customization paths.
  • Add GoodDataWidget live connector showcase and rename its QA coverage under the GoodDataWidget namespace.
  • Expose CitizenClaimWidget environment selection in Showcase stories and validate development-to-production switching.

Enhancements:

  • Separate live product-facing stories from deterministic QA fixtures across GoodReserveWidget, AiCreditsWidget, GovernanceWidget, GoodDataWidget, and SuperfluidCampaignWidget.
  • Add integrator-facing MDX guides describing widget usage, fixture coverage, environment behavior, and theme customization.

Documentation:

  • Expand widget integrator documentation with Showcase, Theme overrides, QA coverage, mounting guidance, and workflow recommendations.

Tests:

  • Add Playwright coverage for theme override rendering and live control updates across multiple widgets.
  • Add deterministic Showcase environment-switch coverage for CitizenClaimWidget and update existing specs to the new Showcase and QA story IDs.
  • Add visual regression fixtures for the new theme playgrounds.

…A fixtures and theme overrides

Adds the Showcase/Theme-overrides/QA three-way story split to
CitizenClaimWidget, GoodReserveWidget, GovernanceWidget, AiCreditsWidget,
SuperfluidCampaignWidget, and GoodDataWidget per issue #252, including
MDX integrator docs and deterministic QA fixtures backing each widget's
Playwright states spec.

Co-Authored-By: Claude <noreply@anthropic.com>

On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Several showcased overrides are ineffective, environment switching can retain stale data, and new playgrounds lack required Playwright coverage.

9 open findings
What changed in this PR

Adds consistent Showcase, Theme Overrides, QA, and integrator documentation across the remaining widgets.

Changes:

  • Adds theme playgrounds and widget guides.
  • Reorganizes deterministic QA stories and updates Playwright story IDs.
  • Adds environment and live-connector showcase controls.
File Description
tests/​widgets/​superfluid-campaign-widget/​states.spec.ts Updates QA story IDs.
tests/​widgets/​governance-widget/​onboarding.spec.ts Updates onboarding story IDs.
tests/​widgets/​goodreserve-widget/​states.spec.ts Updates Showcase and QA story IDs.
tests/​widgets/​gooddata-widget/​states.spec.ts Updates QA story IDs.
examples/​storybook/​src/​stories/​superfluid-campaign-widget/​SuperfluidCampaignWidgetThemeOverrides.stories.tsx Adds theme playground.
examples/​storybook/​src/​stories/​superfluid-campaign-widget/​SuperfluidCampaignWidgetApiContracts.stories.tsx Moves API contracts under QA.
examples/​storybook/​src/​stories/​superfluid-campaign-widget/​SuperfluidCampaignWidget.mdx Documents theme overrides.
examples/​storybook/​src/​stories/​helpers/​goodDataWidgetStories.tsx Registers and exposes the live connector.
examples/​storybook/​src/​stories/​helpers/​citizenClaimWidgetStories.tsx Adds environment and initial-tab inputs.
examples/​storybook/​src/​stories/​governance-widget/​GovernanceWidget.mdx Documents environment availability.
examples/​storybook/​src/​stories/​governance-widget/​GovernanceOnboarding.stories.tsx Moves onboarding stories under QA.
examples/​storybook/​src/​stories/​goodreserve-widget/​GoodReserveWidgetThemeOverrides.stories.tsx Adds theme playground.
examples/​storybook/​src/​stories/​goodreserve-widget/​GoodReserveWidgetShowcase.stories.tsx Retains live showcase stories.
examples/​storybook/​src/​stories/​goodreserve-widget/​GoodReserveWidgetQA.stories.tsx Adds deterministic reserve fixtures.
examples/​storybook/​src/​stories/​goodreserve-widget/​GoodReserveWidget.mdx Adds integrator documentation.
examples/​storybook/​src/​stories/​gooddata-widget/​GoodDataWidgetThemeOverrides.stories.tsx Adds theme playground.
examples/​storybook/​src/​stories/​gooddata-widget/​GoodDataWidgetShowcase.stories.tsx Adds live-connector showcase.
examples/​storybook/​src/​stories/​gooddata-widget/​GoodDataWidgetQA.stories.tsx Renames the QA namespace.
examples/​storybook/​src/​stories/​gooddata-widget/​GoodDataWidget.mdx Adds integrator documentation.
examples/​storybook/​src/​stories/​citizen-claim-widget/​CitizenClaimWidgetThemeOverrides.stories.tsx Adds theme playground.
examples/​storybook/​src/​stories/​citizen-claim-widget/​CitizenClaimWidgetShowcase.stories.tsx Adds environment controls.
examples/​storybook/​src/​stories/​citizen-claim-widget/​CitizenClaimWidget.mdx Documents controls and theming.
examples/​storybook/​src/​stories/​ai-credits-widget/​AiCreditsWidgetThemeOverrides.stories.tsx Adds theme playground.
examples/​storybook/​src/​stories/​ai-credits-widget/​AiCreditsWidgetShowcase.stories.tsx Removes the mock fixture from Showcase.
examples/​storybook/​src/​stories/​ai-credits-widget/​AiCreditsWidgetQA.stories.tsx Moves the mock fixture into QA.
examples/​storybook/​src/​stories/​ai-credits-widget/​AiCreditsWidget.mdx Updates showcase and QA guidance.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +133 to +140
dark_Card: {
background: args.darkCardBackground,
borderColor: args.darkCardBorderColor,
},
light_Card: {
background: args.lightCardBackground,
borderColor: args.lightCardBorderColor,
},
export default meta
type Story = StoryObj<OverridesArgs>

export const Playground: Story = {
export default meta
type Story = StoryObj<OverridesArgs>

export const Playground: Story = {
export default meta
type Story = StoryObj<OverridesArgs>

export const Playground: Story = {
export default meta
type Story = StoryObj<OverridesArgs>

export const Playground: Story = {
Comment on lines +170 to +174
<GoodReserveWidget
provider={provider}
mockState={reserveWidgetMockStates.idleBuy}
defaultTheme="dark"
themeOverrides={themeOverrides}
<CitizenClaimWidget
provider={provider}
environment="development"
environment={environment}
export default meta
type Story = StoryObj<OverridesArgs>

export const Playground: Story = {
Comment on lines +135 to +139
<li>
<strong>dark_Card / light_Card</strong>: outer widget shell, ActionCard, the
LeaderboardSummary card, and each LeaderboardRow all cascade from this theme —
demonstrated below on the outer shell and ActionCard.
</li>
@goodbounties-nanoclaw-agent

Copy link
Copy Markdown
Contributor Author

Merge order note (per Olivia, Bounty Lead, 2026-10-21): hold this PR until #227 (Thales's AI Credits dashboard fixes) lands first — both touch GoodDataWidgetQA.stories.tsx, goodDataWidgetStories.tsx, and tests/widgets/gooddata-widget/states.spec.ts. Merging #227 first avoids a rebase/conflict on this branch. Please don't merge #253 ahead of #227.

Copy link
Copy Markdown

@Abuchtela is interested in taking the GoodBounty follow-up for #253 (theme-control fixes, CitizenClaim environment remount, shared environment options, and QA evidence). Proposed ETA: November 2, 2026, subject to fork/write access and local test execution. Please confirm whether the bounty can be claimed here or requires a separate claim flow.

@L03TJ3

L03TJ3 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

@Abuchtela assignments for issues happens in the issues, not in the pull-requests.
its also already assigned: #264

@0xOlivanode 0xOlivanode left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bounty lead review for #264, at 4c5da5f.

Thanks @Ryjen1, this covers the bounty well, and thanks @Olisehgenesis for the review.

Checked against #264:

  • Bug 1 background controls: Pass (wired to backgroundSurface/backgroundInput, visible in light and dark screenshots)
  • Bug 1 copy correction: Partial (border-color copy on GoodReserve still inaccurate, see inline)
  • Bug 2 environment remount: Pass, with tests
  • Screenshots: Pass
  • environmentOptions helper: Pass
  • Optional smoke tests: Pass
  • Scope (Storybook/docs/tests only): Pass
  • Copilot: Pass, apart from the border-color question it left for a human (inline 1)
  • Signed commits: Fail (8 of 14 unsigned: everything from Oct 30 and Nov 1)
  • Required commands: Not verified (CI needs maintainer approval)

To finish:

  1. Resolve the GoodReserve border-color control (inline 1 and 2): confirm it reaches the swap shell and fix the copy, or wire/remove it. Relabelling a control that does nothing visible isn't enough under #264.
  2. Re-sign the unsigned commits (e.g. rebase with signing and force-push), as the contribution guide requires signed commits.
  3. Post the #264 handoff comment (what changed, what was tested, evidence, remaining risks), and a short acknowledgement of Oliseh's non-blocking follow-ups.

Inline 3 and 4 are nits.

Non-blocking, for a follow-up rather than this PR: the custom presets only recolour some accents, so the demo mixes violet (buttons, borders) with the default blue (titles, MAX, icons, links). And the docs callouts render in a serif font, which comes from the shared DocsLayout, not this PR. Both are worth a small polish issue.

@L03TJ3 once these are in, I'm happy to sign off. CI workflows need your approval to run.

darkCardBorderColor: string
lightCardBackground: string
lightCardBorderColor: string
darkButtonBackground: string

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the open question Copilot left for a human. The control says it “styles swap shell and amount card borders”, but ReserveAmountCard has borderWidth: 0, so it can’t style the amount panels. And in the committed screenshots (grw-theme-overrides-dark/light.png), the shell border doesn’t look like the
#7C3AED default either. It reads as the base grey/lavender, while the same control on AiCredits clearly shows violet borders. Can you check whether dark_Card.borderColor actually reaches ReserveSwapShell? If it does, fix the description to say shell only. If it doesn’t, wire it to a key that works, or remove it and note the limitation. #264 says relabelling a control that still does nothing isn’t enough.

parameters: { layout: 'padded' },
argTypes: {
darkCardBackground: { control: 'color', description: 'themes.dark_Card.background' },
darkCardBorderColor: { control: 'color', description: 'themes.dark_Card.borderColor' },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue in the docs: amount cards have no border, so please correct this line to match whatever comment 1 ends up doing.

@@ -104,21 +109,24 @@ function CitizenClaimWidgetStoryShell({
return (
<CitizenClaimWidget

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: key={environment} is set on both the wrapper div and the CitizenClaimWidget inside it (line 112). One is enough; the outer one already forces the remount. Also, data-testid moved from the widget onto the wrapper. Please confirm no existing tests or docs relied on it being on the widget.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the address was made valid by appending a 0, which turns it into a different, arbitrary address. That’s fine for a mock, but a short comment saying it’s a placeholder (or a clearly fake address like 0x000...dEaD) would stop anyone treating it as a real account later.

* refactor(storybook): extract ENVIRONMENT_OPTIONS to shared helper

* fix(storybook): add remount key on environment change in CitizenClaim stories

* fix(storybook): wire background controls to correct base theme keys in Theme overrides

* test(storybook): add Playwright smoke tests for theme overrides and showcase controls

* test(storybook): verify CitizenClaim remount across environment switches with mock provider

* docs(storybook): update GoodReserve MDX, document theme cascading, and add theme screenshots

* docs(storybook): clarify backgroundSurfaceAlt limitation on GoodReserve token badges

* test(storybook): verify dynamic in-place theme controls and environment remount

* fix(storybook): split dark/light theme override background controls and capture full-page screenshots

* fix(storybook): resolve blockers B1-B3 with deterministic showcase RPC fixtures and improved contrast

* fix(storybook): account for Fuse 2-decimal scaling in daily-stats fixture

* fix(storybook): restore Card border-color controls in theme overrides stories

* fix(storybook): restore deterministic fixture provider for Superfluid theme playground

* fix(storybook): memoize custodial fixture provider in ThemedSuperfluidStory

* fix(storybook): remove no-op GoodReserve border controls

* fix(storybook): simplify CitizenClaim fixture remount
if (method === 'eth_chainId') {
const url = request.url()
let chainIdHex = '0xa4ec' // Celo (42220)
if (url.includes('fuse.io')) chainIdHex = '0x7a' // Fuse (122)
const url = request.url()
let chainIdHex = '0xa4ec' // Celo (42220)
if (url.includes('fuse.io')) chainIdHex = '0x7a' // Fuse (122)
if (url.includes('ankr.com')) chainIdHex = '0x32' // XDC (50)
@sourcery-ai

sourcery-ai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Linked issues

Checked at commit 756bba6

#252 [PLAN] Widget showcase in storybook · 10 of 11 met

# Requirement Status Notes
1 Demonstrate CitizenClaimWidget primitive Card/Button overrides on reachable surfaces in dark and light themes. ✅ Met The playground targets the identity-verification Button and Invite Rewards placeholder Card, with dark and light examples.
2 Add a CitizenClaimWidget Showcase environment control for development and production only. ✅ Met The control uses the shared options containing development and production, and the helper remounts the widget when the environment changes.
3 Split GoodReserveWidget's 19 fixture stories into QA and its three live stories into Showcase. ✅ Met The QA file contains the fixture stories, while Interactive, InjectedWallet, and LiveWallet are in the Showcase file; related Playwright story IDs are updated.
4 Add GoodReserveWidget primitive theme overrides and an integrator guide. ✅ Met The playground demonstrates base-theme background tokens and Button overrides, and the new MDX guide documents the theme behavior and QA entry point.
5 Do not offer an environment control for GoodReserveWidget. ❌ Not addressed The Showcase still exposes an environment selector, and its guide instructs users to select development or production.
6 Do not make a packages/goodreserve-widget code change for environment selection. ✅ Met No GoodReserveWidget package files are changed.
7 Move GovernanceWidget onboarding stories into QA and document that no environment selector is offered. ✅ Met Onboarding is under the QA namespace, and the MDX explains the development-only deployment and absence of an environment switcher.
8 Move AiCreditsWidget MockBackend into QA and add a theme-overrides playground. ✅ Met MockBackend is exported from the QA stories, and a separate theme playground is linked from the integrator guide.
9 Move SuperfluidCampaignWidget API contract stories into QA and add a theme-overrides playground. ✅ Met The API Contracts title uses the QA namespace, its Playwright references are updated, and the new playground is linked from the guide.
10 Rename GoodDataWidget QA stories, add a live-connector Showcase, and add a theme-overrides playground. ✅ Met The QA title and test references are updated; the Showcase renders without mockState, and the playground demonstrates Button overrides with fixed demo data.
11 Provide integrator MDX guides and deterministic QA coverage for the affected widgets. ✅ Met The diff adds or updates the widget guides, preserves fixture story coverage, and updates the affected Playwright story IDs.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New gaps against the linked issues

# Conflicts:
#	examples/storybook/src/stories/goodreserve-widget/GoodReserveWidgetShowcase.stories.tsx
#	examples/storybook/src/stories/helpers/citizenClaimWidgetStories.tsx
#	examples/storybook/src/stories/helpers/superfluidCampaignWidgetStories.tsx

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New gaps against the linked issues

This branch was successfully deployed

2 active deployments
preview-storybook — 756bba6e Deployed Nov 27, 2026 by sourcery-ai[bot] via preview #780
internal — 756bba6e Deployed Nov 27, 2026 by sourcery-ai[bot] via authorize-preview #780
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.

[PLAN] Widget showcase in storybook

6 participants