Skip to content

feat(website): replace theme dropdown with toggle button - #484

Merged
anurag629 merged 2 commits into
codercops:devfrom
anurag2787:fix/theme
Oct 30, 2026
Merged

anurag629 merged 2 commits into
codercops:devfrom
anurag2787:fix/theme

Conversation

@anurag2787

Copy link
Copy Markdown
Collaborator

What does this change?

Replaced Starlight's theme dropdown with a toggle button that switches between light and dark modes

Closes #481

How I tested this

Ran pnpm --filter website build and verified the toggle in both themes on desktop and mobile

AI assistance

ChatGPT was used to help with the implementation and tests

Checklist

  • This PR targets dev
  • I was assigned the linked issue
  • pnpm -r build, pnpm test and pnpm -r typecheck pass locally
  • Tests added or updated where it makes sense
  • For a bug fix: the new test fails without my change
  • Changeset added (pnpm changeset) if this changes core, widget or server
  • pnpm api run and api/ committed if an exported type or option changed
  • Docs updated if behavior or options changed
Screencast.from.2026-10-30.21-55-45.mp4

anurag2787 and others added 2 commits October 30, 2026 21:51
Signed-off-by: Anurag Yadav <anuragyadav2787@gmail.com>
@anurag2787

Copy link
Copy Markdown
Collaborator Author

Hi @anurag629 could you please review and let me know if any changes required
Thanks!

@anurag629 anurag629 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @anurag2787, this is what #481 asked for, done the right way: Starlight's component override, the same starlight-theme key, the system setting until the visitor picks, and a label that says what a click does. I built the site and tried it in Chrome with the system set to dark and to light. It starts in the system theme, a click switches and saves the choice, the label flips, Enter works from the keyboard, and the choice survives a reload. The toggle is in the mobile menu too. The website build, lint (same as dev) and docs:check pass. Merging once CI is green.

@anurag629
anurag629 merged commit f462a1d into codercops:dev Oct 30, 2026
5 checks passed
@anurag629 anurag629 added the hacktoberfest-accepted PR counts for Hacktoberfest label Oct 30, 2026
@anurag629

Copy link
Copy Markdown
Member

Merged, thanks @anurag2787. It goes live with the next production deploy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PR counts for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI Improvement] Replace Theme Dropdown with a Toggle Button

2 participants