-
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
Global Styles: Fix palette color popovers #49975
Global Styles: Fix palette color popovers #49975
Conversation
Size Change: +139 B (0%) Total Size: 1.37 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.
Nice! I'm assuming this will also close #49040?
The approach looks good to me, and perhaps would be the same approach to take to remove all the __experimentalIsRenderedInSidebar
props in the codebase.
458a2b8
to
b1ac9e2
Compare
Thanks for the sanity check and the related issue link @mirka 👍 This PR should address #49040. I've tweaked the Screen.Recording.2023-04-24.at.11.09.50.am.mp4
This might be something I could help chip away at in follow-ups. |
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.
I had some minor comments, but overall looks great 🚀 Thanks for fixing up the Storybook example as well.
I guess it's worth explicitly mentioning that the positioning of the Gradient popovers haven't been fully resolved. Not a blocker for this PR merging though, since it's already incrementally better.
Thank you for reviewing this one again @mirka 🙇 I think most of the feedback has been addressed. I did have a couple of follow-up questions/comments though that I left in reply to your review comments. I'll hold off on merging this for the moment to make sure that my latest changes are still in the right direction. |
I've put up a PR to reposition the gradient palette popovers based on this PR: #50233. I don't know what should happen with the duotone palette there. On trunk, no popover is displayed even at larger viewports. It's possible it isn't supposed to be there at all 🤷. I'll look into the code and any existing issues for that separately. |
1efa153
to
1f6490c
Compare
To close the loop on this, the duotone palette was intentionally uneditable (see #36920). There are some ongoing explorations to make duotone filters editable via Global Styles (e.g. #49265). |
Fixes: #41894
Fixes: #49040
What?
Why?
shift
prop on the palette color pickers they are rendered outside the viewport on smaller screensshift
is added to the palette color pickers they overlay the individual color elements that triggered them, adding the ability to pass through popover props will allow for fine-tuning the positioning of the popovers in a follow up.How?
ColorPickerPopover
PaletteEdit
componentuseViewportMatch
and the newpopoverProps
to tweak the palette popovers when on small viewportsNext Steps
In a follow-up, we can refine the popover placement, including which elements they may be anchored to.
Testing Instructions
Screenshots or screencast
Screen.Recording.2023-04-21.at.2.26.49.pm.mp4
Screen.Recording.2023-04-21.at.2.20.40.pm.mp4