Skip to content

feat(frontend): resolve Storybook component stories and prevent dark mode flicker (#1478, #1482) - #1507

Merged
joelpeace48-cell merged 1 commit into
FinesseStudioLab:mainfrom
Queenode:fix/queenode-issues-1478-1482
Oct 22, 2026
Merged

joelpeace48-cell merged 1 commit into
FinesseStudioLab:mainfrom
Queenode:fix/queenode-issues-1478-1482

Conversation

@Queenode

Copy link
Copy Markdown

Summary

Targeted fixes addressing the 2 assigned frontend issues (#1478, #1482) for @Queenode in Stellar Wave:

  1. frontend: Storybook stories missing for core campaign card components #1478 — Storybook stories missing for core campaign card components

    • Added stories for CampaignCard in all core states: Loading, Active, Ended, Claimed, Featured, Upcoming, and DarkMode.
    • Created RewardBadge and ClaimButton components with full Storybook stories (frontend/src/stories/RewardBadge.stories.jsx, frontend/src/stories/ClaimButton.stories.jsx).
    • Configured Chromatic visual diff action step in .github/workflows/visual-regression.yml.
  2. frontend: dark mode flicker on initial page load due to missing theme pre-init script #1482 — Dark mode flicker on initial page load

    • Moved theme pre-initialization script to <head> before render in index.html.
    • Applies data-theme, style.colorScheme, theme class, and immediate background color on the root element before first paint to completely eliminate the white background flash on hard reload.
    • Added Playwright visual regression test for initial load in dark mode in frontend/tests/visual/pages.spec.ts.

Motivation / Context

Closes #1478
Closes #1482

Changes

  • frontend/index.html: Moved theme script to head to pre-initialize theme dataset, color-scheme, class, and background.
  • frontend/src/components/RewardBadge.jsx: Created RewardBadge component.
  • frontend/src/components/ClaimButton.jsx: Created ClaimButton component.
  • frontend/src/stories/CampaignCard.stories.jsx: Added stories for loading, active, ended, claimed, and featured states.
  • frontend/src/stories/RewardBadge.stories.jsx: Storybook stories for RewardBadge.
  • frontend/src/stories/ClaimButton.stories.jsx: Storybook stories for ClaimButton.
  • frontend/tests/visual/pages.spec.ts: Added visual test for dark mode initial load without flash.
  • .github/workflows/visual-regression.yml: Configured Chromatic visual diff step in CI.

…mode flicker (FinesseStudioLab#1478, FinesseStudioLab#1482)

- FinesseStudioLab#1478: Add CampaignCard stories for loading, active, ended, claimed, and featured states. Implement RewardBadge and ClaimButton components with full Storybook stories. Configure Chromatic visual diff step in CI workflow.
- FinesseStudioLab#1482: Move inline theme pre-initialization script to <head> in index.html to apply theme dataset, color-scheme, and class before render, eliminating white flash on initial load. Add Playwright visual test for dark mode initial load.

Closes FinesseStudioLab#1478, Closes FinesseStudioLab#1482
@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@Queenode 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

@joelpeace48-cell
joelpeace48-cell merged commit ad93b9d into FinesseStudioLab:main Oct 22, 2026
5 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants