-
Notifications
You must be signed in to change notification settings - Fork 4.7k
ColorPalette: Add SlotFillProvider to story to correct tooltip positioning #39674
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
Conversation
|
Size Change: 0 B Total Size: 1.21 MB ℹ️ View Unchanged
|
glendaviesnz
left a comment
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
ColorPalettestorybook example are misaligned. This PR corrects this and brings their positioning more inline with what is seen when theColorPaletteis used in the editor.Why?
The current story on
trunkonly renders theColorPalettecomponent 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
ColorPalettestorybook example, this PR wraps the component in a SlotFill provider and includes thePopover.Slotas a sibling.Testing Instructions
trunkand fire up the storybook, navigating to theColorPalettecomponentColorPalette. The tooltips should now be positioned better.Screenshots or screencast