-
Notifications
You must be signed in to change notification settings - Fork 31
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
DH-11923: Fix column tooltip when above the table #306
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dsmmcken
force-pushed
the
dmckenzie_DH-11923
branch
from
November 23, 2021 15:53
81ded2a
to
214c3af
Compare
mofojed
requested changes
Nov 23, 2021
mofojed
previously approved these changes
Nov 23, 2021
You'll probably need to rebase so coverage tests don't fail |
Co-authored-by: Mike Bender <mikebender@deephaven.io>
dsmmcken
force-pushed
the
dmckenzie_DH-11923
branch
from
November 23, 2021 21:44
bfcc007
to
65b6aba
Compare
mofojed
approved these changes
Nov 24, 2021
dsmmcken
added a commit
that referenced
this pull request
Feb 2, 2022
- Resolves Grid column tooltips don't work when mouse enters from above #412 - tooltips now have onExited callback, irisgrid updates it's internal state now tooltip exit - Caused by fix for pr #306, introduced this new edge case - Remove this.isExiting from popper, doesn't appear to ever have been used
dsmmcken
added a commit
that referenced
this pull request
Feb 2, 2022
- Resolves Grid column tooltips don't work when mouse enters from above #412 - tooltips now have onExited callback, irisgrid updates it's internal state now tooltip exit - Caused by fix for pr #306, introduced this new edge case - Remove this.isExiting from popper, doesn't appear to ever have been used
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When column tooltips are displayed above the table, instead of below (due to being to close to the bottom edge of the window) attempting to mouse into them was triggering them to close.
This was caused by IrisGridColumnTooltipMouseHandler triggering its own onLeave even when y < 0 that dismissed the tooltip.
This handler is actually unnecessary, as the popper has its on move handler on the window, that handles dismissing when the mouse moves outside the bounds of the popper OR the parent of the popper. And the parent in this case is a wrapper div that is temporarily created by iris gird, and is sized exactly to the column header.
Previously, this wrapper was used for positioning as well. However, this wrapper was being sized to the column width, which meant if the column was wider, and extended past the edge of the grid, the popper would be placed outside the grid as well. This change, restricts the wrapper, to be bounded by the grid.
However, this introduced a new problem, where the popper was now centered over the column space, rather than the label of the column. So additionally, we leverage a popper Reference Object, to act as the positioning guide for the popper, that is centered on the text. The wrapper is still the hover area, used for the mouse leave, the reference object is used just for positioning.