Skip to content

Conversation

@thePunderWoman
Copy link
Contributor

@thePunderWoman thePunderWoman commented Oct 31, 2025

We accounted for skipping leave animations during moves, but not swaps. This PR accounts for the basic swap case, but turns out list reconciliation by design does not identify every swap case. So we cannot just rely on the basic swap functions. So rather than relying on a skip flag, like we had been, this adds the ability to dequeue an animation after it's been queued.

Now, if we attach a node after a detach within the same render cycle, we can remove the leave animation from the animation queue before it would fire. This ensures swaps and moves are safely handled without unexpectedly removing the nodes.

fixes: #64818
fixes: #64730

@thePunderWoman thePunderWoman added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: rc This PR is targeted for the next release-candidate labels Oct 31, 2025
@ngbot ngbot bot added this to the Backlog milestone Oct 31, 2025
@thePunderWoman thePunderWoman force-pushed the swap-fix branch 2 times, most recently from 166a205 to 4db1cfe Compare October 31, 2025 20:07
@thePunderWoman thePunderWoman removed the request for review from AndrewKushnir October 31, 2025 20:57
@thePunderWoman thePunderWoman marked this pull request as draft October 31, 2025 20:57
@thePunderWoman thePunderWoman force-pushed the swap-fix branch 3 times, most recently from b168679 to 86a17d2 Compare October 31, 2025 22:25
@thePunderWoman thePunderWoman marked this pull request as ready for review October 31, 2025 22:26
@thePunderWoman thePunderWoman force-pushed the swap-fix branch 10 times, most recently from 3fe6328 to f14e394 Compare November 3, 2025 20:23
We accounted for skipping leave animations during moves, but not swaps.
This accounts for the swap cases and updates how we deal with swaps and
moves. Now we always queue animations and then essentially dequeue them
if we attach them back in the same render pass.

fixes: angular#64818
fixes: angular#64730
@thePunderWoman thePunderWoman added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 4, 2025
@atscott atscott merged commit 373d263 into angular:main Nov 5, 2025
20 checks passed
@atscott
Copy link
Contributor

atscott commented Nov 5, 2025

This PR was merged into the repository. The changes were merged into the following branches:

@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 Dec 6, 2025
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 area: core Issues related to the framework runtime target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Renderer crashes using new Angular 20.2+ (animate.leave) hook animate.leave is as buggy as a nursery log in a rain forest

3 participants