GlAvatarsInline: Add tooltip to badge
When using GlAvatarsInline
, a badge next to the avatars shows the number of remaining avatars when the total number of avatars exceeds the given maxVisible
prop. Let's add a tooltip to the badge which shows the names.
We should consider the following:
- We need to specify a prop which will be used for the tooltip content
- We might need to add a threshold prop (either a
max characters to display
ormax names to display
so in case the of a large number of remaining avatars, the tooltip won't bloat. - We should also truncate the tooltip text via JS (and append
...
) when the threshold from (2) is exceeded.
Edited by Martin Wortschack