-
Notifications
You must be signed in to change notification settings - Fork 208
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
fix(toast): switches toast[open] to use visibility hidden to fix overlay handling #3511
Conversation
Tachometer resultsChrometoast permalink
Firefoxtoast permalink
|
] as [Placement, string][] | ||
).map(([placement, variant]) => { | ||
return html` | ||
<overlay-trigger |
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.
We probably should not insinuate that Toast elements can/should be opened on hover
. I think if this was set up at type="click"
and the slot was slot="click-content"
that we'd be pretty good to go here!
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.
haha yes good point.
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.
addressed in 592bdbd
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.
Looks a little unique, but otherwise looks pretty good to go!
If you could cycle the VRTs, we'll be able to merge this and have it out to you sometime next week.
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.
LGTM! Thanks @benjamind
Description
Switches
sp-toast
to use the same behavior assp-tooltip
for controlling visibility with the[open]
attribute. This switches fromdisplay: none
tovisibility:hidden
which means the element now has size when hidden allowing the overlay behavior to properly measure it and therefore position it.Related issue(s)
#3510
Motivation and context
Fixes the placement in overlays.
How has this been tested?
Added storybook to cover this case, and tested locally in Chrome.
Screenshots (if appropriate)
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.