-
Notifications
You must be signed in to change notification settings - Fork 27k
fix(core): update animation scheduling #64441
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
adab1f1 to
95f5c8f
Compare
95f5c8f to
b92c8ba
Compare
|
Caretaker note: the failing G3 tests are unrelated to this change. |
JoostK
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.
It should be possible to write a test for this, right?
|
@JoostK I'm honestly not sure how this would be handled in a test. |
I don't know the exact nature of #64423, but replicating that in a test and verifying that things get destroyed as expected sounds browser/animating timing independent so is hopefully reliably testable. Given the subtleties of the timing and this being a regression makes it even more a candidate to have a test for. |
|
@JoostK I'm happy to add it. I'm just not sure what it would look like. That issue does not have a very minimal reproduction, which is quite challenging to pare down. |
5ead563 to
622aa92
Compare
In some rare cases, it seems the animation queue disappears despite being afterEveryRender. This updates the animation scheduler to be afterNextRender instead and only schedules it when we need to. fixes: angular#64423
622aa92 to
308e5db
Compare
|
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. |
In some rare cases, the injection context that houses the
afterEveryRenderfor the animation queue gets destroyed. This results in any subsequent animations getting queued, but never run. To prevent this from happening, this PR updates the queuing mechanism to useafterNextRenderand to trigger the scheduling at the time of adding animations to that queue. This has a nice side effect of optimizing the animation queue to only run animations when needed.fixes: #64423