Repository navigation
Ensure newly created or dirty and reattached views are reachable by change detection traversal - #53022
Closed
atscott wants to merge 1 commit into
Closed
Ensure newly created or dirty and reattached views are reachable by change detection traversal#53022atscott wants to merge 1 commit into
atscott wants to merge 1 commit into
Conversation
atscott
force-pushed
the
dirtyViewReattached2
branch
from
November 20, 2023 17:13
0e36005 to
9eb304f
Compare
atscott
force-pushed
the
dirtyViewReattached2
branch
from
November 29, 2023 17:38
9eb304f to
d66b17c
Compare
alxhub
reviewed
Dec 5, 2023
alxhub
reviewed
Dec 6, 2023
atscott
force-pushed
the
dirtyViewReattached2
branch
3 times, most recently
from
December 6, 2023 17:31
dc8d60e to
7975dea
Compare
atscott
marked this pull request as ready for review
December 7, 2023 20:04
atscott
force-pushed
the
dirtyViewReattached2
branch
from
December 7, 2023 20:07
7975dea to
3a0db8d
Compare
alxhub
approved these changes
Dec 7, 2023
atscott
force-pushed
the
dirtyViewReattached2
branch
from
December 11, 2023 20:01
3a0db8d to
0850db2
Compare
Contributor
Author
|
global presubmit had ~6 total failures:
The last failure is concerning and while the new behavior is still technically correct, this change can lead to actual production issues. As a result, this PR is updated to have the fix controlled by a flag that is off right now. We will roll this out when possible in g3 with the private exports to opt out temporarily. This flag will also be set to true by default for the v18 release. |
…d during CD When a view has the `Dirty` flag and is reattached, we should ensure that it is reached and refreshed during the next change detection run from above. In addition, when a view is created and attached, we should ensure that it is reached and refreshed during change detection. This can happen if the view is created and attached outside a change run or when it is created and attached after its insertion view was already checked. In both cases, we should ensure that the view is reached and refreshed during either the current change detection or the next one (if change detection is not already running). We can achieve this by creating all views with the `Dirty` flag set. However, this does happen to be a breaking change in some scenarios. The one identified internally was actually depending on change detection _not_ running immediately because it relied on an input value that was set using `ngModel`. Because `ngModel` sets its value in a `Promise`, it is not available until the _next_ change detection cycle. Ensuring created views run in the current change change detection will result in different behavior in this case. Making option the default is the solution to angular#52928. That will have to wait for a major version.
atscott
force-pushed
the
dirtyViewReattached2
branch
from
December 13, 2023 20:30
0850db2 to
bfec0c2
Compare
Contributor
Author
|
This PR was merged into the repository by commit 606de51. |
atscott
added a commit
that referenced
this pull request
Dec 14, 2023
…d during CD (#53022) When a view has the `Dirty` flag and is reattached, we should ensure that it is reached and refreshed during the next change detection run from above. In addition, when a view is created and attached, we should ensure that it is reached and refreshed during change detection. This can happen if the view is created and attached outside a change run or when it is created and attached after its insertion view was already checked. In both cases, we should ensure that the view is reached and refreshed during either the current change detection or the next one (if change detection is not already running). We can achieve this by creating all views with the `Dirty` flag set. However, this does happen to be a breaking change in some scenarios. The one identified internally was actually depending on change detection _not_ running immediately because it relied on an input value that was set using `ngModel`. Because `ngModel` sets its value in a `Promise`, it is not available until the _next_ change detection cycle. Ensuring created views run in the current change change detection will result in different behavior in this case. Making option the default is the solution to #52928. That will have to wait for a major version. PR Close #53022
|
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. |
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
…d during CD (angular#53022) When a view has the `Dirty` flag and is reattached, we should ensure that it is reached and refreshed during the next change detection run from above. In addition, when a view is created and attached, we should ensure that it is reached and refreshed during change detection. This can happen if the view is created and attached outside a change run or when it is created and attached after its insertion view was already checked. In both cases, we should ensure that the view is reached and refreshed during either the current change detection or the next one (if change detection is not already running). We can achieve this by creating all views with the `Dirty` flag set. However, this does happen to be a breaking change in some scenarios. The one identified internally was actually depending on change detection _not_ running immediately because it relied on an input value that was set using `ngModel`. Because `ngModel` sets its value in a `Promise`, it is not available until the _next_ change detection cycle. Ensuring created views run in the current change change detection will result in different behavior in this case. Making option the default is the solution to angular#52928. That will have to wait for a major version. PR Close angular#53022
rlmestre
pushed a commit
to rlmestre/angular
that referenced
this pull request
Jan 26, 2024
…d during CD (angular#53022) When a view has the `Dirty` flag and is reattached, we should ensure that it is reached and refreshed during the next change detection run from above. In addition, when a view is created and attached, we should ensure that it is reached and refreshed during change detection. This can happen if the view is created and attached outside a change run or when it is created and attached after its insertion view was already checked. In both cases, we should ensure that the view is reached and refreshed during either the current change detection or the next one (if change detection is not already running). We can achieve this by creating all views with the `Dirty` flag set. However, this does happen to be a breaking change in some scenarios. The one identified internally was actually depending on change detection _not_ running immediately because it relied on an input value that was set using `ngModel`. Because `ngModel` sets its value in a `Promise`, it is not available until the _next_ change detection cycle. Ensuring created views run in the current change change detection will result in different behavior in this case. Making option the default is the solution to angular#52928. That will have to wait for a major version. PR Close angular#53022
amilamen
pushed a commit
to amilamen/angular
that referenced
this pull request
Jan 26, 2024
…d during CD (angular#53022) When a view has the `Dirty` flag and is reattached, we should ensure that it is reached and refreshed during the next change detection run from above. In addition, when a view is created and attached, we should ensure that it is reached and refreshed during change detection. This can happen if the view is created and attached outside a change run or when it is created and attached after its insertion view was already checked. In both cases, we should ensure that the view is reached and refreshed during either the current change detection or the next one (if change detection is not already running). We can achieve this by creating all views with the `Dirty` flag set. However, this does happen to be a breaking change in some scenarios. The one identified internally was actually depending on change detection _not_ running immediately because it relied on an input value that was set using `ngModel`. Because `ngModel` sets its value in a `Promise`, it is not available until the _next_ change detection cycle. Ensuring created views run in the current change change detection will result in different behavior in this case. Making option the default is the solution to angular#52928. That will have to wait for a major version. PR Close angular#53022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See individual commits
fixes #52928