Skip to content

fix(ThemeSelector): Adjust popperProps#4787

Closed
rebeccaalpert wants to merge 1 commit into
patternfly:mainfrom
rebeccaalpert:select
Closed

fix(ThemeSelector): Adjust popperProps#4787
rebeccaalpert wants to merge 1 commit into
patternfly:mainfrom
rebeccaalpert:select

Conversation

@rebeccaalpert
Copy link
Copy Markdown
Member

@rebeccaalpert rebeccaalpert commented Sep 15, 2025

Prevent theme selector from overflowing container. OK if we want to drop in favor of #4779; Sarah has the fix there too. I'd just want to assign the ticket to her so she gets credit.

Prevent theme selector from overflowing container.
@patternfly-build
Copy link
Copy Markdown
Collaborator

Preview: https://pf-org--pr-4787-site.surge.sh

)}
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!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug - Select - menu doesn't auto flip left/right

5 participants