-
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
ColorPalette, GradientPicker: fix color picker popover positioning #42989
Changes from all commits
f6ce296
1e9978b
be50c30
72d8b65
e49a463
c0cf5d4
5f2b58e
b984d33
3371ca5
c3fc778
e107ec9
ecf677b
f731cf2
559bb93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -357,6 +357,13 @@ exports[`ColorPalette Dropdown should render it correctly 1`] = ` | |
|
||
<Dropdown | ||
contentClassName="components-color-palette__custom-color-dropdown-content" | ||
popoverProps={ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just noting that this snapshot change is due to a change in |
||
Object { | ||
"__unstableShift": true, | ||
"offset": 8, | ||
"placement": "bottom", | ||
} | ||
} | ||
renderContent={[Function]} | ||
renderToggle={[Function]} | ||
> | ||
|
@@ -728,6 +735,13 @@ exports[`ColorPalette should render a dynamic toolbar of colors 1`] = ` | |
> | ||
<Dropdown | ||
contentClassName="components-color-palette__custom-color-dropdown-content" | ||
popoverProps={ | ||
Object { | ||
"__unstableShift": true, | ||
"offset": 8, | ||
"placement": "bottom", | ||
} | ||
} | ||
renderContent={[Function]} | ||
renderToggle={[Function]} | ||
> | ||
|
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.
Not introduced here, but this is the first time I've seen it.
isRenderedInSidebar
doesn't seem like it should be in the components package. The prop is very specific to the editor's right-hand sidebar. What if there's a sidebar on the left of the screen?It looks like it was a late fix for a WordPress release - #37115. @jorgefilipecosta, as you introduced this would you be willing to revisit it?
My feeling is that it should be more generic, like a
childPopoverPlacement
prop that's passed through to any popovers that should cascade in a given direction.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 agree 100% on this one, and coincidentally I have just opened an issue with a few changes that I'd like to see for
GradientPicker
:For the specific prop, it will largely depend on what we decide design-wise — let's see how this conversation evolves — but in general, I'd love to get rid of that
isRenderedInSidebar
prop (also considering how many times it's forwarded through the various component chain!)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 agree it would be good to get rid of isRenderedInSidebar it was added as a short fix for a visual issue.
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.
@jorgefilipecosta , would you have any capacity to help with the work on this component, also since you are its main author ?
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.
Hi @ciampo, I will try to find some availability to work on some enhancements to this component.
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.
That's great, thank you! I've assigned the issue with the list of enhancements — feel free to ping for any help and for reviews :)