[EuiToolTip] Improve tooltip group transition#9749
Draft
weronikaolejniczak wants to merge 4 commits into
Draft
Conversation
2 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuicodeblock (1 difference)
euidatagrid (1 difference)
|
2 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuidatagrid (2 differences)
|
f5e051b to
f0aabe3
Compare
f0aabe3 to
db284c0
Compare
db284c0 to
07d9df8
Compare
07d9df8 to
90ee6b1
Compare
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates EuiToolTip hover behavior to make adjacent tooltip triggers feel like a continuous interaction by skipping the entry animation when moving quickly between triggers, while also addressing prior flicker behavior by switching to non-bubbling mouse events.
Changes:
- Add a
skipAnimationsignal to the tooltip manager (time-window based) and use it to inline-disable the entry animation on the next tooltip render. - Switch tooltip triggers from
onMouseOver/onMouseOuttoonMouseEnter/onMouseLeaveto avoid child-to-child mouseout flicker. - Add/adjust unit tests and add a Storybook story to exercise tooltip group behavior.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/eui/src/components/tool_tip/tool_tip.tsx | Uses manager-provided skipAnimation + switches trigger mouse handlers to mouseenter/leave. |
| packages/eui/src/components/tool_tip/tool_tip.test.tsx | Adds regression test for skipping entry animation and resets singleton manager between tests. |
| packages/eui/src/components/tool_tip/tool_tip.stories.tsx | Adds a “TooltipGroup” story to demo grouped tooltip behavior. |
| packages/eui/src/components/tool_tip/tool_tip_manager.ts | Implements time-window-based skipAnimation signal + adds reset() for tests. |
| packages/eui/src/components/tool_tip/tool_tip_manager.test.ts | Adds unit coverage for skipAnimation behavior and uses the new reset(). |
| packages/eui/src/components/tool_tip/tool_tip_anchor.tsx | Updates anchor to accept/pass onMouseEnter/onMouseLeave. |
| packages/eui/src/components/selectable/selectable_list/selectable_list_item.test.tsx | Resets tooltip manager singleton to prevent cross-test animation state leakage. |
| packages/eui/changelogs/upcoming/9749.md | Adds changelog entry for the tooltip behavior change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c116f82 to
90bf47b
Compare
90bf47b to
b3097dc
Compare
1 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuicomment (1 difference)
|
💚 Build Succeeded
History
|
💚 Build Succeeded
History
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.












Previously reverted on #9748 to derisk a release due to changes needed: elastic/kibana#274383
It was already reviewed and tested, it's good to smoke-test and go again.
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: 🟢 Low
Prepped changes: Kibana PR
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