Skip to content

Make the Help dropdown and Light/Dark Mode dropdown UI consistent - #30575

Closed
ahaywood wants to merge 2 commits into
productionfrom
ad/consistent-dropdowns
Closed

Make the Help dropdown and Light/Dark Mode dropdown UI consistent#30575
ahaywood wants to merge 2 commits into
productionfrom
ad/consistent-dropdowns

Conversation

@ahaywood

@ahaywood ahaywood commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Before:

The Help dropdown menu and the light / dark mode dropdown did not match:

Dark Light
CleanShot 2026-05-04 at 14 19 40@2x CleanShot 2026-05-04 at 14 19 30@2x
CleanShot 2026-05-04 at 14 19 18@2x CleanShot 2026-05-04 at 14 19 27@2x

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 Starlight ThemeSelect component.

I kept a hidden select input within the new React component so that the code continues to leverage the pre-existing JavaScript listener and StarlightThemeProvider.

Screenshots

Dark Light
CleanShot 2026-05-04 at 14 12 12@2x CleanShot 2026-05-04 at 14 12 27@2x
CleanShot 2026-05-04 at 14 12 04@2x CleanShot 2026-05-04 at 14 12 25@2x

In the video, the content flash signals a page refresh:
https://github.com/user-attachments/assets/79ffe65f-fda5-47a3-84ba-a39a4e5e9fd9

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.
@ahaywood
ahaywood requested review from a team and kodster28 as code owners May 4, 2026 19:28
@github-actions github-actions Bot added the size/m label May 4, 2026
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
*.astro @cloudflare/content-engineering, @kodster28
/src/components/ @cloudflare/content-engineering, @kodster28
*.ts @cloudflare/content-engineering, @kodster28

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Hey there, we've marked this pull request as stale because there's no recent activity on it. This label helps us identify PRs that might need updates (or to be closed out by our team if no longer relevant).

@github-actions github-actions Bot added the stale label May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hey there, we've closed out this pull request because it's been stale for a while and there's been no additional action on it. If these changes are still relevant, open a new pull request (or flag to us in a GitHub issue).

@github-actions github-actions Bot closed this Jun 18, 2026
@github-actions
github-actions Bot deleted the ad/consistent-dropdowns branch July 4, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants