-
Notifications
You must be signed in to change notification settings - Fork 842
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
[EuiFlyout] Animate push flyouts #7205
Comments
As you mentioned in your last paragraph, performance is the largest reason to avoid this. Animating width causes simultaneous reflow and repaint events which is the worst possible performance for animations (and will only scale worse for complex pages w/ lots of resize observers, etc). As you also mentioned, doing a single width change with a transform is likely the easiest way to performantly add some sort of animation (https://developer.chrome.com/blog/performant-expand-and-collapse/), but I kinda question how "good" that will look (since the rest of the page will jump instantly while the content doesn't). Here's an example codesandbox of an accordion using that technique: https://codesandbox.io/s/983z7n92rw I'll try to take some time later this week to spike out how a push flyout would look with that same type of animation, but we should definitely run this by a designer for final approval 😅 |
@ThomThomson #7239 has a staging preview of push flyouts with a toggleable animation - is it looking good to you so far? |
@cee-chen that's amazing! It's exactly what I was picturing. I think it should work really well with the Dashboard's squashing animation. |
Enhancement
Would it be possible to animate push flyouts like the overlay flyouts are animated?
Overlay
Push
Complication
It seems like the intention behind disabling animations on the push flyout was to avoid forcing width transitions on the rest of the page content. To get the best of both worlds, it might be possible to animate a child element instead of the parent element of the push flyout, so that the width change happens instantly, but the content of the flyout appears to animate in.
The text was updated successfully, but these errors were encountered: