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

Tooltip issues #64

Closed
wordpure opened this issue May 31, 2023 · 2 comments
Closed

Tooltip issues #64

wordpure opened this issue May 31, 2023 · 2 comments
Assignees

Comments

@wordpure
Copy link
Contributor

Problem

  1. Prompt will not adjust position according to window edge

    图片

    图片

  2. Text with a hint is center-aligned instead of left-aligneAlignment of one tooltip text is centered instead of left justified for other tooltips

    图片

URL

irrelevant

Version

0.8

Browser

Firefox 114

OS

Windows 11

Device

PC

@sixcious sixcious self-assigned this Jun 1, 2023
@sixcious sixcious changed the title Prompt text for two questions Reposition tooltips if they don't fit on the screen Jul 1, 2023
@sixcious
Copy link
Owner

sixcious commented Jul 1, 2023

Hi again wordpure, thank you for opening this issue!

  1. Yes, I'm aware of this one. I use balloon.css for tooltips, and unfortunately, while minimal, it's a pure CSS library, so it doesn't contain JavaScript logic to reposition tooltips, and so sometimes they might not fit on the user's screen. There's really not much I can do unless I change to a JavaScript tooltip library like Tippy or Floating UI, which would be a big task. I was considering using Material Design's own tooltips, but that was a very, very long-term goal. Your second screenshot is only an issue for zh/zh_CN though it would be resolved by me changing to a JS library. (This is what it looks like in English.)

Capture

  1. Yes, I remember that one; it was a bit of a pain to add a tooltip for that specific Material button, since it also opens a dialog. I updated the CSS here on GitHub, so it's left-aligned now and will be ready for the next version of Infy.

I'll give this tooltip repositioning issue some more thought whenever I can come back to work on Infy.

Thank you! 💜

@sixcious sixcious changed the title Reposition tooltips if they don't fit on the screen Tooltip issues Jul 7, 2023
@sixcious
Copy link
Owner

sixcious commented Sep 9, 2024

Hi again!

Sorry for the long delay. This should now be resolved in the latest version of Infy Scroll that was released last week (Version 8). It's now using a custom implementation of Floating UI tooltips, which is based on JavaScript, and can calculate where the tooltip can fit and what direction is should be displayed automatically.

Thank you again for reporting this issue, wordpure! ❤️

@sixcious sixcious closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants