fix(Alert): create alert group variables for toast animation#7305
fix(Alert): create alert group variables for toast animation#7305mcoker merged 1 commit intopatternfly:mainfrom
Conversation
|
Preview: https://patternfly-pr-7305.surge.sh A11y report: https://patternfly-pr-7305-a11y.surge.sh |
0ced7ff to
fe7125b
Compare
srambach
left a comment
There was a problem hiding this comment.
I think I found a couple of little things keeping the default fade from working in reduced-motion.
I wonder if we could do away with some variables if we move the media query into the variables, but I'm not sure if it comes out any simpler or not, or if we'd want those variables for customization (my inclination is that customizing them is not necessary). Maybe it's worth chatting about since we are kind of breaking new ground using the reduced-motion preference. @mcoker
| --#{$alert-group}--m-toast--ZIndex: var(--pf-t--global--z-index--2xl); | ||
|
|
||
| // Alert group item addition reduced motion | ||
| --#{$alert-group}--m-toast__item--TransitionDuration--opacity--default: var(--pf-t--global--motion--duration--fade--opacity--default); |
There was a problem hiding this comment.
I think this token should be --pf-t--global--motion--duration--fade--default, so then this variable isn't defined and that's ultimately causing the opacity change not to happen in reduced motion.
62cece7 to
1bca732
Compare
|
@srambach I've updated these changes, so that at reduced-motion, |
srambach
left a comment
There was a problem hiding this comment.
I was going to start #7341 to fix an issue we noticed in patternfly/patternfly-react#11495 but I realized it would be better to address here. Left 2 teensy changes that should fix the animation as intended. (i.e. on the transition in from the top, the item will not wait until the "hole" opens before sliding into the slot; it all happens at the same time)
1bca732 to
8fca86e
Compare
|
Removed transition delays which addresses #7341 |
srambach
left a comment
There was a problem hiding this comment.
Hey, I noticed one more bug that would be good to fix here too if you don't mind - I think the pf-v6-c-alert-group__item needs to have a min-height: 0; Without it, you can see that there's still a bit of space when you take a toast alert offstage right.
2025-02-18_12-01-59.mp4
8fca86e to
8901946
Compare
|
@srambach Added the pf-m-offstage-right.mp4 |
mcoker
left a comment
There was a problem hiding this comment.
Sweet! Good job on these.
|
🎉 This PR is included in version 6.2.0-prerelease.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
fixes #6812