Skip to content

Restyled the theme switcher in the nav to a switch rather than a button for improved UX#173

Draft
AlexanderChernyshev wants to merge 1 commit intocloudflare:mainfrom
AlexanderChernyshev:theme-toggle-restyling
Draft

Restyled the theme switcher in the nav to a switch rather than a button for improved UX#173
AlexanderChernyshev wants to merge 1 commit intocloudflare:mainfrom
AlexanderChernyshev:theme-toggle-restyling

Conversation

@AlexanderChernyshev
Copy link
Copy Markdown
Contributor

Changing the theme switcher element in the top-nav from a button to a switch to improve UX by adjusting the design to be intuitive to the user. This way it is clearer what change will happen when "throwing" the switch without the user needing to interact with it.

Changes were made with the assistance of Google's Gemini AI.

@AlexanderChernyshev AlexanderChernyshev requested a review from a team March 4, 2026 01:15
Copy link
Copy Markdown
Member

@sergeychernyshev sergeychernyshev left a comment

Choose a reason for hiding this comment

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

Looks like server-side rendering for the switch is not working, it only switches when JS kicks in.

@sergeychernyshev sergeychernyshev marked this pull request as draft March 4, 2026 02:01
@sergeychernyshev
Copy link
Copy Markdown
Member

It might be a good idea to try to see if it can use radio buttons and apply CSS based on the value of a button rather than a class on the :root element which would allow the switch to work without JS at all.

You will still need to set the cookie using JS when it loads though.

@sergeychernyshev sergeychernyshev added the ticket This label indicates that internal ticket was created to track it. label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ticket This label indicates that internal ticket was created to track it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants