Skip to content

Patch branch version of #57453 - #57504

Closed
alxhub wants to merge 2 commits into
angular:18.2.xfrom
alxhub:appref-v18
Closed

alxhub wants to merge 2 commits into
angular:18.2.xfrom
alxhub:appref-v18

Conversation

@alxhub

@alxhub alxhub commented Aug 23, 2024

Copy link
Copy Markdown
Member

No description provided.

Previously the zoneless scheduler had a concept of whether views needed to
be refreshed or not, based on the notification type that was received. It
tracked this information as a boolean.

This commit refactors things to track dirtiness in `ApplicationRef` itself,
as a `dirtyFlags` field with bits corresponding to either view tree
dirtiness or after-render hooks.

PR Close angular#57453
@angular-robot angular-robot Bot added the area: core Issues related to the framework runtime label Aug 23, 2024
@ngbot ngbot Bot added this to the Backlog milestone Aug 23, 2024
@alxhub
alxhub marked this pull request as ready for review August 23, 2024 18:07
@alxhub alxhub added the target: patch This PR is targeted for the next patch release label Aug 23, 2024
…hases (angular#57453)

The `afterRender` infrastructure was first implemented around the idea of
independent, singular hooks. It was later updated to support a spec of
multiple hooks that pass values from one to another as they execute, but the
implementation still worked in terms of singular hooks under the hood. This
creates a number of maintenance issues, and a few bugs. For example, when
one hook fails, further hooks in the pipeline should no longer execute, but
this was hard to ensure under the old design.

This refactoring restructures `afterRender` infrastructure significantly to
introduce the concept of a "sequence", a collection of hooks of different
phases that execute together. Overall, the implementation is simplified
while making it more resilient to issues and future use cases, such as the
upcoming `afterRenderEffect`.

As part of this refactoring, the `internalAfterNextRender` concept is
removed, as well as the unused `queueStateUpdate` concept which used it.

PR Close angular#57453
@alxhub alxhub added the action: merge The PR is ready for merge by the caretaker label Aug 23, 2024
@alxhub

alxhub commented Aug 23, 2024

Copy link
Copy Markdown
Member Author

This PR was merged into the repository by commit 6059ca8.

The changes were merged into the following branches: 18.2.x

alxhub added a commit that referenced this pull request Aug 23, 2024
…7504)

Previously the zoneless scheduler had a concept of whether views needed to
be refreshed or not, based on the notification type that was received. It
tracked this information as a boolean.

This commit refactors things to track dirtiness in `ApplicationRef` itself,
as a `dirtyFlags` field with bits corresponding to either view tree
dirtiness or after-render hooks.

PR Close #57453

PR Close #57504
alxhub added a commit that referenced this pull request Aug 23, 2024
…hases (#57453) (#57504)

The `afterRender` infrastructure was first implemented around the idea of
independent, singular hooks. It was later updated to support a spec of
multiple hooks that pass values from one to another as they execute, but the
implementation still worked in terms of singular hooks under the hood. This
creates a number of maintenance issues, and a few bugs. For example, when
one hook fails, further hooks in the pipeline should no longer execute, but
this was hard to ensure under the old design.

This refactoring restructures `afterRender` infrastructure significantly to
introduce the concept of a "sequence", a collection of hooks of different
phases that execute together. Overall, the implementation is simplified
while making it more resilient to issues and future use cases, such as the
upcoming `afterRenderEffect`.

As part of this refactoring, the `internalAfterNextRender` concept is
removed, as well as the unused `queueStateUpdate` concept which used it.

PR Close #57453

PR Close #57504
@alxhub alxhub closed this Aug 23, 2024
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Sep 23, 2024
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 PullApprove: disable target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants