Skip to content

Conversation

@ryankeairns
Copy link
Contributor

@ryankeairns ryankeairns commented Jul 29, 2025

Summary

There is some adjacent work going on to bring animations to EuiFlyoutChild, so I wanted to take a parallel swipe at updating the animation settings (see #8896).

This PR is a test to make the animation feel a little more snappy: faster in the front and middle, then ease out.
Versus what we have today which is, in comparison, a bit more slow in the beginning and end.

Changes

  1. NEW cubic-bezier(0.32, 0.72, 0, 1) feels more alive/snappy.
  2. OLD cubic-bezier(.694, .0482, .335, 1) is more smooth/natural

Tweaked the keyframe from 75% to 85%. This change makes the flyout animation feel less abrupt, as the flyout spends more time in motion rather than too quickly snapping to its final position.

Testing notes

Preview and compare old versus new:

  1. Open the staging docs link from this PR...
  2. alongside the prod docs link.

Other impacts:

  • animation.resistance is used in other components, but it is most noticeable in EuiFlyout.
  • Take a peek at context menu and accordion ... I checked and it works as expected

To my eye, the keyframe and bezier tweaks make it ever so snappier (e.g. the title in the header leaves less of a visual 'trace')

TODO

  • Undo change to Amsterdam file

@ryankeairns ryankeairns added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Jul 29, 2025
@ryankeairns ryankeairns changed the title [DRAFT] Smoother animation settings for flyouts [DRAFT] Snappier animation settings for flyouts Jul 29, 2025
@weronikaolejniczak
Copy link
Contributor

It's a subtle difference between prod and staging but the animation looks smoother indeed 👌🏻 The code is clean as well, I'm glad we're updating an animation token.

@ryankeairns ryankeairns force-pushed the rk/flyout-animation-test branch from 1f51816 to 403b022 Compare July 30, 2025 21:56
@ryankeairns ryankeairns added design decision Use this to flag an item that needs input from the design team and removed skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) labels Jul 30, 2025
@ryankeairns
Copy link
Contributor Author

ryankeairns commented Jul 30, 2025

Something that I am uncertain about is how this looks for 'large' flyouts.

Before opening and merging this, let's test the settings in the parent+child setup once @tkajtoch gets to adding animations there. It could be better or worse: better because there are multiple flyouts moving and seeing the full animation from 0 to 100 might be jarring; worse if this animation seems to begin too late.

I think it may be better but need to see it in the flesh before deciding and would love input from others, again, at that point.

@tkajtoch
Copy link
Member

I LOVE this new animation! I tested it with size="l" prop added to EuiFlyout, and I think it looks just as good

@ryankeairns
Copy link
Contributor Author

ryankeairns commented Aug 5, 2025

Quick update:

  • waiting to open after Clint's PR is merged, so that I can test this on top of those animation changes.

@ryankeairns ryankeairns marked this pull request as ready for review August 5, 2025 19:42
@ryankeairns ryankeairns requested a review from a team as a code owner August 5, 2025 19:42
@weronikaolejniczak
Copy link
Contributor

@ryankeairns if it's not ready to be merged / approved / tested for final results, could we mark it as a draft PR?

@ryankeairns ryankeairns marked this pull request as draft August 13, 2025 15:56
@ryankeairns
Copy link
Contributor Author

Ah, neat! I had accidentally clicked 'Ready for review' last week when I meant to click 'Update branch'
I didn't realize you could revert back to draft.. done!

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@ryankeairns
Copy link
Contributor Author

@tkajtoch closing this as I believe you have worked through (or are close to working through) the flyout changes.

@ryankeairns ryankeairns closed this Sep 8, 2025
@tkajtoch
Copy link
Member

tkajtoch commented Sep 8, 2025

I'll integrate your changes into my animations PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design decision Use this to flag an item that needs input from the design team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants