Is there currently a solution for tooltips that is promoted by the core team? Spectrum UXP doesn’t have documentation for
<sp-tooltip>, but I can kludge together something based on the Spectrum web components docs. However, these are nigh unusable on any elements that are near the edge of the plugin bounds — something I’d expect a first-party solution to automatically take into account.
There’s also the option of setting the
title attribute on things to initiate the native tooltip, which works well, but feels weird since the web components have a dedicated component for tooltips.
Am I missing obvious solution? Do people just skip tooltips entirely these days? Is every plugin developer re-solving this problem?
Thanks for your input.
Unless you really need pretty tooltips, the simplest route is to use
Pretty tooltips are nice, but it’s going to be a painful journey – if you’re not fighting with edge detection, you’re definitely going to be fighting with focus stealing should the tooltip appear while a text field is selected.
title tooltips won’t have either problem.
Not saying those issues shouldn’t be addressed in UXP. But you’ll have fewer “bang head against desk” moments if you just use
Great, I appreciate the sanity check. Thanks @kerrishotts
title is probably the only option. Unless Adobe fixes z-indexes and how relative/absolute positions work, there’s no way tooltip would work in all cases (probably most of the time tooltip would appear behind other elements)
I’ll try to re-create as simple example as possible and post it on a separate topic, but it really is messed up right now so might take a while
Ha, @Karmalakas you don’t need to do that for my benefit. I prefer the title option since it creates the same format of tooltip that the rest of photoshop uses.
It’s for me too. For the past week was developing absolutely positioned drop-down menus and probably 3-4 days went just into UI. Still didn’t achieve what I wanted because of mentioned reasons
So I tried to reproduce the issue as a simple example, but couldn’t. Tried to find the reason of that issue on my plugin, but couldn’t So I just re-wrote that part of CSS and now it seems it’s working properly and absolute elements are on top of relative as they supposed to be. Still don’t know what was wrong before
So, why does:
not indicate that they don’t work with UXP?
Where does it indicate that it works? Almost nothing from Spectrum Design System works with UXP out of the box. This and Spectrum UXP are two different things. Yes, it’s confusing, but it is what it is