Skip to content

fix(storybook): finalize widget showcase theme controls, environment remount, and deterministic RPC tests (#264) - #292

Open
cyzcz wants to merge 10 commits into
GoodDollar:feat/gw250-storybook-showcasefrom
cyzcz:fix/gw264-storybook-showcase-complete
Open

cyzcz wants to merge 10 commits into
GoodDollar:feat/gw250-storybook-showcasefrom
cyzcz:fix/gw264-storybook-showcase-complete

Conversation

@cyzcz

@cyzcz cyzcz commented Nov 7, 2026

Copy link
Copy Markdown

Summary

Finalizes PR #253 (feat/gw250-storybook-showcase) for #264, including all fixes from #272 plus deterministic mocked-RPC verification for the CitizenClaimWidget environment switch.

Closes #264

Changes

  1. Bug 1 — Theme Override Background Controls & Docs Copy:
    • Rewired non-functional dark_Card.background / light_Card.background controls on AiCreditsWidget, GoodReserveWidget, and SuperfluidCampaignWidget playgrounds to separate, readable dark and light base theme surface tokens (backgroundSurface, backgroundInput, backgroundDark), and documented the token cascade and backgroundSurfaceAlt badge limitation in DocsCallout and MDX docs.
  2. Bug 2 — CitizenClaimWidget Environment Switching:
    • Added key={environment} to <CitizenClaimWidget> inside CitizenClaimWidgetStoryShell so switching environment in Storybook remounts the widget and refreshes contract reads.
  3. Shared ENVIRONMENT_OPTIONS Helper:
    • Extracted ENVIRONMENT_OPTIONS into examples/storybook/src/stories/helpers/environmentOptions.ts.
  4. Deterministic Playwright Regression Suite (tests/widgets/citizen-claim-widget/showcase.spec.ts):
    • Fixed the 39-hex-character invalid wallet address (0x329377cbeeF39f01b0Ea04B80465c9eB47D3ED12, 20 bytes / 40 hex chars).
    • Intercepted Celo/Fuse/XDC RPC eth_call requests with distinct ABI-encoded entitlements for development (10 G$ from 0x6b86...7c5f) vs. production (42 G$ from 0x43d7...ea4a1), asserting both DOM remount and that the rendered entitlement updates from 10 to 42 upon switching environment in-place.
    • Added fullPage: true to all Theme Overrides and Showcase Playwright screenshot captures.

This branch is waiting to be deployed

1 waiting deployment
external — 03728d0d Waiting Nov 7, 2026 by cyzcz via authorize-preview #562
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.

2 participants