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

Display tooltips in better positions when using touch input #6480

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

frenzibyte
Copy link
Member

@frenzibyte frenzibyte commented Jan 2, 2025

Tooltips displaying on the bottom-right corner of the cursor makes it impossible to view on mobile devices. This changes the position to become above the pointer by an arbitrary number, or to the sides if there's no space above the pointer.

CleanShot.2025-01-01.at.19.12.52.mp4

Tested on both my iPhone and my iPad, the final tooltip distances are sane and not obstructed by my fingers.

@Joehuu
Copy link
Member

Joehuu commented Jan 2, 2025

This will resolve ppy/osu#4224 (can't edit description in this repo).

@frenzibyte
Copy link
Member Author

frenzibyte commented Jan 2, 2025

Hmm, @peppy suggested that the tooltip should be displayed to the top right, while my implementation puts it in the top centre. Not sure which one I would prefer.

@smoogipoo
Copy link
Contributor

I'm a bit torn on this.

  • Right-aligned matches macOS/Windows/Linux UIs, but those are desktop UIs. We're already handling this correctly for these UIs.
  • Top-centre makes sense in my mind for a pure touch control, but touch controls in general don't have tooltips. For example Safari (iOS) doesn't support alt text, and likewise there's no way to "hover over" the timestamp labels in this issue.
  • MAUI's tooltip listing declares tooltips to be top-centred by default.
  • osu!web appears to use top-centre, pushing it to the right if not enough space:
    IMG_0898 IMG_0897

TLDR: Top-right makes sense if we want to keep things consistent. Top-centre makes sense to be friendly to touch users.

Will want @peppy 's opinions in plain text here before going any further.

@smoogipoo smoogipoo requested a review from peppy January 10, 2025 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving tooltip to the top of sliders for pen/touch
3 participants