mikke89 / RmlUi

RmlUi - The HTML/CSS User Interface library evolved
https://mikke89.github.io/RmlUiDoc/
MIT License
2.9k stars 318 forks source link

Add support for native tooltips #692

Open hyblocker opened 1 month ago

hyblocker commented 1 month ago

HTML supports usage of the title attribute to define a native OS-level tooltip for some elements. How feasible would it be for RmlUi to implement title attributes for OS-level tooltips? There are some cases where they would be desirable, e.g. when working in a non-conventional platform where using pure HTML/CSS tooltips wouldn't yield the best user experience, and having the system interface handle tooltips would be a wiser choice.

Relevant W3C specification regarding the tooltip attribute may be found here: https://www.w3.org/TR/html4/struct/global.html#adef-title

mikke89 commented 1 month ago

Thanks for the suggestion.

I think this one should be easy enough to achieve on the user side, without any specific involvement from the library. And I'm sure not everyone wants anything to be shown outside the context. For these reasons, I'm not really sure it belongs in the library. Maybe it would be more suitable as a sample?

wh1t3lord commented 1 month ago

I don't think there are any points of a such functionality. Because in many cases a lot of users want to create their own design versions of tooltips. And if we provide hardcoded version that means mikke will maintain a such functionality. And that means user wants to override it like to provide own design so it is kinda not fair (at some point it becomes unreal to easy edit because it makes responsibility for us to handle input for user).

IMO Ussr specific things should not be maintained by developers.

I guess it is indeed better to provide some sample to show the implementation for user especially with custom design + input handling based on Rml + Css usage but not to make mikke's life harder.