Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiTooltip] Add an "alwaysVisible" prop #5013

Closed
sebelga opened this issue Aug 10, 2021 · 4 comments · Fixed by #5066
Closed

[EuiTooltip] Add an "alwaysVisible" prop #5013

sebelga opened this issue Aug 10, 2021 · 4 comments · Fixed by #5066

Comments

@sebelga
Copy link
Contributor

sebelga commented Aug 10, 2021

In elastic/kibana#107292 @cchaos suggested to use a tooltip to give instruction on how to interact with the keyboard on a component. This works well except that, when the tooltip is shown if we mouse out it disappears.

I suggest that we add a new alwaysVisible optional prop to the <EuiToltip /> component which will always display the tooltip and not react to mouse events. The consumer would then be responsible to hide it if needed.

@cchaos
Copy link
Contributor

cchaos commented Aug 10, 2021

For some clarification for whoever picks this up, the tooltip would be always visible only when the wrapped element is in :focus.

@hardikhere
Copy link

Can I pick this up? May be we can also add prop like disapearAfter={some value in milisec} what do you think
?

@cchaos
Copy link
Contributor

cchaos commented Aug 11, 2021

So I've been thinking about solutions to this issue, remembering there was a "resolved" issue around closing tooltips on every mouse out/move, even when focused (#2560 & #3335). Looking at that specific issue, it seems the behavior being circumvented was when there were two or more elements in close proximity with tooltips and one is focused. I feel like most recently I've been more frustrated with tooltips closing when I don't want them to and seen less tooltips this close together.

@chandlerprall Since you were the one who originally opened the issue, was there more than just the overlapping tooltip issue?

My inclination, honestly, is just to revert #3335 or at least remove the mouse out/move listener when the element is focused.

@chandlerprall
Copy link
Contributor

@cchaos it was only the fact that two tooltips were being displayed at the same time. I'm okay with reverting #3335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants