-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Add SlotFillProvider to story to correct tooltip positioning #39674
Conversation
Size Change: 0 B Total Size: 1.21 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.
Worked as advertised for me
Thanks for the review @glendaviesnz 👍 Given @mirka has already seen this approach as part of #37769 where we encountered this problem and the solution there was approved, I'll merge this now. I also intend to create another PR updating the components package docs to warn of this tooltip issue and provide code examples for consumers outside of our block/site editors. |
What?
The positioning of tooltips for the
ColorPalette
storybook example are misaligned. This PR corrects this and brings their positioning more inline with what is seen when theColorPalette
is used in the editor.Why?
The current story on
trunk
only renders theColorPalette
component directly. This means that the story doesn't have a slot fill provider allowing tooltips to be rendered in their correct positions.How?
In the
ColorPalette
storybook example, this PR wraps the component in a SlotFill provider and includes thePopover.Slot
as a sibling.Testing Instructions
trunk
and fire up the storybook, navigating to theColorPalette
componentColorPalette
. The tooltips should now be positioned better.Screenshots or screencast