Skip to content

[EuiToast][EuiGlobalToastList] UI enhancements - #9688

Merged
mgadewoll merged 15 commits into
elastic:feat/toast-ui-enhancementsfrom
mgadewoll:toast/ui-enhancements
Jun 19, 2026
Merged

mgadewoll merged 15 commits into
elastic:feat/toast-ui-enhancementsfrom
mgadewoll:toast/ui-enhancements

Conversation

@mgadewoll

@mgadewoll mgadewoll commented May 29, 2026 •

Copy link
Copy Markdown
Contributor

Important

This PR merges into a feature branch.

Summary

This PR updates EuiToast to implement new design specs (Figma).

API Changes

component prop change description
EuiToast text Added Main body text. Use with inline text or basic text elements. Don't use with other custom content.
EuiToast actionProps Added Renders a primary and secondary action button.
EuiToast animationMs Added If provided, results in the decor element animating as timer progress bar
EuiGlobalToastList showNotificationBadge Added If provided, renders a badge indicating the toast list length

Screenshots

Before After
Screenshot 2026-05-29 at 12 02 45 Screenshot 2026-05-29 at 15 22 29 Screenshot 2026-05-29 at 15 25 10
Screenshot 2026-05-29 at 12 02 54 Screenshot 2026-05-29 at 15 22 42 Screenshot 2026-05-29 at 15 25 15
Screenshot 2026-05-29 at 12 03 11 Screenshot 2026-05-29 at 15 22 45 Screenshot 2026-05-29 at 15 25 17
Screenshot 2026-05-29 at 12 03 20 Screenshot 2026-05-29 at 15 22 48 Screenshot 2026-05-29 at 15 25 20
  • with animationMs
Screen.Recording.2026-05-29.at.12.07.10.mov
  • with showNotificationBadge
Screen.Recording.2026-05-29.at.16.23.18.mov

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: 🟢 Low - 🟡 Moderate
Due to the DOM structure changes and updated test selectors, the component might trigger test failures (snapshots and potential tests checking specific DOM structures).

🧪 Kibana CI build with min-required changes: 🟢 CI build

Release Readiness

  • Documentation: {link to docs page(s)}
  • Figma: link
  • 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

  • verify the EuiToast changes match design specs
  • verify that if no iconType is passed, default icons (EuiNotificationIcon) are rendered that match the color
  • verify that actionProps can be applied and render primary and secondary action buttons
  • verify that showNotificationBadge on EuiGlobalToastList applies correctly, rendering a EuiNotificationBadge showing the list length
  • verify that animationMs can be applied and if set renders an animated decor loading bar.
  • review the updated EUI docs page

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.

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 updates EuiToast (and related docs/infrastructure) to match new design specs by introducing a new visual structure with default notification icons, optional body text, optional actions, and an optional progress-bar animation driven by a toast lifetime.

Changes:

  • Added text, actionProps, and animationMs to EuiToast, plus updated styling/DOM structure and Storybook stories.
  • Added internal EuiNotificationIcon (and icon compilation + Jest mocking support) and switched EuiToast/EuiCallOut to default notification icons by color.
  • Updated documentation pages and snapshots to reflect the new APIs/markup.

Reviewed changes

Copilot reviewed 40 out of 84 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/website/docs/components/display/toast/index.mdx Updates toast docs to use text/actionProps and new color guidance.
packages/website/docs/components/display/toast/_guidelines.mdx Updates toast guidelines examples to use actionProps and default icons.
packages/website/docs/components/display/callout.mdx Updates callout docs examples to prefer text/actionProps and new visuals.
packages/eui/src/components/toast/types.ts Extracts toast color constants/types.
packages/eui/src/components/toast/toast.tsx Implements new EuiToast layout, default notification icons, actions, and animation CSS vars.
packages/eui/src/components/toast/toast.test.tsx Updates/expands toast unit tests for new props and default icons.
packages/eui/src/components/toast/toast.styles.ts Reworks toast styling (decor bar/progress animation, layout, dismiss button).
packages/eui/src/components/toast/toast.stories.tsx Updates toast stories and adds new stories (actions, animation, kitchen sink).
packages/eui/src/components/toast/toast_action.tsx Adds shared action rendering for toast primary/secondary buttons.
packages/eui/src/components/toast/global_toast_list.tsx Wires toast lifetime into animationMs for the decor/progress bar.
packages/eui/src/components/toast/global_toast_list.styles.ts Adds hover-based pausing of toast progress animation.
packages/eui/src/components/toast/snapshots/toast.test.tsx.snap Updates snapshots for the new toast markup/styles.
packages/eui/src/components/toast/snapshots/global_toast_list.test.tsx.snap Updates snapshots for global toast list markup/styles.
packages/eui/src/components/page/page_header/page_header_content.stories.tsx Updates callout usage in page header stories to match new callout behavior.
packages/eui/src/components/notification_icon/svgs/warning_static.svg Adds new notification icon SVG asset.
packages/eui/src/components/notification_icon/svgs/info_fill.svg Adds new notification icon SVG asset.
packages/eui/src/components/notification_icon/notification_icon.tsx Adds internal EuiNotificationIcon component and icon mapping.
packages/eui/src/components/notification_icon/notification_icon.testenv.tsx Adds Jest testenv shim for EuiNotificationIcon.
packages/eui/src/components/notification_icon/notification_icon.styles.tsx Adds styling for notification icon sizing.
packages/eui/src/components/notification_icon/notification_icon.stories.tsx Adds Storybook stories for EuiNotificationIcon.
packages/eui/src/components/notification_icon/assets/warning_static.tsx Adds generated notification icon React asset.
packages/eui/src/components/notification_icon/assets/info_fill.tsx Adds generated notification icon React asset.
packages/eui/src/components/form/snapshots/form.test.tsx.snap Updates snapshots impacted by callout DOM/styling changes.
packages/eui/src/components/flyout/flyout.styles.ts Removes callout padding override in flyout banner (callout now owns padding).
packages/eui/src/components/flyout/flyout.stories.tsx Updates flyout story banner callout usage to new API/structure.
packages/eui/src/components/flyout/flyout_body.styles.ts Adjusts flyout banner styling for new callout layout.
packages/eui/src/components/call_out/types.ts Extracts callout color/size/heading constants/types.
packages/eui/src/components/call_out/call_out.tsx Implements new callout layout with default notification icons and text/actionProps.
packages/eui/src/components/call_out/call_out.test.tsx Updates/expands callout unit tests for new behavior and legacy normalization.
packages/eui/src/components/call_out/call_out.styles.ts Reworks callout styling with container queries, actions layout, and new decor.
packages/eui/src/components/call_out/call_out.stories.tsx Updates callout stories and adds more scenarios (actions, kitchen sinks, etc.).
packages/eui/src/components/call_out/call_out_action.tsx Adds shared action rendering for callout primary/secondary buttons.
packages/eui/src/components/call_out/snapshots/call_out.test.tsx.snap Updates snapshots for the new callout markup/styles.
packages/eui/scripts/jest/setup/mocks.js Adds Jest module mock for EuiNotificationIcon.
packages/eui/scripts/jest/mocks/icon_mock.js Re-exports notification icon testenv in the icon mock module.
packages/eui/scripts/compile-icons.js Extends icon compilation to include notification icon SVGs/assets.
packages/eui/package.json Updates compile-icons script to format notification icon assets too.
packages/eui/changelogs/upcoming/9688.md Adds changelog entry for EuiToast enhancements.
packages/eui/changelogs/upcoming/9642.md Adds changelog entry for EuiCallOut enhancements.
packages/docusaurus-theme/src/theme/Admonition/Types.tsx Updates admonition callouts for removed accent and new callout defaults.
packages/docusaurus-theme/src/components/demo/preview/preview.tsx Wraps demos in EuiThemeProvider to neutralize docs-only line-height overrides.
packages/docusaurus-theme/changelogs/upcoming/9642.md Adds changelog entry for docs theme preview behavior change.

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

@mgadewoll
mgadewoll force-pushed the toast/ui-enhancements branch from 5ba88e3 to f8353bc Compare May 29, 2026 11:51
@mgadewoll mgadewoll changed the title [EuiToast] UI enhancements [EuiToast][EuiGlobalToastList] UI enhancements May 29, 2026
@mgadewoll
mgadewoll requested a review from ek-so May 29, 2026 12:23

@ek-so ek-so 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.

Discussed details in Slack, lgtm 👍

@mgadewoll
mgadewoll force-pushed the toast/ui-enhancements branch 2 times, most recently from 1417501 to db85d78 Compare June 2, 2026 12:00
@mgadewoll

Copy link
Copy Markdown
Contributor Author

ℹ️ Rebased with the feature branch after #9642 was merged.

@mgadewoll
mgadewoll marked this pull request as ready for review June 2, 2026 13:13
@mgadewoll
mgadewoll requested a review from a team as a code owner June 2, 2026 13:13
@acstll
acstll self-requested a review June 3, 2026 07:09
@mgadewoll
mgadewoll changed the base branch from feat/callout-toast-ui-enhancements to feat/toast-ui-enhancements June 4, 2026 17:48
@mgadewoll
mgadewoll force-pushed the toast/ui-enhancements branch from b1e3f07 to 4cbe753 Compare June 4, 2026 17:54
@mgadewoll

Copy link
Copy Markdown
Contributor Author

ℹ️ Rebased with new feature branch that doesn't include EuiCallOut changes.

@acstll acstll 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.

Everything working as expected and nothing blocking in my few comments, but I'm not approving yet because 2 items in the QA guide are not met:

  • "secondary buttons are only rendered if a primary button is available" — might be intentional
  • "verify that animationMs can be applied and if set renders an animated decor loading bar" — seems to work correctly and it's just a tiny thing in the story

Apart from that, an LLM flagged two changes in data-test-subj that might affect tests in Kibana:

  • data-test-subj="euiToastBody" moved from the text element to the icon+content wrapper (toast.tsx:280) — it now includes the icon, so anything reading toast text via euiToastBody gets different content.
  • data-test-subj="euiToastHeader" wrapper is gone; only euiToastHeader__title remains (now on an EuiTitle).

@mgadewoll

mgadewoll commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Apart from that, an LLM flagged two changes in data-test-subj that might affect tests in Kibana:

  • data-test-subj="euiToastBody" moved from the text element to the icon+content wrapper (toast.tsx:280) — it now includes the icon, so anything reading toast text via euiToastBody gets different content.
  • data-test-subj="euiToastHeader" wrapper is gone; only euiToastHeader__title remains (now on an EuiTitle).
  • For the first point: We could move it one level down. I don't think it makes a difference right now, but to be more precise maybe 🤷‍♀️
  • For the second point: I was considering this before. We have two options: Either re-add them to not break existing tests and we'd have to accept some additional wrapper without purpose or we clean them up and update test selectors to euiToastHeader__title. I chose the later since a wrapper without purpose seemed useless 😅

mgadewoll added 3 commits June 5, 2026 12:01
- ensures the wrapper collapses fully and doesn't take up space in the UI
- this keeps the previous testing structure for the content in parity. We can refactor it at a later time
@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

@mgadewoll
mgadewoll merged commit 6cb54f8 into elastic:feat/toast-ui-enhancements Jun 19, 2026
weronikaolejniczak added a commit to elastic/kibana that referenced this pull request Jul 2, 2026
## Dependency updates

`@elastic/eui` - v116.3.1 ⏩ v116.5.0

## Package updates

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

- Added `logoVectorDB` icon glyph
([#9758](elastic/eui#9758))
- Updated logo glyphs to use pure white in dark mode
([#9758](elastic/eui#9758))

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

- Added `pagination` prop to `EuiFlyoutMenuProps`
(`EuiFlyoutMenuPagination`) that renders Previous/Next navigation
buttons and a position counter in the flyout menu bar. When provided,
the back button is hidden — pagination and back button are mutually
exclusive. ([#9726](elastic/eui#9726))
- Added `setPagination(flyoutId, pagination)` to the flyout manager
store (`getFlyoutManagerStore()`) and `setPaginationAction` action
creator. Calling `setPagination` overrides any declarative
`flyoutMenuProps.pagination` and re-renders the menu bar reactively
across React roots — useful for imperatively opened flyouts that mount
in a separate root and can't update props through normal React
reconciliation. ([#9726](elastic/eui#9726))
- Added `useFlyoutPagination(flyoutId)` selector hook that returns the
manager-level pagination override for a flyout, if any.
([#9726](elastic/eui#9726))
- Added a new optional `panelled` prop (boolean, defaults to `false`) to
`EuiInMemoryTable` and `EuiBasicTable` that enables the panelled layout
([#9717](elastic/eui#9717))
- Added `useEuiBasicTablePanelProps` utility hook that provides props
and styles necessary to create custom table panels such as toolbars
([#9717](elastic/eui#9717))
- Added an optional `meta` argument to `EuiFlyout`'s `onClose` callback
(`onClose(event, { reason })`) describing why the flyout closed:
`'close-button'`, `'escape'`, `'outside-click'`, and, for managed
flyouts, `'navigation-back'` (Back button) or `'navigation-cascade'`
(parent navigated away / main flyout closed)
([#9716](elastic/eui#9716))
- Updated `EuiBanner` by removing the render condition for secondary
actions ([#9713](elastic/eui#9713))
- Updated `EuiBanner` to adjust spacing for content passed via the
`children` prop ([#9700](elastic/eui#9700))
- Updated `EuiToast` styles
([#9688](elastic/eui#9688))
- Added `text` prop on `EuiToast` which renders the main text. Use this
instead of `children` where possible.
([#9688](elastic/eui#9688))
- Added `actionProps` prop on `EuiToast` which renders primary and
secondary action buttons.
([#9688](elastic/eui#9688))
- Added `animationMs` prop on `EuiToast`. If set it'll render a reverse
loading bar. ([#9688](elastic/eui#9688))
- Added `showNotificationBadge` prop on `EuiGlobalToastList` to
optionally show a badge indicating the toast list length.
([#9688](elastic/eui#9688))

---------

Co-authored-by: Weronika Olejniczak <[email protected]>
MykhailoKondrat pushed a commit to MykhailoKondrat/kibana that referenced this pull request Jul 2, 2026
## Dependency updates

`@elastic/eui` - v116.3.1 ⏩ v116.5.0

## Package updates

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

- Added `logoVectorDB` icon glyph
([elastic#9758](elastic/eui#9758))
- Updated logo glyphs to use pure white in dark mode
([elastic#9758](elastic/eui#9758))

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

- Added `pagination` prop to `EuiFlyoutMenuProps`
(`EuiFlyoutMenuPagination`) that renders Previous/Next navigation
buttons and a position counter in the flyout menu bar. When provided,
the back button is hidden — pagination and back button are mutually
exclusive. ([elastic#9726](elastic/eui#9726))
- Added `setPagination(flyoutId, pagination)` to the flyout manager
store (`getFlyoutManagerStore()`) and `setPaginationAction` action
creator. Calling `setPagination` overrides any declarative
`flyoutMenuProps.pagination` and re-renders the menu bar reactively
across React roots — useful for imperatively opened flyouts that mount
in a separate root and can't update props through normal React
reconciliation. ([elastic#9726](elastic/eui#9726))
- Added `useFlyoutPagination(flyoutId)` selector hook that returns the
manager-level pagination override for a flyout, if any.
([elastic#9726](elastic/eui#9726))
- Added a new optional `panelled` prop (boolean, defaults to `false`) to
`EuiInMemoryTable` and `EuiBasicTable` that enables the panelled layout
([elastic#9717](elastic/eui#9717))
- Added `useEuiBasicTablePanelProps` utility hook that provides props
and styles necessary to create custom table panels such as toolbars
([elastic#9717](elastic/eui#9717))
- Added an optional `meta` argument to `EuiFlyout`'s `onClose` callback
(`onClose(event, { reason })`) describing why the flyout closed:
`'close-button'`, `'escape'`, `'outside-click'`, and, for managed
flyouts, `'navigation-back'` (Back button) or `'navigation-cascade'`
(parent navigated away / main flyout closed)
([elastic#9716](elastic/eui#9716))
- Updated `EuiBanner` by removing the render condition for secondary
actions ([elastic#9713](elastic/eui#9713))
- Updated `EuiBanner` to adjust spacing for content passed via the
`children` prop ([elastic#9700](elastic/eui#9700))
- Updated `EuiToast` styles
([elastic#9688](elastic/eui#9688))
- Added `text` prop on `EuiToast` which renders the main text. Use this
instead of `children` where possible.
([elastic#9688](elastic/eui#9688))
- Added `actionProps` prop on `EuiToast` which renders primary and
secondary action buttons.
([elastic#9688](elastic/eui#9688))
- Added `animationMs` prop on `EuiToast`. If set it'll render a reverse
loading bar. ([elastic#9688](elastic/eui#9688))
- Added `showNotificationBadge` prop on `EuiGlobalToastList` to
optionally show a badge indicating the toast list length.
([elastic#9688](elastic/eui#9688))

---------

Co-authored-by: Weronika Olejniczak <[email protected]>
mgadewoll added a commit to elastic/kibana that referenced this pull request Jul 9, 2026
## Summary

This PR aligns the toast service API with recent changes to `EuiToast`
([EUI PR](elastic/eui#9688)).
The overall goal is to adopt the new, stricter API - specifically for
the declarative `actionProps` - which ensures expected design will be
applied by reducing the potential for misusage.

>[!important]
This PR only updates a scoped selection of usages (for SOME code owners,
not all). The reason is to keep the required review footprint small-ish
but still drive adoption.
The remaining usages can be addressed as additional PR or by the owning
teams themselves.

### Changes

- adds `actionProps` to `ToastInputFields` type
- removes custom `iconType` on `ToastsApi` methods
`addInfo/addSuccess/addWarning/addDanger/addError`
- updates `addError` to use plain string for `text` and use
`actionProps` to define actions
- updates usages of `addInfo/addSuccess/addWarning/addDanger` to use
plain string as `text` where possible
- updates usages of `addInfo/addSuccess/addWarning/addDanger` that pass
custom actions as JSX to use the new `actionProps` API
- adjusted tests to DOM structure changes where needed

```tsx
/* example usage */

// before - requires full custom content
notifications.toasts.addInfo({
  title: 'System color mode updated',
  text: mountReactNode(
    <>
      <p>Reload the page to see the changes</p>
      <EuiFlexGroup justifyContent="flexEnd" gutterSize="s">
        <EuiFlexItem grow={false}>
          <EuiButton
            size="s"
            onClick={() => {}}
          >
            Reload page
          </EuiButton>
        </EuiFlexItem>
      </EuiFlexGroup>
    </>
  ),
});

// after - predefined content
notifications.toasts.addInfo({
  title: 'System color mode updated',
  text: 'Reload the page to see the changes',
  actionProps: {
    primary: {
      onClick: () => {},
      children: 'Reload page',
    },
  },
});

```

**Example screenshot**

| before | after|
|---|---|
| <img width="2558" height="1323" alt="Screenshot 2026-07-03 at 15 30
48"
src="https://github.com/user-attachments/assets/45ff626a-a863-4704-a805-3cca3715309d"
/> | <img width="2558" height="1323" alt="Screenshot 2026-07-03 at 15 19
27"
src="https://github.com/user-attachments/assets/fa3e8c4d-9757-4a15-a61c-9baa7a8ff732"
/> |
| <img width="2558" height="1323" alt="Screenshot 2026-07-03 at 15 31
07"
src="https://github.com/user-attachments/assets/037763c6-e4d4-4e3d-98c0-3d14bdfdd72b"
/> | <img width="2558" height="1323" alt="Screenshot 2026-07-03 at 15 19
47"
src="https://github.com/user-attachments/assets/44bd5a4a-9d52-4f4d-8588-39aeb7d287dc"
/> |


### Checklist

>[!important]
Code owners should please also verify their rendered UI.

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <[email protected]>
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request Aug 5, 2026
## Summary

This PR aligns the toast service API with recent changes to `EuiToast`
([EUI PR](elastic/eui#9688)).
The overall goal is to adopt the new, stricter API - specifically for
the declarative `actionProps` - which ensures expected design will be
applied by reducing the potential for misusage.

>[!important]
This PR only updates a scoped selection of usages (for SOME code owners,
not all). The reason is to keep the required review footprint small-ish
but still drive adoption.
The remaining usages can be addressed as additional PR or by the owning
teams themselves.

### Changes

- adds `actionProps` to `ToastInputFields` type
- removes custom `iconType` on `ToastsApi` methods
`addInfo/addSuccess/addWarning/addDanger/addError`
- updates `addError` to use plain string for `text` and use
`actionProps` to define actions
- updates usages of `addInfo/addSuccess/addWarning/addDanger` to use
plain string as `text` where possible
- updates usages of `addInfo/addSuccess/addWarning/addDanger` that pass
custom actions as JSX to use the new `actionProps` API
- adjusted tests to DOM structure changes where needed

```tsx
/* example usage */

// before - requires full custom content
notifications.toasts.addInfo({
  title: 'System color mode updated',
  text: mountReactNode(
    <>
      <p>Reload the page to see the changes</p>
      <EuiFlexGroup justifyContent="flexEnd" gutterSize="s">
        <EuiFlexItem grow={false}>
          <EuiButton
            size="s"
            onClick={() => {}}
          >
            Reload page
          </EuiButton>
        </EuiFlexItem>
      </EuiFlexGroup>
    </>
  ),
});

// after - predefined content
notifications.toasts.addInfo({
  title: 'System color mode updated',
  text: 'Reload the page to see the changes',
  actionProps: {
    primary: {
      onClick: () => {},
      children: 'Reload page',
    },
  },
});

```

**Example screenshot**

| before | after|
|---|---|
| <img width="2558" height="1323" alt="Screenshot 2026-07-03 at 15 30
48"
src="https://github.com/user-attachments/assets/45ff626a-a863-4704-a805-3cca3715309d"
/> | <img width="2558" height="1323" alt="Screenshot 2026-07-03 at 15 19
27"
src="https://github.com/user-attachments/assets/fa3e8c4d-9757-4a15-a61c-9baa7a8ff732"
/> |
| <img width="2558" height="1323" alt="Screenshot 2026-07-03 at 15 31
07"
src="https://github.com/user-attachments/assets/037763c6-e4d4-4e3d-98c0-3d14bdfdd72b"
/> | <img width="2558" height="1323" alt="Screenshot 2026-07-03 at 15 19
47"
src="https://github.com/user-attachments/assets/44bd5a4a-9d52-4f4d-8588-39aeb7d287dc"
/> |


### Checklist

>[!important]
Code owners should please also verify their rendered UI.

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

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

`@elastic/eui` - v116.3.1 ⏩ v116.5.0

## Package updates

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

- Added `logoVectorDB` icon glyph
([elastic#9758](elastic/eui#9758))
- Updated logo glyphs to use pure white in dark mode
([elastic#9758](elastic/eui#9758))

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

- Added `pagination` prop to `EuiFlyoutMenuProps`
(`EuiFlyoutMenuPagination`) that renders Previous/Next navigation
buttons and a position counter in the flyout menu bar. When provided,
the back button is hidden — pagination and back button are mutually
exclusive. ([elastic#9726](elastic/eui#9726))
- Added `setPagination(flyoutId, pagination)` to the flyout manager
store (`getFlyoutManagerStore()`) and `setPaginationAction` action
creator. Calling `setPagination` overrides any declarative
`flyoutMenuProps.pagination` and re-renders the menu bar reactively
across React roots — useful for imperatively opened flyouts that mount
in a separate root and can't update props through normal React
reconciliation. ([elastic#9726](elastic/eui#9726))
- Added `useFlyoutPagination(flyoutId)` selector hook that returns the
manager-level pagination override for a flyout, if any.
([elastic#9726](elastic/eui#9726))
- Added a new optional `panelled` prop (boolean, defaults to `false`) to
`EuiInMemoryTable` and `EuiBasicTable` that enables the panelled layout
([elastic#9717](elastic/eui#9717))
- Added `useEuiBasicTablePanelProps` utility hook that provides props
and styles necessary to create custom table panels such as toolbars
([elastic#9717](elastic/eui#9717))
- Added an optional `meta` argument to `EuiFlyout`'s `onClose` callback
(`onClose(event, { reason })`) describing why the flyout closed:
`'close-button'`, `'escape'`, `'outside-click'`, and, for managed
flyouts, `'navigation-back'` (Back button) or `'navigation-cascade'`
(parent navigated away / main flyout closed)
([elastic#9716](elastic/eui#9716))
- Updated `EuiBanner` by removing the render condition for secondary
actions ([elastic#9713](elastic/eui#9713))
- Updated `EuiBanner` to adjust spacing for content passed via the
`children` prop ([elastic#9700](elastic/eui#9700))
- Updated `EuiToast` styles
([elastic#9688](elastic/eui#9688))
- Added `text` prop on `EuiToast` which renders the main text. Use this
instead of `children` where possible.
([elastic#9688](elastic/eui#9688))
- Added `actionProps` prop on `EuiToast` which renders primary and
secondary action buttons.
([elastic#9688](elastic/eui#9688))
- Added `animationMs` prop on `EuiToast`. If set it'll render a reverse
loading bar. ([elastic#9688](elastic/eui#9688))
- Added `showNotificationBadge` prop on `EuiGlobalToastList` to
optionally show a badge indicating the toast list length.
([elastic#9688](elastic/eui#9688))

---------

Co-authored-by: Weronika Olejniczak <[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.

5 participants