Skip to content

Conversation

@paulinashakirova
Copy link
Contributor

@paulinashakirova paulinashakirova commented Sep 24, 2025

Summary

This PR resolves [Flyout System] Add “pass through props” for EuiChildFlyout on EuiFlyout if session=true issue.

Why are we making this change?

In the implementation of the new Developer API for flyout system (https://github.com/elastic/kibana-team/issues/1874), a capability became broken, which is to provide the backgroundStyle prop to EuiFlyoutChild. This happened because EuiFlyoutChild is no longer intended to be consumed directly.
For this reason, we are introducing a new hasChildBackground prop that can set shaded background on a child flyout if session=true.

Screenshots

chrome-capture-2025-10-10

Impact to users

This is not a breaking change. This new prop has a default value that keeps current UI untouched.

General checklist

@paulinashakirova paulinashakirova self-assigned this Sep 24, 2025
@paulinashakirova paulinashakirova changed the base branch from main to feat/flyout-system September 24, 2025 13:53
id="flyout-manager-playground-child"
size={childSize}
backgroundStyle={childBackgroundStyle}
childBgShaded={childBackgroundStyle === 'shaded'}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screen.Recording.2025-10-08.at.16.21.36.mov

@paulinashakirova paulinashakirova changed the title feat: Add a new backgroundStyle prop to the Flyout (default/shaded) feat: Add a new boolean childBgShaded prop to the Flyout to use for child flyouts only Oct 8, 2025
@tsullivan
Copy link
Member

This PR can also clean up the previous implementation, which relied on consumers directly rendering EuiFlyoutChild (no longer an option)

src/components/flyout/README.md:48:- **Styling**: Supports `backgroundStyle` prop for default/shaded backgrounds
src/components/flyout/manager/flyout_child.stories.tsx:28:  | 'backgroundStyle'
src/components/flyout/manager/flyout_child.stories.tsx:119:    backgroundStyle: { table: { disable: true } },
src/components/flyout/manager/flyout_child.tsx:30: * - `backgroundStyle` toggles between default and shaded backgrounds.
src/components/flyout/manager/flyout_child.tsx:37:  backgroundStyle?: 'default' | 'shaded';
src/components/flyout/manager/flyout_child.tsx:47:  backgroundStyle,
src/components/flyout/manager/flyout_child.tsx:89:        backgroundStyle === 'shaded'
src/components/flyout/manager/flyout_fill_mode.stories.tsx:28:  | 'backgroundStyle'
src/components/flyout/manager/flyout_fill_mode.stories.tsx:108:    backgroundStyle: { table: { disable: true } },
src/components/flyout/manager/flyout_fill_mode.stories.tsx:220:              backgroundStyle={childBackgroundStyle}

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

Left a suggestion

Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
* When the flyout is used as a child in a managed flyout session, setting `true` gives the shaded background style.
* @default false
*/
childBackgroundShaded?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

@paulinashakirova we'll also need to update all the places that used the old childBgShaded to use this name

Copy link
Contributor

Choose a reason for hiding this comment

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

To align more with existing naming conventions for booleans, this should rather be something like: hasChildBackground.
Imho, we should drop the "shaded" part. The color system has a "shaded" background color (which is not used here), so the naming might be confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your suggestion!
Where should I describe what type of the background "child" background is?

Copy link
Contributor

Choose a reason for hiding this comment

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

Where should I describe what type of the background "child" background is?

@paulinashakirova Sorry, I don't quite understand - What do you mean exactly?
The type boolean stays. In terms of naming, we don't need to have the color name "shaded" in the prop, that would make the API volatile if we want to change the color we'd have to change the prop as well.
The JSDoc describes the appliance already for devs 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha!
Yes, I misunderstood you - of course JSDoc will mention shaded. And if we want to change the color we will update the comment.

@paulinashakirova paulinashakirova marked this pull request as ready for review October 10, 2025 16:20
@paulinashakirova paulinashakirova requested a review from a team as a code owner October 10, 2025 16:20
@paulinashakirova paulinashakirova changed the title feat: Add a new boolean childBgShaded prop to the Flyout to use for child flyouts only feat: Add a new boolean childBackgroundShaded prop to the Flyout to use for child flyouts only Oct 10, 2025
### `src/components/flyout/manager/flyout_child.tsx`
Renders child flyouts within a session:
- **Positioning**: Automatically positions relative to main flyout width
- **Styling**: Supports `backgroundStyle` prop for default/shaded backgrounds
Copy link
Member

Choose a reason for hiding this comment

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

In this file, let's change line 97-98 to:

### `src/components/flyout/manager/flyout.styles.ts`
Managed flyout styling for the flyout management system.

97 is ok, 98 should have the mention background styles removed

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

It's nearly there, just a few small issues with comments that need revising :)

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @paulinashakirova

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @paulinashakirova

Copy link
Member

@tkajtoch tkajtoch left a comment

Choose a reason for hiding this comment

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

I love the cleanup you did! I believe there's one remaining unresolved comment that I'd like to see done before we merge this PR: https://github.com/elastic/eui/pull/9056/files/6e1ea9904d65de24391364f2d4d8b24db96d66bc#r2422128137

Other than that I have no objections

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the hard work!!

@tsullivan tsullivan merged commit 33f76da into elastic:feat/flyout-system Oct 15, 2025
4 checks passed
tsullivan added a commit that referenced this pull request Oct 15, 2025
… use for child flyouts only (#9056)

Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
@paulinashakirova paulinashakirova changed the title feat: Add a new boolean childBackgroundShaded prop to the Flyout to use for child flyouts only feat: Add a new boolean hasChildBackground prop to the Flyout to use for child flyouts only Oct 16, 2025
tkajtoch added a commit to elastic/kibana that referenced this pull request Dec 16, 2025
## Summary

This EUI upgrade brings the new Flyout System. While all of the changes
we made are opt-in, we did have to update the DOM nesting in `EuiFlyout`
and `EuiFlyoutResizable`. This change includes making overlay masks a
sibling of flyouts, rather than wrapping the flyouts as children, which
required internal changes to the mask's z-index value. Following
@tsullivan request, please run through your UIs and make sure the
flyouts render as expected, especially in the areas where you override
EuiFlyout styles.

## Dependency updates

- `@elastic/eui`: `v110.0.0` ⏩ `v111.0.0`
- `@elastic/eui-theme-borealis`: `v5.1.0` ⏩ `v5.2.0`

---

## Changes

- Removed `z-index` overrides from various places across Kibana. The
updated EuiFlyout logic calculates `z-index` values dynamically based on
the order of opening flyouts, making the manual overrides unnecessary.
- Updated types of refs passed to `EuiFlyout` and `EuiFlyoutResizable`

## Package updates

### `@elastic/eui` v111.0.0

- Added an opt-in EuiFlyout session management for creating flyout
compositions and journeys effortlessly. Session management handles
side-by-side flyout rendering based on parent-child grouping, simple
flyout transitions with history, state sharing, and more.
([#9202](elastic/eui#9202))
- EuiFlyout session management is an optional feature that can be
enabled by adding `session="start"` to EuiFlyout. Check out the
[documentation](https://eui.elastic.co/docs/components/containers/flyout/session-management)
to learn more.
- Added a new `hasChildBackground` boolean prop (defaults to false) to
`EuiFlyout` ([#9056](elastic/eui#9056))
- Updated `EuiFlyout` with new `onActive` callback and enable stack
managed history controls.
([#9003](elastic/eui#9003))
- Updated `EuiFlyoutMenu` with new prop `historyItems` and refactored
props for back button.
([#9003](elastic/eui#9003))
- Added a new optional `resizable` (boolean) prop to `EuiFlyout`.
Resizability can now be controlled dynamically without the need to use
`EuiFlyoutResizable`.
([#8999](elastic/eui#8999))
- Flyout system menu bar: require tile, support custom actions
([#8897](elastic/eui#8897))
- Added a new `EuiFlyoutMenu` component that provides a standardized top
menu bar for flyouts.
([#8851](elastic/eui#8851))

**Breaking changes**

- Changed the way EuiFlyout renders overlay masks to decouple the
overlay mask from the flyout itself. Now, the overlay mask is a separate
portalled element. ([#9202](elastic/eui#9202))
- This change does not modify the functionality or behavior of flyout
overlays but might affect some custom usages when your application
relies on the specific element nesting within EuiFlyout.

### `@elastic/eui-theme-borealis` v5.2.0

- Updated parameters used for `euiAnimSlightResistance` for a smoother
animation ([#9202](elastic/eui#9202))

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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.

[Flyout System] Add “pass through props” for EuiChildFlyout on EuiFlyout if session=true

5 participants