Skip to content

Conversation

@clintandrewhall
Copy link
Contributor

@clintandrewhall clintandrewhall commented Oct 17, 2025

This PR adds breaking API change to the flyout system (feature branch).

  • Before: the session prop to EuiFlyout was an optional boolean.
  • Now: session is an optional string with the allowed values of start | inherit | never.
    • To add a flyout to the Flyout Manager as a main flyout, use session="start".
    • To add a flyout into a session as a child, use session="inherit" when there is an active session.
    • To opt-out a flyout from the Flyout Manager, use session="never".
    • The default value is inherit and it only interacts with the Flyout Manager if there is an active session.

Basically, this is the same logic as before, but we're changing the type for the session flag to prevent confusion.

As a fix that comes along with this change, a flyout will no longer get "bumped" into automatically/accidentally becoming a child if it is open with the default configuration when a new main flyout gets opened. This was a bug and was causing confusion all around.

Oct-17-2025 00-22-15

@clintandrewhall clintandrewhall requested a review from a team as a code owner October 17, 2025 04:22
const { session, as, onClose, onActive, ...rest } =
usePropsWithComponentDefaults('EuiFlyout', props);
const hasActiveSession = useHasActiveSession();
const hasActiveSession = useRef(useHasActiveSession());
Copy link
Member

Choose a reason for hiding this comment

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

neat!

@tkajtoch
Copy link
Member

I love how clean the solution is! The changes work great 👏🏻

I found that opening a child flyout when a non-managed flyout is also open can look strange because of the z-index of the child flyout updating when the opening transition ends. It's not a big deal, though, and I don't assume this specific layout will be used in the real world. I'm happy leaving it as is for now and fixing it when actually needed.

Screen.Recording.2025-10-17.at.16.23.11.mov

where inherit is the default value
@tsullivan tsullivan changed the title [fix] open non-session flyouts as children of new sessions [flyout system/fix] Breaking: Prevent default configuration flyouts from interacting with the Flyout System Oct 17, 2025
* - `never`: Opts out of session management and always functions as a standard flyout.
* @default 'inherit'
*/
session?: 'start' | 'inherit' | 'never';
Copy link
Member

Choose a reason for hiding this comment

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

nit: now that we're using string literals, could we have these defined in manager/const.ts and manager/types.ts for consistency with other values like LEVEL_MAIN?

@tkajtoch
Copy link
Member

Everything seems to be working just fine with your latest changes @tsullivan! Code changes look good as well

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@tsullivan tsullivan merged commit b5267a4 into feat/flyout-system Oct 17, 2025
4 checks passed
@tsullivan tsullivan deleted the flyout-system/non-session-fix branch October 17, 2025 21:02
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.

5 participants