-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Animation not initialized when using ZonelessChangeDetection #54919
Labels
area: core
Issues related to the framework runtime
area: zones
P4
A relatively minor issue that is not relevant to core functions
Milestone
Comments
Async animations currently relies on the import promise being detected by ZoneJS and triggering another round of change detection. |
atscott
added a commit
to atscott/angular
that referenced
this issue
Mar 28, 2024
This change ensures the scheduler is notified when an animation trigger updates. This requires change detection to run to flush the animations. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Mar 29, 2024
…in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Mar 29, 2024
…in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Mar 29, 2024
…in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 5, 2024
…in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 5, 2024
…in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 5, 2024
…in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 5, 2024
…in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 12, 2024
…aded in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 12, 2024
…aded in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 12, 2024
…aded in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 15, 2024
…aded in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 15, 2024
…aded in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 15, 2024
…aded in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 18, 2024
…aded in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 22, 2024
…aded in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 22, 2024
…aded in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 23, 2024
…aded in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 23, 2024
…aded in zoneless Async animations currently works in Zones because the render factory promise resolve causes change detection to happen. fixes angular#54919
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 24, 2024
… ZoneJS (angular#55492) In Angular today, a bound listener automatically marks the view for check. When using ZoneJS, these listeners are most often executed in the Angular Zone as well, so synchronization (`ApplicationRef.tick`) will eventually happen. _However_, developers can opt out of zone-patching for events in several ways, and often do this for very frequent listeners like `mousemove`, `resize`, and `scroll`. We do not want to break existing expectations that these are now "safe" events to have listeners for by automatically scheduling change detection regardless of whether the listener executed inside or outside the Angular zone. In contrast, in order for developers to more easily transition to zoneless, we need to be able to ensure that components which are using `OnPush` are, for the most part, compatible with zoneless as well. Because listeners automatically mark the component for check, developers using `OnPush` did not/do not need to also call `ChangeDetectorRef.markForCheck` or a similar API. Unfortunately, this means that we need to consider the listener callbacks as a notification to schedule a `tick` when Zoneless is enabled. In the future, we would like to have an opt-out for this (i.e. signal components) since it's not really how we _want_ things to work. Also includes the fix for angular#54919 that got reverted only because it was easier to revert the set of conflicting commits
atscott
added a commit
to atscott/angular
that referenced
this issue
Apr 24, 2024
… ZoneJS (angular#55492) In Angular today, a bound listener automatically marks the view for check. When using ZoneJS, these listeners are most often executed in the Angular Zone as well, so synchronization (`ApplicationRef.tick`) will eventually happen. _However_, developers can opt out of zone-patching for events in several ways, and often do this for very frequent listeners like `mousemove`, `resize`, and `scroll`. We do not want to break existing expectations that these are now "safe" events to have listeners for by automatically scheduling change detection regardless of whether the listener executed inside or outside the Angular zone. In contrast, in order for developers to more easily transition to zoneless, we need to be able to ensure that components which are using `OnPush` are, for the most part, compatible with zoneless as well. Because listeners automatically mark the component for check, developers using `OnPush` did not/do not need to also call `ChangeDetectorRef.markForCheck` or a similar API. Unfortunately, this means that we need to consider the listener callbacks as a notification to schedule a `tick` when Zoneless is enabled. In the future, we would like to have an opt-out for this (i.e. signal components) since it's not really how we _want_ things to work. Also includes the fix for angular#54919 that got reverted only because it was easier to revert the set of conflicting commits
AndrewKushnir
pushed a commit
that referenced
this issue
Apr 25, 2024
… ZoneJS (#55492) (#55525) In Angular today, a bound listener automatically marks the view for check. When using ZoneJS, these listeners are most often executed in the Angular Zone as well, so synchronization (`ApplicationRef.tick`) will eventually happen. _However_, developers can opt out of zone-patching for events in several ways, and often do this for very frequent listeners like `mousemove`, `resize`, and `scroll`. We do not want to break existing expectations that these are now "safe" events to have listeners for by automatically scheduling change detection regardless of whether the listener executed inside or outside the Angular zone. In contrast, in order for developers to more easily transition to zoneless, we need to be able to ensure that components which are using `OnPush` are, for the most part, compatible with zoneless as well. Because listeners automatically mark the component for check, developers using `OnPush` did not/do not need to also call `ChangeDetectorRef.markForCheck` or a similar API. Unfortunately, this means that we need to consider the listener callbacks as a notification to schedule a `tick` when Zoneless is enabled. In the future, we would like to have an opt-out for this (i.e. signal components) since it's not really how we _want_ things to work. Also includes the fix for #54919 that got reverted only because it was easier to revert the set of conflicting commits PR Close #55525
AndrewKushnir
pushed a commit
that referenced
this issue
Apr 25, 2024
… ZoneJS (#55492) (#55525) In Angular today, a bound listener automatically marks the view for check. When using ZoneJS, these listeners are most often executed in the Angular Zone as well, so synchronization (`ApplicationRef.tick`) will eventually happen. _However_, developers can opt out of zone-patching for events in several ways, and often do this for very frequent listeners like `mousemove`, `resize`, and `scroll`. We do not want to break existing expectations that these are now "safe" events to have listeners for by automatically scheduling change detection regardless of whether the listener executed inside or outside the Angular zone. In contrast, in order for developers to more easily transition to zoneless, we need to be able to ensure that components which are using `OnPush` are, for the most part, compatible with zoneless as well. Because listeners automatically mark the component for check, developers using `OnPush` did not/do not need to also call `ChangeDetectorRef.markForCheck` or a similar API. Unfortunately, this means that we need to consider the listener callbacks as a notification to schedule a `tick` when Zoneless is enabled. In the future, we would like to have an opt-out for this (i.e. signal components) since it's not really how we _want_ things to work. Also includes the fix for #54919 that got reverted only because it was easier to revert the set of conflicting commits PR Close #55525
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: core
Issues related to the framework runtime
area: zones
P4
A relatively minor issue that is not relevant to core functions
Which @angular/* package(s) are the source of the bug?
animations
Is this a regression?
No
Description
a simple reproduction
app.config.ts
app.component.ts
app.component.html
<h1 [@highlight]="highlight()">Hello World</h1>
results:
![image](https://private-user-images.githubusercontent.com/8691013/313560907-66059f3d-e8ec-4bcb-a520-b06cab8ad80d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWI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NTNQUUs0WkElMkYyMDI0MDcwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDhUMTcwODE3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWIzYWUyZGUwYTRkMjFjYzVhNWIyYmM3MzJmOWY5ZDFlN2VmN2FjNjBkZmNjNjA3NDRjMzRmYTkzYzg3ZWVhYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.KhvnwT4nrdjShm3xNMPv3_1XecHbRP-8-9Gl6v3q5lM)
if no apply ɵprovideZonelessChangeDetection()
if apply ɵprovideZonelessChangeDetection()
Please provide a link to a minimal reproduction of the bug
https://github.com/keatkeat87/zoneless-animation-issue
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: