-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fix tooltip so only one shows at a time when hovering #90457
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
Conversation
c78d777 to
9ae9cf3
Compare
9ae9cf3 to
be24d2e
Compare
darrenaustin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I just had a quibble about the use of 'covered', but the implementation looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a little confused when I first saw the term "covered' here. This really isn't covering the other tooltips so much as hiding them. Perhaps "hidden" would be a better term here? Or maybe call the current tooltip the active one and the others are inactive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I do agree about the name, but "_hideTooltip" is already a thing that means something entirely different.
Hmm. Maybe I'll rename _hideTooltip to _dismissTooltip and switch from "cover" to hide that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I tried to do this, and the problem is that the opposite of "hide" is "show", and so changing the name of "_hideTooltip" would mean changing "_showTooltip" too, and also the public API value "showDuration", which would be breaking.
How about "conceal" and "reveal" instead of "cover" and "uncover"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bummer. Yeah, "conceal" would be better than "cover" to me. How about the notion of having a tooltip be "active" or not? There would only ever be one active tooltip, correct?
be24d2e to
46dd230
Compare
d48eae5 to
1c91e26
Compare
1c91e26 to
6013be9
Compare
In the process of fixing flutter#90044, I realized that it's also possible for hovered tooltips to show more than one at a time if the widgets are nested, so this PR is a fix that prevents more than one tooltip from showing at a time with hovered tooltips.
…r#90457)" (flutter#90909) This reverts commit 885b2f5 to green up the build. Submitting on red to fix the build.
…er#90457)" (flutter#90917) This reverts commit ab51a02 and fixes the test that broke the first time it landed.
Description
In the process of fixing #90044, I realized that it's also possible for hovered tooltips to show more than one at a time if the widgets are nested, so this PR is a fix that prevents more than one tooltip from showing at a time with hovered tooltips.
Before:
before_tooltip.mp4
After:
after_tooltip.mp4
Tests