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(material/tooltip): avoid problem when triggers hide animation for not visible tooltip #24652

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

volvachev
Copy link
Contributor

@volvachev volvachev commented Mar 23, 2022

This PR fixes the problem when mat-tooltip-hide triggers the animation of tooltip that has not been shown yet.

Fixes #24614

Caretaker note: Integration test is failing because selenium wants to click on a select item but instead is clicking on the tooltip

@google-cla
Copy link

google-cla bot commented Mar 23, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

A couple of notes:

  1. I think that the correct approach would be to clear the tooltip opening timeout if the pointer is moved away.
  2. I noticed this when I was reworking the tooltip in a5ab8e9, but I ended up keeping the old behavior, because it caused a lot of screenshot failures internally.

@volvachev
Copy link
Contributor Author

A couple of notes:

  1. I think that the correct approach would be to clear the tooltip opening timeout if the pointer is moved away.
  2. I noticed this when I was reworking the tooltip in a5ab8e9, but I ended up keeping the old behavior, because it caused a lot of screenshot failures internally.

The problem is that during the hide action mat-tooltip-hide class is added which has @keyframes -> opacity: 1; animation. As a result hint is shown and disappears in the end of animation, but it hasn't be shown at all. In case when tooltip shouldn't be shown we need to avoid such animation.

After mouseleave event open timeout wipes.

@volvachev volvachev requested a review from crisbeto March 24, 2022 10:38
crisbeto
crisbeto previously approved these changes Apr 1, 2022
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Apr 1, 2022
@andrewseguin andrewseguin removed the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Apr 2, 2022
@rajibhasan11
Copy link

Any update on this?

@zarend
Copy link
Contributor

zarend commented Apr 15, 2022

Hello @volvachev, we're running this PR through Google's internal presubmit. Could you please rebase this branch with master?

@volvachev
Copy link
Contributor Author

Hello @volvachev, we're running this PR through Google's internal presubmit. Could you please rebase this branch with master?

Hi, I did it.

… not visible tooltip

Fixes a bug in Angular Material `tooltip` when `mat-tooltip-hide` class trigger animation for not visible tooltip.

Fixes angular#24614
@zarend
Copy link
Contributor

zarend commented Apr 15, 2022

tyty, the most recent presubmit process from earlier this week had less than ten failures. I'm kicking off a fresh one.

@volvachev
Copy link
Contributor Author

tyty, the most recent presubmit process from earlier this week had less than ten failures. I'm kicking off a fresh one.

So, will my fix be included in new one?

@andrewseguin andrewseguin added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Apr 22, 2022
@Juszczak
Copy link

Any updates?

@wagnermaciel
Copy link
Contributor

@volvachev The presubmit process Zach was describing was for this PR. Each PR is processed independently

From the latest presubmit run, I can see that it only had a handful of failures so it (hopefully) shouldn't be too difficult to get through. Unfortunately I haven't been able to prioritize this enough to sit down and debug each failure

@NoMercy235
Copy link

Hello! It looks like there are no failed checks anymore. Is there any update on this PR?

@cosme-benito
Copy link

Any news about this PR? The impacts of this bug are quite unpleasant for the users.

@mmalerba mmalerba assigned mmalerba and unassigned wagnermaciel Jun 29, 2022
@vasyop
Copy link

vasyop commented Jul 11, 2022

are we there yet?

@NoMercy235
Copy link

Pretty please? 🙏

@wagnermaciel
Copy link
Contributor

I'll take another look. We got this down pretty close but the internal failures are tough to debug. After rerunning internal tests tonight I'll post an update on how things are looking

Copy link
Contributor

@wagnermaciel wagnermaciel left a comment

Choose a reason for hiding this comment

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

lgtm

@wagnermaciel wagnermaciel merged commit 3041cda into angular:main Aug 4, 2022
wagnermaciel pushed a commit that referenced this pull request Aug 4, 2022
… not visible tooltip (#24652)

Fixes a bug in Angular Material `tooltip` when `mat-tooltip-hide` class trigger animation for not visible tooltip.

Fixes #24614

(cherry picked from commit 3041cda)
wagnermaciel pushed a commit that referenced this pull request Aug 4, 2022
… not visible tooltip (#24652)

Fixes a bug in Angular Material `tooltip` when `mat-tooltip-hide` class trigger animation for not visible tooltip.

Fixes #24614

(cherry picked from commit 3041cda)
wagnermaciel added a commit to wagnermaciel/components that referenced this pull request Aug 9, 2022
wagnermaciel added a commit that referenced this pull request Aug 9, 2022
…tion for not visible tooltip (#24652)" (#25426)

This reverts commit 3041cda.

(cherry picked from commit c95ecbe)
wagnermaciel added a commit that referenced this pull request Aug 9, 2022
…tion for not visible tooltip (#24652)" (#25426)

This reverts commit 3041cda.
wagnermaciel added a commit that referenced this pull request Aug 9, 2022
…tion for not visible tooltip (#24652)" (#25426)

This reverts commit 3041cda.

(cherry picked from commit c95ecbe)
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Aug 12, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@angular/cdk](https://github.com/angular/components) | dependencies | patch | [`14.1.1` -> `14.1.2`](https://renovatebot.com/diffs/npm/@angular%2fcdk/14.1.1/14.1.2) |
| [@angular/material](https://github.com/angular/components) | dependencies | patch | [`14.1.1` -> `14.1.2`](https://renovatebot.com/diffs/npm/@angular%2fmaterial/14.1.1/14.1.2) |

---

### Release Notes

<details>
<summary>angular/components</summary>

### [`v14.1.2`](https://github.com/angular/components/blob/HEAD/CHANGELOG.md#&#8203;1412-cedar-cicada-2022-08-11)

[Compare Source](angular/components@14.1.1...14.1.2)

##### material

| Commit | Type | Description |
| -- | -- | -- |
| [69b29046d5](angular/components@69b2904) | fix | **chips:** `selectable="false"` doesn't work on initial assignment ([#&#8203;24906](angular/components#24906)) |
| [0f2ec70c86](angular/components@0f2ec70) | fix | **tooltip:** avoid problem when triggers hide animation for not visible tooltip ([#&#8203;24652](angular/components#24652)) |

##### material-experimental

| Commit | Type | Description |
| -- | -- | -- |
| [0a4d8e9fc4](angular/components@0a4d8e9) | fix | **mdc-list:** set a role on MatNavList and MatActionList ([#&#8203;25412](angular/components#25412)) |

#### Special Thanks

Egor Volvachev, Miles Malerba, Wagner Maciel and Zach Arend

<!-- CHANGELOG SPLIT MARKER -->

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNTQuNyIsInVwZGF0ZWRJblZlciI6IjMyLjE1NC43In0=-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1503
Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(TOOLTIP): Tooltip hide animation appears even if show delay not reached