-
Notifications
You must be signed in to change notification settings - Fork 841
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
Popover style component which can be displayed on Hover #7469
Comments
I've reread our discussions on Slack and here and wanted to post an answer here as well. Adding a hover trigger to We are exploring the other solution to your problem which is modifying |
CC @MichaelMarcialis - any design suggestions here? |
@cee-chen: Regarding the notion of a hover action triggering the appearance of a popover? Or regarding @tkajtoch's proposal for the Speaking personally, I'd like to avoid supporting hover actions for popovers. It muddies the waters too much between the tooltip and popover components. Beyond the accessibility concerns that @1Copenut already provided, I'd prefer we keep hover events for tooltips and click events for popovers to ensure consistency/predictability for users across Kibana and to prevent scenarios where we are placing actionable content in hover-based elements (creating a potentially frustrating user experience). @achyutjhunjhunwala: You stated above that the current tooltip component limits content customization. Would you mind elaborating on that? Assuming the content that it is meant to house isn't actionable, why couldn't we house the "Resources", "Content", and "Actions" popover contents from your screenshot in the existing tooltip component? The tooltip's As for @tkajtoch's proposal for changing the click to be only on the icon button rather than the whole header, I think that makes sense and would be a good change. |
I'm going to create an issue to update |
I've created #7660 to cover the work required for this effort and assigned it a medium priority. Let me know if this should be a higher priority! |
We're closing this issue since it no longer covers what needs to be done. Please refer to the newly created issue linked above for more details. |
@MichaelMarcialis I was on paternity leave and hence couldn't reply earkier. I guess i missed the fact that Tooltip takes ReactNode also as a prop. But i really like the idea @tkajtoch suggested. That should solve the problem |
Summary
We have quite some requirements where we want to use a popover on a hover action rather than onClick.
I understand from the EUI guidelines that Tooltip should be used for hover actions and Popover for click.
But sometimes we have situations where a click action on the item is already triggering an action and we cannot allow click for popover. For example, the Datatable header, we want an icon to appear on the header which should onHover render the popover but the datatable header already has an onClick action.
Why we cannot use a tooltip in that case ?
Because the tooltip limits us around customisation of the content we want to render.
Considerations
@1Copenut Highlighted some very good points, listing them here
Screenshot of Use Case
Figma Link
The text was updated successfully, but these errors were encountered: