Tooltip Widget Improvement
64
Views
3
Comments
Out of scope
Frontend (App Interfaces)

The tooltip has recently been updated to use JavaScript to track coordinates to know where to position the hover and subsequent tip which is displayed.  This is causing problems when using the new widget. Using JS also seems excessive. 

All you need to do is have an outer container set to position relative and the tooltip in an inner container set to position absolute.  You can then set top, bottom, left and right properties relative to the parent container.

Can someone revisit the tooltip and try to improve it.  Debugging in the browser is also difficult if you can't use the :hov checkbox as the class does not exist until the JS is instantiated.

Hi @JayPea!

First of all, thanks for your suggestion of "improvement"... 

I double quoted "improvement" because this will bring again lot of issues, why?

Since OSUI is a UI Framework we never know the context of patterns usages, that's why we can't use that approach (which one we implemented in first place), if pattern will be used in a context within an overflow hidden the tooltip balloon will be cropped...

Examples of the usage of this context I mentioned above:
- Tooltip inside AccordionItemHeader &/or AccordionItemContent;
- Tooltip inside TabsHeaderItem &/or TabsContentItem;
- Tooltip inside a List (.list class also contains overflow:hidden)
- All places that developers can also add to their structure containing an overflow hidden and width or hight does not have enough space to show the tooltip balloon.

Once again, thank you for you interest in improve the product.

Let us know if you think there are other things that could be improved as well.

Cheers,
JR

Changed the status to
Out of scope

Hi JayPea!

As José Rio explained this was a decision made to improve the behavior of this component inside other components and in contexts that we don't control. For that reason, I'm marking this idea as Out of Scope, but your feedback will be taken into account and this decision will be revisited if we receive further feedback on this topic.

Thank you for the feedback!

Hi @JayPea 

Could you please be more specific about the "problems when using the new widget"?