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

UX: positioning is off, arrow does not point to the target #1723

Closed
sammuell opened this issue Jul 14, 2022 · 1 comment
Closed

UX: positioning is off, arrow does not point to the target #1723

sammuell opened this issue Jul 14, 2022 · 1 comment
Labels

Comments

@sammuell
Copy link
Contributor

sammuell commented Jul 14, 2022

Description

This is a mobile-friendliness issue. On small screens the tooltip is overlapping the edge of the screen. The pointing arrow is completely off because it is positioned in the middle.

Expected Behavior

The tooltip should always completely stay within the viewport. The arrow should actually point at the target.

Actual Behavior, Errors and Screenshots

The arrow does not point at the target. The tooltip is offset to the right. There is already another issue about the tooltip offset: #1701

Screenshot 2022-07-14 151253

The tooltip overflows the viewport and the arrow is off as well
Screenshot 2022-07-14 151316

Example

The screenshots above have been made using this fiddle by modifying the width of the preview pane.
https://jsfiddle.net/bcauqyeL/

Possible solution

Completely reimplement the positioning of the tooltip and arrow.
Instead of having the arrow static at three possible positions (left/center/right or top/center/bottom) and position the tooltip accoringly, rather first determine the best position of the tooltip and then calculate the offset of the arrow (basically allow the arrow to be positioned anywhere along the edge of the tooltip).

@stale
Copy link

stale bot commented Sep 20, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 20, 2022
@stale stale bot closed this as completed Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant