Skip to content

Conversation

@gspencergoog
Copy link
Contributor

@gspencergoog gspencergoog commented Sep 21, 2021

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

  • Added a test to make sure that more than one hovered tooltip doesn't appear at a time.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Sep 21, 2021
@google-cla google-cla bot added the cla: yes label Sep 21, 2021
@gspencergoog gspencergoog force-pushed the fix_tooltip branch 4 times, most recently from c78d777 to 9ae9cf3 Compare September 22, 2021 17:09
@gspencergoog gspencergoog marked this pull request as ready for review September 22, 2021 18:16
Copy link
Contributor

@darrenaustin darrenaustin left a 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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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"?

Copy link
Contributor

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?

@gspencergoog gspencergoog force-pushed the fix_tooltip branch 3 times, most recently from d48eae5 to 1c91e26 Compare September 24, 2021 20:43
@gspencergoog gspencergoog merged commit 885b2f5 into flutter:master Sep 28, 2021
@gspencergoog gspencergoog deleted the fix_tooltip branch September 28, 2021 21:20
gspencergoog added a commit to gspencergoog/flutter that referenced this pull request Sep 28, 2021
gspencergoog added a commit that referenced this pull request Sep 28, 2021
…" (#90909)

This reverts commit 885b2f5 to green up the build.

Submitting on red to fix the build.
gspencergoog added a commit to gspencergoog/flutter that referenced this pull request Sep 29, 2021
…er#90457)"

This reverts commit ab51a02 and fixes the test that broke the first time it landed.
gspencergoog added a commit that referenced this pull request Sep 29, 2021
…" (#90917)

This reverts commit ab51a02 and fixes the test that broke the first time it landed.
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Oct 29, 2021
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.
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Oct 29, 2021
…r#90457)" (flutter#90909)

This reverts commit 885b2f5 to green up the build.

Submitting on red to fix the build.
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Oct 29, 2021
…er#90457)" (flutter#90917)

This reverts commit ab51a02 and fixes the test that broke the first time it landed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants