-
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
Navigator
: disable initial animation
#49062
Conversation
I don't think that's unstyled text, I think that's the tooltip that appears. But I would agree, it would be nice if that tooltip was delayed by something like 2s. |
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.
Thank you for working on this @ciampo! I think it's almost there with this change, except for the opacity change when switching between editor/sidebar. The idea from the design viewpoint was that the text is already there, so it shouldn't animate or fade in.
Looks good! Overall it's good to think of these orchestrations not as disparate animations, but as materials that behave according to each other. In this case you could imagine the drilldown navigation to be one long horizontal scroll, that as you literally drilldown moves leftwards, and as you drill back up moves rightwards. In that light, moving it leftwards when you go into editing makes sense, because the canvas pushes it away, and it moves rightwards when you exist the fullscreen editor, because it's pulled back in. The fades are a separate aspect. I could do with or without them, as they aren't related to the material. |
Haha, this behaviour is actually that #48595 was seeking to eliminate :) The motivator being the idea that the Frame (as suggested by its shadow) exists on a layer above the dark material. So entering full-screen edit mode doesn't push the menu away, instead the menus remain in place and the Frame simply expands to cover it visually. To clarify in slowmo, the aim was this: slowmo.mp4Rather than: slowmo.mp4 |
Thank you all for the feedback! I think that we should differentiate between the two main sources of "animation" that, combined, contribute to the scenario that we're discussing:
My suggestion is that we keep this PR focused on the The way the menu (ie. |
Flaky tests detected in f51d02a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4426378795
|
Ah yes, thanks for the reminder and apologies for the detour! |
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.
Code looks good and tests well 👍
5815a57
to
f51d02a
Compare
What?
Alternative approach to #48630
Partially addresses #48595
Change the
Navigator
component so that the very fistNavigatorScreen
doesn't perform its initial animation when rendered on screen.Why?
As described in #48595 , we'd like to disable such animation the component is first rendered, while maintaining the animation when navigating across different menus.
How?
Added a check that will disable the animation if the
NavigatorScreen
being shown is the initial screen (and it's not a backwards navigation).Testing Instructions
Storybook:
Site editor:
Check for regressions in other areas of the editor where
Navigator
is used (the initial animation should be disabled there too, but everything else should work as expected):Screenshots or screencast
(Note: in the videos I slowed the Navigator animation to be 2 seconds long, to really showcase the changes from this PR)
Before:
Navigator.no.initial.animation.-.BEFORE.mp4
After:
Navigator.no.initial.animation.-.AFTER.mp4