Repository navigation
[EuiToolTip] Improve tooltip group transition - #9689
Conversation
6822a14 to
6f2723e
Compare
d041f27 to
5b26281
Compare
| deregisterToolTip = (hideCallback: Function) => { | ||
| this.toolTipsToHide.delete(hideCallback); | ||
| if (this.toolTipsToHide.delete(hideCallback)) | ||
| this.lastHiddenAt = Date.now(); |
There was a problem hiding this comment.
I considered using performance.now() but found in the codebase we use Date.now() for such cases.
There was a problem hiding this comment.
Also considered a timeout in a provider but it's a larger architectural change, so I decided against it. This has no chance to leak, makes sense for cross-component logic and doesn't reintroduce the asynchronous problem that was causing screen readers to not announce tooltips reliably.
7c835b6 to
e752ba3
Compare
There was a problem hiding this comment.
Pull request overview
Improves EuiToolTip behavior when moving the pointer across adjacent tooltip triggers by conditionally skipping the entry animation, aiming to make “tooltip groups” feel like one continuous tooltip while preserving the synchronous show/hide behavior introduced in #9626.
Changes:
- Adds “skip entry animation” signaling to
toolTipManager(including a short time window after a tooltip closes). - Updates
EuiToolTipto use non-bubblingonMouseEnter/onMouseLeaveand to apply inlineanimation: noneon initial render when skipping. - Adds a Storybook story for grouped tooltip QA and updates tests/changelog.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/eui/src/components/tool_tip/tool_tip.tsx | Applies skipAnimation on show and swaps mouse event handling to mouseenter/leave |
| packages/eui/src/components/tool_tip/tool_tip.stories.tsx | Adds a grouped tooltip story for interactive QA |
| packages/eui/src/components/tool_tip/tool_tip_manager.ts | Tracks recent hide timestamp + returns { skipAnimation } from registerTooltip |
| packages/eui/src/components/tool_tip/tool_tip_manager.test.ts | Switches to singleton reset() between tests |
| packages/eui/src/components/tool_tip/tool_tip_anchor.tsx | Updates anchor wrapper to use onMouseEnter/onMouseLeave |
| packages/eui/src/components/selectable/selectable_list/selectable_list_item.test.tsx | Resets the singleton between tests to avoid cross-test animation differences |
| packages/eui/changelogs/upcoming/9689.md | Adds an entry describing the UX improvement + flicker fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fc87b48 to
929c022
Compare
|
Kibana test PR: elastic/kibana#272534 |
5119059 to
72ec2cc
Compare
|
I checked all failures on elastic/kibana#272534 and they are all related to the |
mgadewoll
left a comment
There was a problem hiding this comment.
This updates looks solid, nice work! I left a couple small comments.
I manually tested the tooltips based on the QA guidance, they generally work as expected.
There is one thing I noticed, which seems to not be a regression in this PR but rather from before:
When using the screen reader navigation (arrowUp/Down, not TAB key) in NVDA and JAWS and then pressing Enter to focus the element, the tooltip is not announced. That used to be the case before the tooltip refactor. In JAWS the tooltip is not shown anymore.
NVDA
| before | after |
|---|---|
Screen.Recording.2026-06-05.at.13.28.25.mov |
Screen.Recording.2026-06-05.at.13.29.04.mov |
JAWS
| before | after |
|---|---|
Screen.Recording.2026-06-05.at.13.38.17.mov |
Screen.Recording.2026-06-05.at.13.37.38.mov |
|
@mgadewoll so I looked into it and you're right, this is the result of the Probably the best solution here would be always linking |
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
5 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuibasictable (4 differences)
euiinmemorytable (1 difference)
|
mgadewoll
left a comment
There was a problem hiding this comment.
I left a couple small additional comments but overall the implementation looks good to me and works as expected. Nice work! Approving already to not be a blocker.
a840700 to
5764e3e
Compare
💚 Build Succeeded
History
|
6 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuipopover (1 difference)
euibasictable (4 differences)
euiinmemorytable (1 difference)
|
💔 Build Failed
Failed CI StepsHistory
|


















Summary
Adjacent
EuiToolTiptriggers show visually disjoint tooltips. They re-play entry fade-in animation on every hover (~150ms delay + ~90ms fade).Most design systems solve this by skipping the entry animation within a certain window of time. The show and hide stays synchronous (no timer), preserving the screen-reader behavior from #9626.
The anchor now listens with non-bubbling
onMouseEnter/onMouseLeaveinstead ofonMouseOver/onMouseOut. This removes the oldrelatedTargetfiltering that was supposed to fix a flicker where the tooltip could hide when the cursor moved between inner children of the trigger.Inline
animation: nonemust be on first popover render, not afterpositionToolTip, otherwise CSS keyframes fire briefly before override.API Changes
N/A
Screenshots
Impact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
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
Behavior
reduced motionsetting on and make sure tooltip displays correctlyScreen readers
Checklist before marking Ready for Review
breaking changelabel (if applicable)Reviewer checklist