Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tooltips #158

Open
MichaelBelousov opened this issue Oct 22, 2024 · 2 comments
Open

tooltips #158

MichaelBelousov opened this issue Oct 22, 2024 · 2 comments

Comments

@MichaelBelousov
Copy link

would be awesome if there was a built-in/recommended way to display a floating tooltip when hovering over something. I think it's a very common UX pattern.

@david-vanderson
Copy link
Owner

Thanks for the issue! I agree and will think about how to do it.

@david-vanderson
Copy link
Owner

I think the best option here is "No-delay static position":

  • tooltip is shown as soon as the mouse pointer is inside the target rectangle.
  • tooltip is positioned relative to the target rectange (doesn't move with mouse).
  • tooltip stays up as long as the mouse pointer is in the target rectangle.
  • can move mouse into the tooltip and interact with widgets inside or even show nested tooltips (works similar to submenus).
  • tooltip goes away when mouse pointer is no longer within target or tooltip or any child tooltip (similar to submenus but doesn't require a click to close)

I see this model in a lot of games so it has real-world experience. However it is different from the traditional "delay after no mouse movement relative to mouse position". Here are reasons I don't like the traditional:

  • hard to know if a tooltip exists, especially with poor fine mouse control
  • easy to accidentally nudge the mouse just after a tooltip appears, then hard to know how to get it back
  • tooltip appears just next to mouse, almost certainly obscuring what you are trying to understand

That's my current thinking, but I don't have a use-case for this yet.

@MichaelBelousov Can you speak to whether this would work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants