Element tooltip when label is too long#14502
Conversation
Adds tooltips to element labels when the label overflows the container.
|
@gcamacho079 can you take this for a spin before I un-draft it? |
|
This is awesome! What I was specifically looking for was:
I also tested this with the Zoom accessibility feature on Mac, and it’s working great! 👍🏼 A couple things:
|
|
@gcamacho079 just pushed some changes to address those issues:
|
|
@brianjhanson thank you! Just pulled this down again; when I tested this time I seem to be causing the tooltip to close on hover, depending on how quickly/slowly I move my mouse. |
|
@brianjhanson Maybe worth addressing #14514 with this as well? |
b3310f2 to
6958061
Compare
6958061 to
cf1123e
Compare
|
@gcamacho079 I think I've resolved the hover issue. Due to the way the markup was, there was a tiny bit of space between the trigger and target. I refactored things a bit so that space is taken up with padding instead of margin, which should maintain the hover state. @brandonkelly I updated table columns to have a max-width of |
|
@brianjhanson fantastic! The hover experience is excellent. |
[ci skip]
Adds two new web components,
craft-element-labelandcraft-tooltip.craft-element-labelnow wraps all element labels and will calculate if the label overflows its container or not. When it does, acraft-tooltipwill be rendered within the.label-linkusing theinnerTextof the element and shown when the user hovers or focuses on the.label-link. This means component requires a.label-linkto be placed inside it to work, which looks to be true in all our cases.Example
craft-tooltipis a more generic component that can eventually be used for any tooltips. It basically wraps Floating UI to handle positioning and rendering an arrow with some intelligence.Example
These are both light DOM components, so styling is handled by regular 'ol CSS.
CleanShot.2024-02-29.at.13.15.54-converted.mp4