-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Widgets Customizer should work without animations and transitions enabled #32024
Comments
The bug is caused by the following rule: |
This subscriber isn't getting called with I don't know the customizer code very well so I'll leave it at that. We could go drill down all the way to the root cause or just go for the |
This is actually a bug in core, so I'm not sure why I didn't post it there 😅. Yes, we can solve it by patching the test plugin, but I'm afraid that the plugin exists for a reason? I wonder if it's an accessibility issue if we don't support it. Maybe some browsers or extensions will automatically register similar override as well? @tellthemachines might have some insights that I'm not aware of 🙇♂️. As for the root cause is along these lines: The |
We should definitely support animations being turned off! Some users have them disabled at a system level for a11y reasons. I'm not sure why we're using that plugin for the e2e tests though. Might be a matter of speed? Not having to wait for animations to finish? |
I did a bit of looking into this. I’m not sure it’s ideal, but this looks to fix the problem referenced in the description:
Some background: I believe the plugin folks are talking about is this one, from the Gutenberg end to end tests. As mentioned by others, it disables animations by setting the times/delay to 0ms. This does, in fact, currently break the Widgets Editor in the Customizer: Disable.Motion.Plugin.Enabled.movAfter the applying the diff above, it looks like this: Disable.Motion.Plugin.Enabled.After.Fix.movAs far as I can tell, the plugin’s behavior is different from the behavior of turning on “Reduce Motion” in OSs/Browsers through the While When I enable Reduce Motion in OSX, and test in Firefox, I see the same animation. No.Reduce.Motion.movReduce Motion enabled: Reduce.Motion.movA little good news, as far as the problem described in the ticket, is that this means that the Widgets Editor in the Customizer looks to load with Reduce Motion in the OS enabled. The animation still happening, even with Reduce Motion, looks like a separate bug needs to be fixed, though. I did a bit of looking and didn’t find an existing issue, so thinking it would be a good idea to open a separate ticket in trac for it. Hopefully this helps! |
I made a Core trac ticket for Reduce Motion for the Customizer sliding transitions mentioned, here: |
@getsource great job getting to the bottom of that!
Would you please create a new diff with that fix so that we can mark this issue as closed? :-) |
Sure! I'll get a core trac ticket created with a patch. I'll link to it here as soon as it's there. This might be tomorrow for me at this point, as I've had a few issues with my core dev environment during the process of creation + testing. |
Ticket with patch created here: |
In addition to skipping animations when a related style doesn't Exist, now checks to see if animation styles are Empty as well. This resolves a case where the Gutenberg End to End tests were failing, due to running with animations disabled. This change should also help some users who are intentionally overriding styles to remove animations. See WordPress/gutenberg#32024 for the original Gutenberg issue. Props zieladam, isabel_brison, kevin940726, desrosj, mikeschroder. Fixes #53562. See #53542. git-svn-id: https://develop.svn.wordpress.org/trunk@51389 602fd350-edb4-49c9-b593-d223f7449a82
In addition to skipping animations when a related style doesn't Exist, now checks to see if animation styles are Empty as well. This resolves a case where the Gutenberg End to End tests were failing, due to running with animations disabled. This change should also help some users who are intentionally overriding styles to remove animations. See WordPress/gutenberg#32024 for the original Gutenberg issue. Props zieladam, isabel_brison, kevin940726, desrosj, mikeschroder. Fixes #53562. See #53542. git-svn-id: https://develop.svn.wordpress.org/trunk@51389 602fd350-edb4-49c9-b593-d223f7449a82
In addition to skipping animations when a related style doesn't Exist, now checks to see if animation styles are Empty as well. This resolves a case where the Gutenberg End to End tests were failing, due to running with animations disabled. This change should also help some users who are intentionally overriding styles to remove animations. See WordPress/gutenberg#32024 for the original Gutenberg issue. Props zieladam, isabel_brison, kevin940726, desrosj, mikeschroder. Fixes #53562. See #53542. Built from https://develop.svn.wordpress.org/trunk@51389 git-svn-id: http://core.svn.wordpress.org/trunk@51000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In addition to skipping animations when a related style doesn't Exist, now checks to see if animation styles are Empty as well. This resolves a case where the Gutenberg End to End tests were failing, due to running with animations disabled. This change should also help some users who are intentionally overriding styles to remove animations. See WordPress/gutenberg#32024 for the original Gutenberg issue. Props zieladam, isabel_brison, kevin940726, desrosj, mikeschroder. Fixes #53562. See #53542. Built from https://develop.svn.wordpress.org/trunk@51389 git-svn-id: https://core.svn.wordpress.org/trunk@51000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
I opened a PR in core which should solve this issue: WordPress/wordpress-develop#1608. Once it's merged, we only need to tidy up some code in the tests :). |
Thank you, this looks great! I'll take a look, test, and leave a comment on the core tickets as well today. |
…r animations. Disables Customizer animations when media query `prefers-reduced-motion: reduce` returns true. Continues the effort to reduce motion within the WordPress admin panel when users have enabled this feature in their operating system or browser. It has the additional effect of making the Block Editor's end-to-end tests run faster, as explored initially with a different approach in #53562. See WordPress/gutenberg#32024 for the related Gutenberg issue. See https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion for ways to enable this feature on various platforms. Props kevin940726, isabel_brison, zieladam, youknowriad, desrosj, mamaduka, mikeschroder. Previously [51389], [50028], [47813]. Fixes #53542. git-svn-id: https://develop.svn.wordpress.org/trunk@51677 602fd350-edb4-49c9-b593-d223f7449a82
…r animations. Disables Customizer animations when media query `prefers-reduced-motion: reduce` returns true. Continues the effort to reduce motion within the WordPress admin panel when users have enabled this feature in their operating system or browser. It has the additional effect of making the Block Editor's end-to-end tests run faster, as explored initially with a different approach in #53562. See WordPress/gutenberg#32024 for the related Gutenberg issue. See https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion for ways to enable this feature on various platforms. Props kevin940726, isabel_brison, zieladam, youknowriad, desrosj, mamaduka, mikeschroder. Previously [51389], [50028], [47813]. Fixes #53542. Built from https://develop.svn.wordpress.org/trunk@51677 git-svn-id: http://core.svn.wordpress.org/trunk@51283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…r animations. Disables Customizer animations when media query `prefers-reduced-motion: reduce` returns true. Continues the effort to reduce motion within the WordPress admin panel when users have enabled this feature in their operating system or browser. It has the additional effect of making the Block Editor's end-to-end tests run faster, as explored initially with a different approach in #53562. See WordPress/gutenberg#32024 for the related Gutenberg issue. See https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion for ways to enable this feature on various platforms. Props kevin940726, isabel_brison, zieladam, youknowriad, desrosj, mamaduka, mikeschroder. Previously [51389], [50028], [47813]. Fixes #53542. Built from https://develop.svn.wordpress.org/trunk@51677 git-svn-id: https://core.svn.wordpress.org/trunk@51283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Okay, thanks again everyone! Please let me know if anything else is necessary here. |
Closing this as I see that https://core.trac.wordpress.org/ticket/53542 is now closed. |
Description
Possibly related failing tests: https://github.com/WordPress/gutenberg/runs/2620274056
Currently, the Widgets Customzier only works with "Disable the CSS animations" plugin disabled. It's because the customizer API rely on
transitionend
to work. We might want to find a new way to workaround that until we fixes it in core.Step-by-step reproduction instructions
Expected behaviour
The editor should load.
Actual behaviour
The editor doesn't load.
Screenshots or screen recording (optional)
WordPress information
Device information
The text was updated successfully, but these errors were encountered: