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-experimental/mdc-chips): decouple removal from animation #21636

Merged
merged 2 commits into from
Jan 27, 2021

Conversation

mmalerba
Copy link
Contributor

@mmalerba mmalerba commented Jan 20, 2021

Currently the MDC chips automatically trigger an animation that collapses the chip to 0x0 dimensions, but it still keeps it in the DOM unless the consumer updates their data source. This is misleading and there's no way for the consumer to see it.

These changes bring the chip in line with our current behavior where we only dispatch the remove event and then it's up to the consumer to remove the chip.

Making these changes also revealed some tests that were passing by accident and weren't actually testing the things they were supposed to, because the animationend event wasn't being dispatched. I've tweaked them in order to get them to work as expected.

Fixes #21561.

CARETAKER NOTE: This was previously merged and broke internal tests. Pantheon's harnesses will need to be updated to work with this change

@mmalerba mmalerba 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 Jan 20, 2021
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 20, 2021
@mmalerba mmalerba force-pushed the revert-21634-revert-21586-21561/mdc-chips-remove branch from 7ea16d6 to 96fe14e Compare January 20, 2021 04:28
@google-cla
Copy link

google-cla bot commented Jan 20, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla and removed cla: yes PR author has agreed to Google's Contributor License Agreement labels Jan 20, 2021
@mmalerba mmalerba added cla: yes PR author has agreed to Google's Contributor License Agreement action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release P2 The issue is important to a large percentage of users, with a workaround and removed cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla labels Jan 20, 2021
@google-cla
Copy link

google-cla bot commented Jan 22, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla and removed cla: yes PR author has agreed to Google's Contributor License Agreement labels Jan 22, 2021
@mmalerba mmalerba added cla: yes PR author has agreed to Google's Contributor License Agreement and removed cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla labels Jan 22, 2021
@andrewseguin andrewseguin merged commit 2f61895 into master Jan 27, 2021
andrewseguin pushed a commit that referenced this pull request Jan 27, 2021
…#21636)

* fix(material-experimental/mdc-chips): decouple removal from animation

* fixup! fix(material-experimental/mdc-chips): decouple removal from animation

Co-authored-by: Kristiyan Kostadinov <crisbeto@abv.bg>
(cherry picked from commit 2f61895)
wagnermaciel pushed a commit to wagnermaciel/components that referenced this pull request Feb 8, 2021
…angular#21636)

* fix(material-experimental/mdc-chips): decouple removal from animation

* fixup! fix(material-experimental/mdc-chips): decouple removal from animation

Co-authored-by: Kristiyan Kostadinov <crisbeto@abv.bg>
wagnermaciel pushed a commit to wagnermaciel/components that referenced this pull request Feb 8, 2021
…angular#21636)

* fix(material-experimental/mdc-chips): decouple removal from animation

* fixup! fix(material-experimental/mdc-chips): decouple removal from animation

Co-authored-by: Kristiyan Kostadinov <crisbeto@abv.bg>
@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 Feb 27, 2021
@josephperrott josephperrott deleted the revert-21634-revert-21586-21561/mdc-chips-remove branch June 29, 2022 18:16
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 cla: yes PR author has agreed to Google's Contributor License Agreement merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note P2 The issue is important to a large percentage of users, with a workaround 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(mdc-chips): matChipRemove should not hide the chip
3 participants