-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Border Controls/Color Palette: Ensure popovers remain within small viewports #41930
Border Controls/Color Palette: Ensure popovers remain within small viewports #41930
Conversation
a055d70
to
9d7964e
Compare
9d7964e
to
b1136e6
Compare
Size Change: +7 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this up @aaronrobertshaw! This is getting the ColorPicker to show within the smaller viewports now, while not affecting the positioning on desktop viewport sizes:
Color picker is now visible in global styles | Custom color picker can be viewed in inspector controls | Color pickers are now visible for BoxControl and split controls |
---|---|---|
As you mention in the PR description, some of the repositioning of the popovers is a bit clunky, but I agree, it'd be good to get this visibility fix in as a priority, and we can investigate the ideal positioning within the viewport in follow-ups 👍
Related:
What?
Ensures that BorderControl and BorderBoxControl popovers are positioned within smaller viewports.
Note: The automatic repositioning of popovers since the floatingUI changes is a little clunky. This PR only aims to restore the popovers to the viewport so they are usable until we refine the popover behaviour more generally.
Why?
After the switch to using floatingUI library for Popovers, they aren't repositioned by default when they fall outside the viewport. Without this the popovers are unusable.
How?
Turns on
__unstableShift
for the border control popovers as well as the custom color picker popover.Testing Instructions
Screenshots or screencast
Screen.Recording.2022-06-29.at.11.48.34.am.mp4
Screen.Recording.2022-06-29.at.11.45.19.am.mp4