Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export const ThemeSelector = ({ id }) => {
)}
shouldFocusToggleOnSelect
onOpenChangeKeys={['Escape']}
popperProps={{ position: 'right', preventOverflow: true, enableFlip: true }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we default to right when there's probably room to show it on the left?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It flips when there's space! The other dropdown in the nav is right aligned already.

Screenshot 2025-09-16 at 3 28 49 PM

Copy link
Copy Markdown
Contributor

@mcoker mcoker Sep 16, 2025

Choose a reason for hiding this comment

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

Oh sorry I was specifically referring to the one in the masthead, which is the most prominent one. On org it's left aligned currently, but right aligned in this PR:

Org
Screenshot 2025-09-16 at 2 56 31 PM

This PR (added an extra user menu just to show there's space for it to be positioned to the left)
Screenshot 2025-09-16 at 2 56 54 PM

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Right! The release dropdown is right positioned already so I made it match. It looks a little funky to me otherwise, but I ultimately don't really care.

Screenshot 2025-09-16 at 4 10 47 PM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh gotcha! I didn't realize you were comparing it to the version switcher. Checked with @lboehling and she's good with this change and prefers right aligned things here in general (search bar slides out from the right, too) 🚀

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Let's go with Sarah's; she backed out the other changes in her draft!

>
<SelectGroup>
<SelectList aria-label="Light/Dark theme switcher">
Expand All @@ -117,35 +118,36 @@ export const ThemeSelector = ({ id }) => {
</SelectOption>
</SelectList>
</SelectGroup>
{process.env.hasHighContrastSwitcher && (<>
<Divider />
<SelectGroup label="High Contrast">
<MenuSearch>
<MenuSearchInput>
<ToggleGroup aria-label="High contrast theme switcher">
<ToggleGroupItem
text="System"
buttonId={highContrastModes.SYSTEM}
isSelected={highContrastMode === highContrastModes.SYSTEM}
onChange={handleHighContrastThemeSelection}
/>
<ToggleGroupItem
text="On"
buttonId={highContrastModes.ON}
isSelected={highContrastMode === highContrastModes.ON}
onChange={handleHighContrastThemeSelection}
/>
<ToggleGroupItem
text="Off"
buttonId={highContrastModes.OFF}
isSelected={highContrastMode === highContrastModes.OFF}
onChange={handleHighContrastThemeSelection}
/>
</ToggleGroup>
</MenuSearchInput>
</MenuSearch>
</SelectGroup>
</>
{process.env.hasHighContrastSwitcher && (
<>
<Divider />
<SelectGroup label="High Contrast">
<MenuSearch>
<MenuSearchInput>
<ToggleGroup aria-label="High contrast theme switcher">
<ToggleGroupItem
text="System"
buttonId={highContrastModes.SYSTEM}
isSelected={highContrastMode === highContrastModes.SYSTEM}
onChange={handleHighContrastThemeSelection}
/>
<ToggleGroupItem
text="On"
buttonId={highContrastModes.ON}
isSelected={highContrastMode === highContrastModes.ON}
onChange={handleHighContrastThemeSelection}
/>
<ToggleGroupItem
text="Off"
buttonId={highContrastModes.OFF}
isSelected={highContrastMode === highContrastModes.OFF}
onChange={handleHighContrastThemeSelection}
/>
</ToggleGroup>
</MenuSearchInput>
</MenuSearch>
</SelectGroup>
</>
)}
</Select>
);
Expand Down