Make the Help dropdown and Light/Dark Mode dropdown UI consistent#30575
Open
ahaywood wants to merge 2 commits intoproductionfrom
Open
Make the Help dropdown and Light/Dark Mode dropdown UI consistent#30575ahaywood wants to merge 2 commits intoproductionfrom
ahaywood wants to merge 2 commits intoproductionfrom
Conversation
Replace the Starlight ThemeSelect component with a custom ThemeSelectDropdown React component. Add width constraint wrapper and remove associated CSS rules for the old component. Add React JSX type definition for starlight-theme-select custom element. Format multi-property transition declarations across multiple lines for consistency.
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Contributor
|
Preview URL: https://038b48c5.preview.developers.cloudflare.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Before:
The Help dropdown menu and the light / dark mode dropdown did not match:
After:
The items were displayed differently because the Gelp dropdown implemented a React dropdown menu. The light/dark mode dropdown utilized a standard HTML
select.This PR moves the light/dark mode dropdown to a React dropdown (
ThemeSelectDropdown) that matches the help menu and replaces the StarlightThemeSelectcomponent.I kept a hidden
selectinput within the new React component so that the code continues to leverage the pre-existing JavaScript listener andStarlightThemeProvider.Screenshots
In the video, the content flash signals a page refresh:
https://github.com/user-attachments/assets/79ffe65f-fda5-47a3-84ba-a39a4e5e9fd9