Skip to content

[EuiFlyout] Reduce slide-out animations#9514

Open
tsullivan wants to merge 5 commits intoelastic:mainfrom
tsullivan:flyout/animation-smooth
Open

[EuiFlyout] Reduce slide-out animations#9514
tsullivan wants to merge 5 commits intoelastic:mainfrom
tsullivan:flyout/animation-smooth

Conversation

@tsullivan
Copy link
Member

@tsullivan tsullivan commented Mar 17, 2026

Summary

Closes elastic/kibana#249242

This PR removes animations for "subsequent" transitions between flyouts. A subsequent transition everything but initial flyout activity. This means we're still animating the first appearance of a main flyout, and the first appearance of a child flyout. However, when we navigate from main-main or child-child, we're not animating that transition.
Acceptance criteria: make sure there is no flicker for any flyout animation events.

NOTE: currently there is no animation when closing a flyout. This PR doesn't change that.

API Changes

component / parent prop / child change description
N/A No public API changes — all modifications are internal to EuiManagedFlyout implementation.

Screenshots

Before

Flyout.Subsequent.Animations.Demo.-.Before.mp4

After

Flyout.Subsequent.Animations.mp4

Impact Assessment

  • [ ] 🔴 Breaking changes — What will break? How many usages in Kibana/Cloud UI are impacted?
  • [ ] 💅 Visual changes — May impact style overrides; could require visual testing. Explain and estimate impact.
  • [ ] 🧪 Test impact — May break functional or snapshot tests (e.g., HTML structure, class names, default values).
  • [ ] 🔧 Hard to integrate — If integration is complex, stage commits in Kibana/Cloud UI branches for cherry-picking and link to them below.

Impact level: 🟢 None

Release Readiness

  • [ ] Documentation: {link to docs page(s)}
  • [ ] Figma: {link to Figma or issue}
  • [ ] Migration guide: {steps or link, for breaking/visual changes or deprecations}
  • [ ] Adoption plan (new features): {link to issue/doc or outline who will integrate this and where}

QA instructions for reviewer

Checklist before marking Ready for Review

Reviewer checklist

  • Approved Impact Assessment — Acceptable to merge given the consumer impact.
  • Approved Release Readiness — Docs, Figma, and migration info are sufficient to ship.

@tsullivan tsullivan changed the title [EuiFlyout] Reduce slide-in / slide-out animations [EuiFlyout] Reduce slide-out animations Mar 17, 2026
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@tsullivan tsullivan marked this pull request as ready for review March 18, 2026 21:51
@tsullivan tsullivan requested a review from a team as a code owner March 18, 2026 21:51
Copilot AI review requested due to automatic review settings March 18, 2026 21:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates EuiFlyoutManager’s internal managed flyout behavior to reduce motion and prevent flicker by avoiding animated transitions between subsequent flyout changes, while keeping the initial opening animation for the first main flyout and first child flyout.

Changes:

  • Added logic to only animate the initial flyout opening (first main session / first child in a session) and suppress opening animation for subsequent flyouts.
  • Removed managed-flyout intermediate transition animations (backgrounding/returning/closing) and updated the activity stage hook to optionally skip intermediate stages.
  • Updated unit tests and added a changelog entry describing the behavior change.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/eui/src/components/flyout/manager/flyout_managed.tsx Computes “initial opening” vs “subsequent transition” and suppresses the base flyout opening animation for subsequent openings
packages/eui/src/components/flyout/manager/flyout_managed.styles.ts Removes 3D keyframe transitions and forces no managed animation across stages
packages/eui/src/components/flyout/manager/activity_stage.ts Adds shouldAnimate option and refactors stage transition logic
packages/eui/src/components/flyout/manager/activity_stage.test.tsx Expands tests to cover new “skip intermediate stages” behavior and the optional animated behavior
packages/eui/changelogs/upcoming/9514.md Documents the flicker fix / animation reduction behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// Suppress EuiFlyout's built-in opening animation for non-initial flyouts.
!shouldAnimateOpening &&
css`
animation-duration: 0s !important;
Comment on lines +37 to +38
* (e.g. CLOSING -> INACTIVE). Has no effect when `shouldAnimate` is false,
* since those stages are never entered.
@tkajtoch tkajtoch self-requested a review March 19, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2️⃣ [Bug] Improve flyout animations

3 participants