-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material-experimental/mdc-chips): decouple removal from animation #21586
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
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 angular#21561.
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 - you're awesome @crisbeto, thanks for making this change
…#21586) 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. (cherry picked from commit 2d66ecb)
It looks like I ran the presubmit for this when a bunch of internal tests were broken. That caused it to skip all of the broken tests and made it appear that this was safe to merge. However, now that the tests are fixed, it appears this actually breaks a number of tests so I'll need to revert it for now. |
…angular#21586) 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 angular#21561.
…nimation (angular#21586)" (angular#21634) This reverts commit 2d66ecb.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.