Skip to content

[EuiPanel] Ensure consistent line-height for interactive and non-interactive panels - #9694

Merged
mgadewoll merged 4 commits into
elastic:mainfrom
mgadewoll:panel/fix-line-height
Jun 1, 2026
Merged

mgadewoll merged 4 commits into
elastic:mainfrom
mgadewoll:panel/fix-line-height

Conversation

@mgadewoll

@mgadewoll mgadewoll commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

ℹ️ This issue was noticed in #9693

This PR updates EuiPanel to fix a small visual issue, where components with onClick would be rendered with a 1px height difference.

The issue stems from the different native line-height values that browsers apply to div and button elements. By adding line-height: inherit on the panel itself, both variants will be aligned to use the same contextual line-height (ancestor or root).

API Changes

⚪ No API changes

Screenshots

Description Before After
with onClick Screenshot 2026-06-01 at 11 01 54 Screenshot 2026-06-01 at 11 02 17
without onClick Screenshot 2026-06-01 at 11 01 43 Screenshot 2026-06-01 at 11 02 11

Impact Assessment

Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.

  • 🔴 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 changes require substantial updates to Kibana, please stage the changes and link them here.

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

💻 Storybook

  • verify that EuiPanel with and without onClick render with the same height
    • verify that EuiSplitPanel.Outer with and without onClick render with the same height
  • verify that there is no unexpected regression with production

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.

@mgadewoll mgadewoll self-assigned this Jun 1, 2026
@mgadewoll
mgadewoll requested a review from Copilot June 1, 2026 09:08
@mgadewoll mgadewoll changed the title [EuiPanel] Ensure consistent line-height for itneractive and non-interactive variants [EuiPanel] Ensure consistent line-height for interactive and non-interactive panels Jun 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 aims to eliminate a 1px visual height mismatch between clickable (<button>) and non-clickable (<div>) EuiPanel variants by normalizing browser default typography differences.

Changes:

  • Adds an explicit line-height to the base EuiPanel styles to align <button> and <div> rendering.
  • Adds an upcoming changelog entry documenting the visual fix.

Reviewed changes

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

File Description
packages/eui/src/components/panel/panel.styles.ts Updates base panel styles to address button vs div default line-height differences
packages/eui/changelogs/upcoming/9694.md Documents the EuiPanel 1px height discrepancy fix

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

@weronikaolejniczak
weronikaolejniczak self-requested a review June 1, 2026 09:15
@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

cc @mgadewoll

@mgadewoll
mgadewoll marked this pull request as ready for review June 1, 2026 09:38
@mgadewoll
mgadewoll requested a review from a team as a code owner June 1, 2026 09:38

@weronikaolejniczak weronikaolejniczak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for addressing this so quickly, Lene 🙏🏻 Everything LGTM! 🟢

@mgadewoll
mgadewoll merged commit 737a97b into elastic:main Jun 1, 2026
2 checks passed
@mgadewoll
mgadewoll deleted the panel/fix-line-height branch June 1, 2026 11:21
JasonStoltz pushed a commit to elastic/kibana that referenced this pull request Jun 24, 2026
## Dependency updates

`@elastic/eui` - v116.2.0 ⏩ v116.3.1
`@elastic/eslint-plugin-eui` - v2.13.0 ⏩ v2.14.0

## Package updates

### `@elastic/eui`
[v116.3.1](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md)

**Bug fixes**

- Fixed `EuiTableHeaderCell` and `EuiTableHeaderCellCheckbox` throwing
an error in Jest test environments due to static mocking of
`useGeneratedHtmlId` by generating a stable, unique key with `uuidv4`
([#9698](elastic/eui#9698))
- Fixed an issue where the tooltip anchor wrapper in `EuiAvatar` did not
have the same `border-radius` applied as the avatar itself.
([#9697](elastic/eui#9697))


### `@elastic/eui`
[v116.3.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md)

- Added `EuiBanner` component
([#9673](elastic/eui#9673))
- Replaced native browser `title` attributes with `EuiToolTip` across
the following components for consistent tooltips:
([#9643](elastic/eui#9643))
  - `EuiAvatar`
  - `EuiBasicTable`
  - `EuiBreadcrumbs`
  - `EuiComboBox`
  - `EuiDataGrid`
  - `EuiAutoRefresh`
  - `EuiSuperDatePicker`
  - `EuiFieldPassword`
  - `EuiMarkdownEditor`
  - `EuiPagination`
  - `EuiSearchBar`
  - `EuiSelectable`
  - `EuiTextTruncate`
- Extended `EuiToolTip`'s `display` prop to support `"flex"`
([#9643](elastic/eui#9643))
- Added experimental support for sticky headers in `EuiTable`,
`EuiBasicTable` and `EuiInMemoryTable`
([#9682](elastic/eui#9682))

**Bug fixes**

- Fixed `direction="row"` not applying on `EuiSplitPanel.Outer` when
`onClick` was set. ([#9693](elastic/eui#9693))
- Fixed `EuiDatePicker` firing `onChange` with an out-of-bounds date
when navigating to a month or year via the dropdowns while `minDate` or
`maxDate` is set ([#9685](elastic/eui#9685))
- Fixed a visual issue on `EuiPanel` where panels with `onClick` would
render with a `height` difference of `1px`.
([#9694](elastic/eui#9694))
- Fixed an issue in `EuiSelectable` and `EuiComboBox` where interactive
content in group labels wasn't clickable due to overlapping content.
([#9678](elastic/eui#9678))
### `@elastic/eslint-plugin-eui`
[v2.14.0](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2026.md)

- Removed auto-fix from `tooltip-button-icon-wrap` rule
([#9695](elastic/eui#9695))

---------

Co-authored-by: Tomasz Kajtoch <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Lene Gadewoll <[email protected]>
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request Aug 5, 2026
## Dependency updates

`@elastic/eui` - v116.2.0 ⏩ v116.3.1
`@elastic/eslint-plugin-eui` - v2.13.0 ⏩ v2.14.0

## Package updates

### `@elastic/eui`
[v116.3.1](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md)

**Bug fixes**

- Fixed `EuiTableHeaderCell` and `EuiTableHeaderCellCheckbox` throwing
an error in Jest test environments due to static mocking of
`useGeneratedHtmlId` by generating a stable, unique key with `uuidv4`
([elastic#9698](elastic/eui#9698))
- Fixed an issue where the tooltip anchor wrapper in `EuiAvatar` did not
have the same `border-radius` applied as the avatar itself.
([elastic#9697](elastic/eui#9697))


### `@elastic/eui`
[v116.3.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md)

- Added `EuiBanner` component
([elastic#9673](elastic/eui#9673))
- Replaced native browser `title` attributes with `EuiToolTip` across
the following components for consistent tooltips:
([elastic#9643](elastic/eui#9643))
  - `EuiAvatar`
  - `EuiBasicTable`
  - `EuiBreadcrumbs`
  - `EuiComboBox`
  - `EuiDataGrid`
  - `EuiAutoRefresh`
  - `EuiSuperDatePicker`
  - `EuiFieldPassword`
  - `EuiMarkdownEditor`
  - `EuiPagination`
  - `EuiSearchBar`
  - `EuiSelectable`
  - `EuiTextTruncate`
- Extended `EuiToolTip`'s `display` prop to support `"flex"`
([elastic#9643](elastic/eui#9643))
- Added experimental support for sticky headers in `EuiTable`,
`EuiBasicTable` and `EuiInMemoryTable`
([elastic#9682](elastic/eui#9682))

**Bug fixes**

- Fixed `direction="row"` not applying on `EuiSplitPanel.Outer` when
`onClick` was set. ([elastic#9693](elastic/eui#9693))
- Fixed `EuiDatePicker` firing `onChange` with an out-of-bounds date
when navigating to a month or year via the dropdowns while `minDate` or
`maxDate` is set ([elastic#9685](elastic/eui#9685))
- Fixed a visual issue on `EuiPanel` where panels with `onClick` would
render with a `height` difference of `1px`.
([elastic#9694](elastic/eui#9694))
- Fixed an issue in `EuiSelectable` and `EuiComboBox` where interactive
content in group labels wasn't clickable due to overlapping content.
([elastic#9678](elastic/eui#9678))
### `@elastic/eslint-plugin-eui`
[v2.14.0](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2026.md)

- Removed auto-fix from `tooltip-button-icon-wrap` rule
([elastic#9695](elastic/eui#9695))

---------

Co-authored-by: Tomasz Kajtoch <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Lene Gadewoll <[email protected]>
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