Skip to content
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

Edit Widgets and Base Styles: Standardize reduced motion handling using media queries #68427

Conversation

Infinite-Null
Copy link
Contributor

@Infinite-Null Infinite-Null commented Dec 31, 2024

Part of: #68282

What?

Refactors animation and transition styles to use media not (prefers-reduced-motion) for improved accessibility, ensuring a better experience for users who prefer reduced motion.

Why?

It addresses instances where animations and transitions were not optimized for Edit Widgets and Base Styles for individuals with reduced motion settings, ensuring a smoother and more inclusive user experience.

How?

It addresses instances where animations and transitions were not optimized for Data Views for individuals with reduced motion settings, ensuring a smoother and more inclusive user experience.

@media not (prefers-reduced-motion) {
       transition: transform cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s;
}

Screencast:

2025-01-03_12-14-43.mp4

@Infinite-Null Infinite-Null marked this pull request as ready for review January 3, 2025 06:58
Copy link

github-actions bot commented Jan 3, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Infinite-Null <[email protected]>
Co-authored-by: t-hamano <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Infinite-Null
Copy link
Contributor Author

Hi @t-hamano,

I have implemented reduced motion handling using media queries for the Edit Widgets and Base Styles. Please look at it at your convenience.

Thank you!

@t-hamano t-hamano added [Type] Code Quality Issues or PRs that relate to code quality [Package] Edit Widgets /packages/edit-widgets [Package] Base styles /packages/base-styles labels Jan 3, 2025
@t-hamano t-hamano self-requested a review January 3, 2025 13:41
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM!

  • ✅ All the changes you made work just as they did before.
  • ✅ I also confirmed that I can build Storybook (see this comment for why I tested this).

@t-hamano t-hamano added the props-bot Adding this label triggers the Props Bot workflow for a PR. label Jan 3, 2025
@github-actions github-actions bot removed the props-bot Adding this label triggers the Props Bot workflow for a PR. label Jan 3, 2025
@t-hamano t-hamano merged commit 19043c9 into WordPress:trunk Jan 3, 2025
74 of 78 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.1 milestone Jan 3, 2025
@t-hamano
Copy link
Contributor

t-hamano commented Jan 3, 2025

@tyxla I think this PR should not break Storybook. In fact, the Storybook build for this PR on CI passed. However, we did run into an issue with the edit-site package (See this comment).

The issue with the edit-site package has been resolved in #68464. Also, a solution to this issue is explored in this comment.

bph pushed a commit to bph/gutenberg that referenced this pull request Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Base styles /packages/base-styles [Package] Edit Widgets /packages/edit-widgets [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants