Skip to content

fix(menu): respect prefers reduced motion for drilldown - #7553

Merged
mcoker merged 1 commit into
patternfly:mainfrom
srambach:6739-new-reduced-motion-drilldown
Jun 3, 2025
Merged

mcoker merged 1 commit into
patternfly:mainfrom
srambach:6739-new-reduced-motion-drilldown

Conversation

@srambach

@srambach srambach commented May 28, 2025 •

Copy link
Copy Markdown
Member

Fixes #6739

Adds support for the prefers-reduced-motion media query to the Menu component drilldown menu.

Changes:
Set default transition duration to 0s for all transitions
Apply standard transition durations only for users who don't prefer reduced motion
Instead of removing transitions, I had to set the durations to 0s; otherwise the menu did not behave properly.
Setting the overall menu transition duration was necessary or else the nested menus would still have a transition duration and show the translate happening.
That said, the 0s duration does not seem to affect the fade in of other menus - that seems like it might still be coming from Popper despite the !important declaration.

@andrew-ronaldson I left the transition on the height - do you think it should be removed as well?

@patternfly-build

patternfly-build commented May 28, 2025 •

Copy link
Copy Markdown
Collaborator

@sg00dwin sg00dwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@srambach

Copy link
Copy Markdown
Member Author

@andrew-ronaldson
With reduced motion:

2025-05-29_14-59-57.mp4

@srambach

Copy link
Copy Markdown
Member Author

With full motion:

2025-05-29_15-01-15.mp4

@andrew-ronaldson andrew-ronaldson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfecto

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@mcoker
mcoker merged commit 5ddbdff into patternfly:main Jun 3, 2025
@patternfly-build

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 6.3.0-prerelease.25 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menu - make drill down menu respect prefers-reduced-motion

5 participants