-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Site Editor: Improve the frame animation #62676
Conversation
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. |
Size Change: +209 B (+0.01%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very curious, but as best I can tell, this works for me. I'd love for @stokesman to also take a look, but this fixes the glitch that can blink-and-you'll-miss-it appear when going back from the editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here’s what I see:
no62676.mov
This improves what it’s supposed to and what I think was the most obvious issue with the animation so ✅. It also seems to fix the transition of the canvas border-radius (which I guess was still happening but somehow being obscured and appearing to snap).
Still, I don’t want us to overlook that this increases the number of elements that crossfade during the transition and while its not too unsightly, it’s a not a intentional choice for the animation either.
Other than that I'm noticing the delay for the site icon is when entering edit mode is too short to prevent it from moving a bit off the left edge and back again with the canvas. It can be seen in the second half of the video above. It’s probably quite performance dependent on the canvas moving animation. If that lags it probably increases the amount of delay required to keep the site icon from moving horizontally.
And the last thing I’ll point out is the—yes, blink and you’ll miss it—editor header layout shift at the start of the transition to view mode. The back button instantly disappears so the inserter and document tools shift left. This makes the inserter appear to come out from behind the site icon. Ideally, they shouldn’t shift and start from where they were. Here’s a still from the video above to help show what I'm referring to:
I don’t see this as qualifying as an alternative to #62386 but by all means merge 👍
Ah right, this is probably the main reason for why I added that code in the first place. I did remember something about cross fade but when testing I didn't notice it. I'll take a deeper look. @jasmussen do you think the cross fade is a bigger issue that what this PR is solving? |
Yes, that delay is only there because the main frame animation is not using view transitions, when I experimented with using view transitions for it, the delay was not needed. The problem is I didn't want to use view transitions for it yet because of the browser support. While the lack of the logo animation in Safari and Firefox for now is acceptable, I'm not sure the lack of frame animation is. |
I think I found a way to disable the cross-fade entirely. For the header shift, I'm not sure yet how to solve it. |
Flaky tests detected in 2212dbf. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9586429765
|
Nice! That really cleans up the transitions.
It just occurred to me, the changes in #62636 happen to fix that. I’d certainly not say the shift is a blocker here. |
Ahh forgot to apply the props properly. Sorry folks. |
I just cherry-picked this PR to the wp/6.6-rc-1 branch to get it included in the next release: 4cf1c8c |
Alternative to #62386
What?
@stokesman raised that the changes in #61579 introduce a regression in the frame animation where during the frame animation, sometimes the header appears separate from the frame.
It looks like it happens only on browsers that support view transitions. My understand of the issue is that we have some things that are using view transitions but others framer motion animation which caused the conflict.
How?
This PR solves the issue by actually removing the view transition name from the "frame" which was not really needed AFAIK
Testing Instructions
1- Open the site editor
2- Navigate to "edit" mode
3- Keep your eyes focused on the header area during the animation and you shouldn't feel like the header got "disconnected" from the frame (hard to describe) :P