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

Fix: Tooltip is hidden if container has overflow hidden #3339

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

lmuntaner
Copy link
Contributor

Motivation

Part of the tooltip of the disabled "Disburse" button is hidden behind the island.

That's because the tooltip uses the window to calculate whether there is enough space to the left or right. The problem happens when the container where the tooltip lives has overflow: hidden.

The tooltip already received a containerSelector. Therefore, it can use the container to calculate the space to the left and right.

Changes

  • Use the container element instead of the width to calculate the space in the left or right of the tooltip.

Tests

  • Purely CSS changes.

Todos

  • Add entry to changelog (if necessary).

@lmuntaner
Copy link
Contributor Author

Before:

Screenshot 2023-09-20 at 10 41 21

Now:

Screenshot 2023-09-20 at 11 14 08

@lmuntaner
Copy link
Contributor Author

lmuntaner commented Sep 20, 2023

@peterpeterparker please review

I checked tooltips in Wallet, Accounts, Neurons, Merge Neurons modal and so far all other tooltips look good also.

@lmuntaner
Copy link
Contributor Author

lmuntaner commented Sep 20, 2023

I found one (not a regression) that still doesn't look good on mobile: Merging neurons.

Screenshot 2023-09-20 at 11 20 52

I'll take a look in another PR because this is not a regression. It's also in main.

Copy link
Member

@peterpeterparker peterpeterparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx

@lmuntaner lmuntaner added this pull request to the merge queue Sep 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 20, 2023
@lmuntaner lmuntaner added this pull request to the merge queue Sep 20, 2023
Merged via the queue into main with commit e0ebbed Sep 20, 2023
38 checks passed
@lmuntaner lmuntaner deleted the fix_LM_tooltip-container-overflow-hidden branch September 20, 2023 11:29
@dskloetd
Copy link
Contributor

FYI, the proper way to deal with this is to place the tooltip at the root of the DOM where it's not inside any container with overflow: hidden.

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

Successfully merging this pull request may close these issues.

3 participants