Skip to content

fix(core): Flush animations when no component has been checked by CD #58089

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

Closed
wants to merge 1 commit into from

Conversation

JeanMeche
Copy link
Member

fixes #58075

@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Oct 4, 2024
@ngbot ngbot bot added this to the Backlog milestone Oct 4, 2024
@JeanMeche JeanMeche force-pushed the fix/destroy-animation branch from 4564414 to ebdda3b Compare October 5, 2024 10:21
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 5, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 5, 2024
@JeanMeche JeanMeche force-pushed the fix/destroy-animation branch from ebdda3b to 33c4811 Compare October 5, 2024 10:57
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 5, 2024
@JeanMeche JeanMeche force-pushed the fix/destroy-animation branch from 33c4811 to 1b677c5 Compare October 5, 2024 11:49
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 5, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 5, 2024
@JeanMeche JeanMeche force-pushed the fix/destroy-animation branch from 1b677c5 to b6986ee Compare October 5, 2024 12:05
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 5, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 5, 2024
@JeanMeche JeanMeche force-pushed the fix/destroy-animation branch from b6986ee to 1b52af2 Compare October 5, 2024 12:08
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 5, 2024
@ngbot ngbot bot modified the milestone: Backlog Oct 5, 2024
@JeanMeche JeanMeche marked this pull request as ready for review October 5, 2024 12:09
@pullapprove pullapprove bot requested a review from AndrewKushnir October 5, 2024 12:09
@JeanMeche JeanMeche requested review from alxhub and crisbeto and removed request for AndrewKushnir October 5, 2024 12:09
@JeanMeche JeanMeche changed the title fix(core): Run CD after componentRef is removed from the AppRef fix(core): Flush animations when no component has been checked by CD Oct 5, 2024
@JeanMeche JeanMeche force-pushed the fix/destroy-animation branch from 1b52af2 to 2741a92 Compare October 5, 2024 12:19
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Oct 5, 2024
@JeanMeche JeanMeche marked this pull request as draft October 7, 2024 23:47
@JeanMeche JeanMeche closed this Nov 22, 2024
@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 23, 2024
@JeanMeche JeanMeche reopened this Mar 31, 2025
@JeanMeche JeanMeche force-pushed the fix/destroy-animation branch from 2741a92 to 965054a Compare March 31, 2025 21:13
@atscott atscott force-pushed the fix/destroy-animation branch from 24ef696 to 3d34822 Compare April 4, 2025 18:22
@atscott atscott marked this pull request as ready for review April 4, 2025 18:23
@atscott atscott force-pushed the fix/destroy-animation branch from 3d34822 to 47d7760 Compare April 4, 2025 18:24
@JeanMeche JeanMeche force-pushed the fix/destroy-animation branch from 47d7760 to 1b82a35 Compare April 4, 2025 18:57
@atscott atscott force-pushed the fix/destroy-animation branch 2 times, most recently from 5a26e95 to 1f17456 Compare April 7, 2025 17:39
When Angular runs application synchronization automatically, animations
are now guaranteed to be flushed, regardless of whether change detection
was run on any components attached to `ApplicationRef`. This most
frequently affects animations related to component removal where the DOM
element for the component would previously not be removed due to
animations not being flushed

BREAKING CHANGE: Animations are guaranteed to be flushed when Angular
runs automatic change detection or manual calls to `ApplicationRef.tick`.
Prior to this change, animations would not be flushed in some situations
if change detection did not run on any views attached to the
application. This change can affect tests which may rely on the old
behavior, often by making assertions on DOM elements that should have
been removed but weren't because DOM removal is delayed until animations
are flushed.

fixes angular#58075
@atscott atscott force-pushed the fix/destroy-animation branch from 1f17456 to 07c2ae4 Compare April 7, 2025 17:57
@angular-robot angular-robot bot added the detected: breaking change PR contains a commit with a breaking change label Apr 7, 2025
@atscott
Copy link
Contributor

atscott commented Apr 7, 2025

Green TGP (with local changes to fix tests).

@atscott atscott added action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release labels Apr 8, 2025
@atscott
Copy link
Contributor

atscott commented Apr 9, 2025

This PR was merged into the repository by commit 0b69b61.

The changes were merged into the following branches: main

@atscott atscott closed this in 0b69b61 Apr 9, 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 detected: breaking change PR contains a commit with a breaking change target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamically-created component not removed when zoneless is combined with animations
2 participants