Skip to content

[EuiTreeView] Fix visible children overflow#9510

Merged
weronikaolejniczak merged 6 commits intoelastic:mainfrom
weronikaolejniczak:fix/tree-view-expanded-nodes-clipped
Mar 17, 2026
Merged

[EuiTreeView] Fix visible children overflow#9510
weronikaolejniczak merged 6 commits intoelastic:mainfrom
weronikaolejniczak:fix/tree-view-expanded-nodes-clipped

Conversation

@weronikaolejniczak
Copy link
Copy Markdown
Contributor

@weronikaolejniczak weronikaolejniczak commented Mar 16, 2026

Summary

max-height: 100vh on expanded nodes was intended to be combined with overflow: auto to form a self-contained scroll area. The Emotion migration (#7513) removed overflow: auto but left the max-height in place. It only limits the layout box, the content overflows and overlaps sibling items.

The solution is to explicitly override max-height to none when list item is "expanded". The children are conditionally rendered so there is no need for a CSS height restriction.

Why are we making this change?

It was raised on an internally-created bug issue: #9395

Screenshots #

Before After
Kapture.2026-03-16.at.16.48.40.mp4
Kapture.2026-03-16.at.16.49.10.mp4

Impact to users

🟢 Doesn't remove the existing expanded class so it should not affect snapshots either. It's strictly a visual issue.

QA

Specific checklist

  • Access the temporary testing story (locally or in staging and leverage DevTools)
  • Verify that max-height: 100vh produces children that overlap sibling items
  • Verify that max-height: none makes children take as much space as needed (if a scroll is needed on consumer side to limit how many children are displayed, it's better that they do it)
  • Compare production and staging EuiTreeView Playground story and verify there's no regression

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
    • If the changes unblock an issue in a different repo, smoke tested carefully (see Testing EUI features in Kibana ahead of time)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

@weronikaolejniczak weronikaolejniczak self-assigned this Mar 16, 2026
@weronikaolejniczak weronikaolejniczak marked this pull request as ready for review March 16, 2026 16:05
@weronikaolejniczak weronikaolejniczak requested a review from a team as a code owner March 16, 2026 16:05
@tkajtoch tkajtoch self-requested a review March 17, 2026 09:39
Copy link
Copy Markdown
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.

Everything works as expected 🚢

Copilot AI review requested due to automatic review settings March 17, 2026 12:16
Copy link
Copy Markdown
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 fixes a layout bug in EuiTreeView where expanded nodes with many children were clipped to 100vh, causing later sibling items to overlap/interleave due to the max-height constraint without a corresponding overflow behavior (regression introduced during the Emotion migration).

Changes:

  • Changed the expanded node styling to set max-height: none instead of 100vh, allowing expanded nodes to take the full height required by their (conditionally rendered) children.
  • Added an upcoming changelog entry documenting the bug fix.

Reviewed changes

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

File Description
packages/eui/src/components/tree_view/tree_view_item.styles.ts Removes the 100vh max-height cap on expanded tree nodes to prevent sibling overlap.
packages/eui/changelogs/upcoming/9510.md Records the EuiTreeView expanded-node clipping/overlap bug fix in the changelog.

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

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @weronikaolejniczak

@elasticmachine
Copy link
Copy Markdown
Collaborator

elasticmachine commented Mar 17, 2026

💚 Build Succeeded

History

cc @weronikaolejniczak

@weronikaolejniczak weronikaolejniczak merged commit 5837250 into elastic:main Mar 17, 2026
5 checks passed
weronikaolejniczak added a commit to elastic/kibana that referenced this pull request Apr 1, 2026
## Dependency updates

- `@elastic/eui` - v113.3.0 ⏩ v114.0.0
- `@elastic/eui-theme-borealis` - v6.2.0 ⏩ v7.0.0
- `@elastic/eslint-plugin-eui` - v2.10.0 ⏩ v2.11.0

---

## Package updates

### [`v114.0.0`](https://github.com/elastic/eui/releases/v114.0.0)

- Fixed the clipping of `EuiFlyout` overlay mask to the container bounds
when the `container` prop is provided, so the mask no longer covers the
full viewport for app-scoped flyouts.
([#9512](elastic/eui#9512))
- Updated `EuiFlyout` to support `pushAnimation` prop for
`type="overlay"` ([#9428](elastic/eui#9428))
- Added `hasAnimation` prop on `EuiFlyout` (replaces `pushAnimation`)
([#9428](elastic/eui#9428))
- Added `hasAnimation` prop on `EuiOverlayMask` to conditionally add
animation styles ([#9428](elastic/eui#9428))
- Added `historyKey` prop (type `symbol`) to `EuiFlyout` and the flyout
manager API to support scoped flyout history.
([#9413](elastic/eui#9413))
- Only flyouts sharing the same `Symbol` reference share Back button
navigation and history entries; omitting `historyKey` gives each session
its own isolated history group.
- `ACTION_CLOSE_ALL` now closes only the current history group rather
than all open flyouts.

**Bug fixes**

- Fixed `EuiTreeView` expanded nodes clipping content and causing
sibling overlap when children exceed viewport height
([#9510](elastic/eui#9510))
- Fixed `EuiDataGrid` scroll bouncing back to the focused element in
certain cases ([#9453](elastic/eui#9453))
- Fixed support for intraword underscores in `EuiMarkdownFormat`
([#9408](elastic/eui#9408))

**Deprecations**

- Deprecated `pushAnimation` prop on `EuiFlyout`. Use `hasAnimation`
instead. ([#9428](elastic/eui#9428))

**Breaking changes**

- Removed `severity.assistance` color token
([#9507](elastic/eui#9507))
- Removed assistance datavis color tokens:
([#9507](elastic/eui#9507))
  - `vis.euiColorVisAssistance`
  - `vis.euiColorVis10`
  - `vis.euiColorVis11`
  - `vis.euiColorVisText10`
  - `vis.euiColorVisText11`
  - `vis.euiColorVisBehindText10`
  - `vis.euiColorVisBehindText11`
- The positional signature of `FlyoutManagerApi.addFlyout` and the
flyout store's `addFlyout` now includes `historyKey` before the
`iconType`/`minWidth` arguments. Call sites that pass arguments
positionally must be updated (or switched to named parameters) to
account for this new parameter ordering.
([#9413](elastic/eui#9413))

**Accessibility**

- Fixed `aria-label` not being applied to `EuiColorPicker`'s input
element ([#9436](elastic/eui#9436))

### @elastic/eui-theme-borealis v7.0.0

**Breaking changes**

- Removed `severity.assistance` color token
([#9507](elastic/eui#9507))
- Removed assistance datavis color tokens:
([#9507](elastic/eui#9507))
  - `vis.euiColorVisAssistance`
  - `vis.euiColorVis10`
  - `vis.euiColorVis11`
  - `vis.euiColorVisText10`
  - `vis.euiColorVisText11`
  - `vis.euiColorVisBehindText10`
  - `vis.euiColorVisBehindText11`

### @elastic/eslint-plugin-eui v2.11.0

- Updated `no-unnamed-interactive-element` to include checking
`EuiColorPicker` ([#9436](elastic/eui#9436))

---------

Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Weronika Olejniczak <32842468+weronikaolejniczak@users.noreply.github.com>
Co-authored-by: Weronika Olejniczak <weronika.olejniczak@elastic.co>
eokoneyo pushed a commit to davismcphee/kibana that referenced this pull request Apr 2, 2026
## Dependency updates

- `@elastic/eui` - v113.3.0 ⏩ v114.0.0
- `@elastic/eui-theme-borealis` - v6.2.0 ⏩ v7.0.0
- `@elastic/eslint-plugin-eui` - v2.10.0 ⏩ v2.11.0

---

## Package updates

### [`v114.0.0`](https://github.com/elastic/eui/releases/v114.0.0)

- Fixed the clipping of `EuiFlyout` overlay mask to the container bounds
when the `container` prop is provided, so the mask no longer covers the
full viewport for app-scoped flyouts.
([elastic#9512](elastic/eui#9512))
- Updated `EuiFlyout` to support `pushAnimation` prop for
`type="overlay"` ([elastic#9428](elastic/eui#9428))
- Added `hasAnimation` prop on `EuiFlyout` (replaces `pushAnimation`)
([elastic#9428](elastic/eui#9428))
- Added `hasAnimation` prop on `EuiOverlayMask` to conditionally add
animation styles ([elastic#9428](elastic/eui#9428))
- Added `historyKey` prop (type `symbol`) to `EuiFlyout` and the flyout
manager API to support scoped flyout history.
([elastic#9413](elastic/eui#9413))
- Only flyouts sharing the same `Symbol` reference share Back button
navigation and history entries; omitting `historyKey` gives each session
its own isolated history group.
- `ACTION_CLOSE_ALL` now closes only the current history group rather
than all open flyouts.

**Bug fixes**

- Fixed `EuiTreeView` expanded nodes clipping content and causing
sibling overlap when children exceed viewport height
([elastic#9510](elastic/eui#9510))
- Fixed `EuiDataGrid` scroll bouncing back to the focused element in
certain cases ([elastic#9453](elastic/eui#9453))
- Fixed support for intraword underscores in `EuiMarkdownFormat`
([elastic#9408](elastic/eui#9408))

**Deprecations**

- Deprecated `pushAnimation` prop on `EuiFlyout`. Use `hasAnimation`
instead. ([elastic#9428](elastic/eui#9428))

**Breaking changes**

- Removed `severity.assistance` color token
([elastic#9507](elastic/eui#9507))
- Removed assistance datavis color tokens:
([elastic#9507](elastic/eui#9507))
  - `vis.euiColorVisAssistance`
  - `vis.euiColorVis10`
  - `vis.euiColorVis11`
  - `vis.euiColorVisText10`
  - `vis.euiColorVisText11`
  - `vis.euiColorVisBehindText10`
  - `vis.euiColorVisBehindText11`
- The positional signature of `FlyoutManagerApi.addFlyout` and the
flyout store's `addFlyout` now includes `historyKey` before the
`iconType`/`minWidth` arguments. Call sites that pass arguments
positionally must be updated (or switched to named parameters) to
account for this new parameter ordering.
([elastic#9413](elastic/eui#9413))

**Accessibility**

- Fixed `aria-label` not being applied to `EuiColorPicker`'s input
element ([elastic#9436](elastic/eui#9436))

### @elastic/eui-theme-borealis v7.0.0

**Breaking changes**

- Removed `severity.assistance` color token
([elastic#9507](elastic/eui#9507))
- Removed assistance datavis color tokens:
([elastic#9507](elastic/eui#9507))
  - `vis.euiColorVisAssistance`
  - `vis.euiColorVis10`
  - `vis.euiColorVis11`
  - `vis.euiColorVisText10`
  - `vis.euiColorVisText11`
  - `vis.euiColorVisBehindText10`
  - `vis.euiColorVisBehindText11`

### @elastic/eslint-plugin-eui v2.11.0

- Updated `no-unnamed-interactive-element` to include checking
`EuiColorPicker` ([elastic#9436](elastic/eui#9436))

---------

Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Weronika Olejniczak <32842468+weronikaolejniczak@users.noreply.github.com>
Co-authored-by: Weronika Olejniczak <weronika.olejniczak@elastic.co>
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
## Dependency updates

- `@elastic/eui` - v113.3.0 ⏩ v114.0.0
- `@elastic/eui-theme-borealis` - v6.2.0 ⏩ v7.0.0
- `@elastic/eslint-plugin-eui` - v2.10.0 ⏩ v2.11.0

---

## Package updates

### [`v114.0.0`](https://github.com/elastic/eui/releases/v114.0.0)

- Fixed the clipping of `EuiFlyout` overlay mask to the container bounds
when the `container` prop is provided, so the mask no longer covers the
full viewport for app-scoped flyouts.
([elastic#9512](elastic/eui#9512))
- Updated `EuiFlyout` to support `pushAnimation` prop for
`type="overlay"` ([elastic#9428](elastic/eui#9428))
- Added `hasAnimation` prop on `EuiFlyout` (replaces `pushAnimation`)
([elastic#9428](elastic/eui#9428))
- Added `hasAnimation` prop on `EuiOverlayMask` to conditionally add
animation styles ([elastic#9428](elastic/eui#9428))
- Added `historyKey` prop (type `symbol`) to `EuiFlyout` and the flyout
manager API to support scoped flyout history.
([elastic#9413](elastic/eui#9413))
- Only flyouts sharing the same `Symbol` reference share Back button
navigation and history entries; omitting `historyKey` gives each session
its own isolated history group.
- `ACTION_CLOSE_ALL` now closes only the current history group rather
than all open flyouts.

**Bug fixes**

- Fixed `EuiTreeView` expanded nodes clipping content and causing
sibling overlap when children exceed viewport height
([elastic#9510](elastic/eui#9510))
- Fixed `EuiDataGrid` scroll bouncing back to the focused element in
certain cases ([elastic#9453](elastic/eui#9453))
- Fixed support for intraword underscores in `EuiMarkdownFormat`
([elastic#9408](elastic/eui#9408))

**Deprecations**

- Deprecated `pushAnimation` prop on `EuiFlyout`. Use `hasAnimation`
instead. ([elastic#9428](elastic/eui#9428))

**Breaking changes**

- Removed `severity.assistance` color token
([elastic#9507](elastic/eui#9507))
- Removed assistance datavis color tokens:
([elastic#9507](elastic/eui#9507))
  - `vis.euiColorVisAssistance`
  - `vis.euiColorVis10`
  - `vis.euiColorVis11`
  - `vis.euiColorVisText10`
  - `vis.euiColorVisText11`
  - `vis.euiColorVisBehindText10`
  - `vis.euiColorVisBehindText11`
- The positional signature of `FlyoutManagerApi.addFlyout` and the
flyout store's `addFlyout` now includes `historyKey` before the
`iconType`/`minWidth` arguments. Call sites that pass arguments
positionally must be updated (or switched to named parameters) to
account for this new parameter ordering.
([elastic#9413](elastic/eui#9413))

**Accessibility**

- Fixed `aria-label` not being applied to `EuiColorPicker`'s input
element ([elastic#9436](elastic/eui#9436))

### @elastic/eui-theme-borealis v7.0.0

**Breaking changes**

- Removed `severity.assistance` color token
([elastic#9507](elastic/eui#9507))
- Removed assistance datavis color tokens:
([elastic#9507](elastic/eui#9507))
  - `vis.euiColorVisAssistance`
  - `vis.euiColorVis10`
  - `vis.euiColorVis11`
  - `vis.euiColorVisText10`
  - `vis.euiColorVisText11`
  - `vis.euiColorVisBehindText10`
  - `vis.euiColorVisBehindText11`

### @elastic/eslint-plugin-eui v2.11.0

- Updated `no-unnamed-interactive-element` to include checking
`EuiColorPicker` ([elastic#9436](elastic/eui#9436))

---------

Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Weronika Olejniczak <32842468+weronikaolejniczak@users.noreply.github.com>
Co-authored-by: Weronika Olejniczak <weronika.olejniczak@elastic.co>
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.

4 participants