Set default view transition duration to 400 for better alignment with browser default#2081
Conversation
… browser default.
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #2081 +/- ##
=======================================
Coverage 67.14% 67.14%
=======================================
Files 93 93
Lines 7740 7740
=======================================
Hits 5197 5197
Misses 2543 2543
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
For some reasons the PHP 7.2 unit test workflow is consistently failing, which seems unrelated to this PR. It's also happening for #2080 🤔 |
|
The issue was fixed in GB repo WordPress/gutenberg#70718 for ENV package. |
Summary
#2051 implemented control over the view transition duration via theme support and a corresponding setting, with a default of 1000 (1 second).
While doing further smoke testing (for #2080), I noticed that this is far slower than the browser default when not specifying any duration. Therefore this PR aligns more closely with the browser default, which gives a better experience out of the box than a slower-moving animation, which can look a bit too janky sometimes.
It seems there is no clear single value that the browser uses, but it's a range between 0.15-0.4s. When I compared assigning 0.4s with no value, I could barely tell any difference, so I think this works well for now, certainly better than a default of 1s.