Introduction Tooltip Components #1175
Open
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.
Current state
Tooltips do not work on mobile devices. To solve this issue, I created two new components. Also to make it easier to integrate the tooltip icon in our code.
1. Icon with a tooltip
<tooltip-icon />
This is useful when a tooltip icon needs to be placed inside the copy as a single inline element.
2. Text + Icon with a tooltip
<tooltip-text-icon />
Icon with a tooltip that is attached to the text (or rather, to the last word so that the icon does not wrap to a new line). This component make it easier for developers to add help icon with tooltip to form labels and headlines without worrying about the necessary HTML markup. The preferred way.
Layout
I researched the best practices for displaying tooltips on smartphones. As result, on icon tap the tooltip will be displayed at the bottom of the screen. This allows us to display a lot of text while remaining user-friendly and readable. The user can close the tooltip/layer by taping on the close button or outside the layer.
To demonstrate how it works, I added help icons with tooltips to the dashboard (shares rejection, see screens below) and the network view (hostname label). In general, we should inject more hints and integrate help icons in AxeOS. We can do that in a separate PR. This will reduce the number of support requests.
Desktop (tooltip on hover)

Mobile (tooltip on tap)
Mobile.mov