Open m-akinc opened 2 years ago
@rajsite suggested we should do some research on:
Secretly @rajsite is holding out to see how much progress the popup spec makes hoping it'll make tooltips a less invasive to add and more accessible. Also will help with interactions between components: https://github.com/mfreed7/popup#classes-of-ui---dismiss-behavior-and-interactions
In this AzDO HLD one of the mockups shows a tooltip with formatted content (bold text and a simple table). Have we considered whether/how clients could achieve this via the nimble-tooltip?
This web.dev article came across my feed from a couple different sources: How to write an accessible tooltip. I haven't read it in detail but when we pick up this component again it would be good to ensure our component is accessible and this may give hints about the right way to do that.
In this AzDO HLD one of the mockups shows a tooltip with formatted content (bold text and a simple table). Have we considered whether/how clients could achieve this via the nimble-tooltip?
@jattasNI, this type of layout appears possible with the FAST Tooltip as it seems to support arbitrary content within the tooltip. We'll need to consider the visual design implications since we provide some variations.
Nice, turns out we even have an example of that now in our storybook.
For details on the failing tests in Firefox, see #1075
I enumerated some potential approaches for the tooltip API, and as a team we came to the consensus that what we want (slot-based API) is not worth implementing now, but may become easier in the future when FAST makes it easier to extend component templates. As such, we're deprioritizing this component. Refer to the spec for details about the approach options.
The LiMo project has a use case for a tooltip to briefly show a toast-like success message next to a button that was clicked. They would use the visible
attribute to show it when the button is clicked and hide automatically a few seconds later. They might want to be able to control the padding between the tooltip and its anchor and control which side of the anchor the tooltip is shown from (looks like this is possible in FAST but not documented in Nimble). In future they may also want a success
severity and the ability to slot a ✅ icon next to the text.
Some of this sounds a bit like a "toggle-tip button" that is programmatically dismissed after a delay.
SLE had another use case for a rich text tooltip in this PR. They're using a multi-line title in the calendar / scheduling workflow.
Just leaving a comment to link this issue with #2406. The proposal there was to reconsider this component's long term home as part of #1876.
😯 Problem to Solve
Nimble should provide a tooltip component.
Current status
We have the beginnings of a tooltip component thanks to Aiden's intern work (PRs listed below). There have been some concerns around potential issues of the current implementation that we would like to validate and, if needed, resolve before recommending this component be adopted for our users.
Some potential issues for the current implementation noted:
Previous work
595
664
654
622
608
External References
Angular Material Tooltip - Uses Angular specific functionality (Directive)\ Carbon Design System - Uses tooltip component as a wrapper over content. Atlassian Design System - Also uses a wrapper component Adobe Spectrum (React) - Uses a "Trigger" wrapper along with a standalone component. FAST - Uses "anchor" attribute and id. This is our current implementation.
💁 Proposed Solution
929