Skip to content

fix(web): let visitors pick light or dark on the product page - #22

Merged
joshchen-dev merged 1 commit into
mainfrom
claude/great-shannon-b4y5vi
Oct 24, 2026
Merged

joshchen-dev merged 1 commit into
mainfrom
claude/great-shannon-b4y5vi

Conversation

@joshchen-dev

@joshchen-dev joshchen-dev commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Problem

The product page only followed the system color scheme, so on a dark system it was always dark and visitors couldn't switch.

Fix

  • A theme switch on the product page. It's the app's own System / Light / Dark control (ThemeToggle), in the header on desktop and in the footer on phones.
  • Saved and shared. The choice is stored in raidy-theme like the app's, so it survives reloads and carries over to the demo. The product page's startup script now matches the app's, so the saved theme applies before first paint.
  • Screenshots follow the chosen theme instead of the system setting.
  • One shared hook. The theme logic moves from App.tsx into useTheme() in web/src/lib/theme.ts, so both pages behave the same.

Release v0.0.20.

Tests

A new Playwright test, starting with the system in dark mode:

  • choosing Light switches the page to light
  • the choice survives a reload
  • the demo opens in light too

npm run check, format:check, build:pages, and the full Playwright suite (33 passed) all pass locally. I checked the switch's selected state and its look with screenshots.

The product page only followed the system color scheme, so on a dark
system it was always dark. It now has the same System / Light / Dark
switch as the app, saved per browser and shared with the demo, and the
screenshots follow the chosen theme.

The theme logic moves out of App.tsx into a shared useTheme hook so both
pages behave the same.

Release v0.0.20.
@joshchen-dev
joshchen-dev merged commit ce24a3a into main Oct 24, 2026
1 check passed
@joshchen-dev
joshchen-dev deleted the claude/great-shannon-b4y5vi branch October 24, 2026 03:50
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.

1 participant