Skip to content

[EuiCallOut] Support popover and tooltip on actionProps#9705

Open
mgadewoll wants to merge 13 commits into
elastic:feat/callout-toast-ui-enhancementsfrom
mgadewoll:callout/support-popover-and-tooltip
Open

[EuiCallOut] Support popover and tooltip on actionProps#9705
mgadewoll wants to merge 13 commits into
elastic:feat/callout-toast-ui-enhancementsfrom
mgadewoll:callout/support-popover-and-tooltip

Conversation

@mgadewoll

@mgadewoll mgadewoll commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR updates EuiCallOut, specifically adding support for popoverProps and tooltipProps on the recently added actionProps API.

Because the API was made stricter using an object shape to strictly define actions, it's not possible to compose actions and popovers on consumer side anymore. Instead we'll need to support it internally via the same prop shape.

This PR adds higher-order utils withEuiPopover and withEuiToolTip to centralize rendering a wrapped action.

Note

We might be able to resolve this gain once we refactor EuiPopover/EuiToolTip to not require passing the trigger element as prop.

Additional changes

  • removes the render condition for secondary actions (EUI stays more flexible here, consumers can add stricter rules as needed)

API Changes

component / parent prop / child change description
EuiCallOut actionProps Updated Added support for popoverProps and tooltipProps for each action.

Screenshots

popoverProps tooltipProps
image image

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
This is a new feature. Implementations will first need to be migrated to use this.

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

💻 popoverProps
💻 tooltipProps

  • verify that popoverProps applies correctly and renders a popover on callout actions
  • verify that tooltipProps applies correctly and renders a tooltip on callout actions
  • verify that popoverProps and tooltipProps combined both apply correctly and renders a popover and tooltip on callout actions

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

Adds support for wrapping EuiCallOut actionProps actions with EuiPopover and/or EuiToolTip, enabling consumers to attach popovers/tooltips to the new stricter action object shape.

Changes:

  • Added popoverProps and tooltipProps to EuiCallOut primary/secondary action prop types and render logic.
  • Introduced withEuiPopover / withEuiToolTip wrapper utilities and exported them from their component barrels.
  • Added unit tests and Storybook stories covering tooltip/popover callout actions.

Reviewed changes

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

Show a summary per file
File Description
packages/eui/src/components/tool_tip/with_tooltip.tsx Adds a small helper to wrap a React element in EuiToolTip when props are provided.
packages/eui/src/components/tool_tip/index.ts Exports the new tooltip wrapper helper/type.
packages/eui/src/components/popover/with_popover.tsx Adds a small helper to wrap a React element in EuiPopover when props are provided.
packages/eui/src/components/popover/index.ts Exports the new popover wrapper helper/type.
packages/eui/src/components/call_out/call_out_action.tsx Extends action props to accept tooltip/popover props and composes wrappers around action buttons.
packages/eui/src/components/call_out/call_out.styles.ts Updates layout/styling for actions (notably super-narrow full-width behavior).
packages/eui/src/components/call_out/call_out.test.tsx Adds tests for tooltip/popover rendering on actions.
packages/eui/src/components/call_out/call_out.stories.tsx Adds Storybook stories (and Loki portal selector) for tooltip/popover action variants.

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

Comment thread packages/eui/src/components/call_out/call_out_action.tsx
Comment thread packages/eui/src/components/call_out/call_out_action.tsx
Comment thread packages/eui/src/components/call_out/call_out.styles.ts
Comment thread packages/eui/src/components/call_out/call_out.stories.tsx Outdated
Comment thread packages/eui/src/components/call_out/call_out.test.tsx
Comment thread packages/eui/src/components/tool_tip/with_tooltip.tsx
Comment thread packages/eui/src/components/popover/with_popover.tsx
@mgadewoll mgadewoll force-pushed the callout/support-popover-and-tooltip branch from 59395d4 to 0e3e43d Compare June 3, 2026 14:02
@mgadewoll mgadewoll marked this pull request as ready for review June 4, 2026 11:45
@mgadewoll mgadewoll requested a review from a team as a code owner June 4, 2026 11:45
@acstll acstll self-requested a review June 5, 2026 06:59

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

🟢 Working as expected, went through QA instructions. Only left a comment regarding the changelog.

Comment thread packages/eui/changelogs/upcoming/9705.md Outdated
@mgadewoll mgadewoll added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Jun 5, 2026
@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants