Repository navigation
fix(core): correctly project single-root content inside control flow - #54879
Closed
pkozlowski-opensource wants to merge 1 commit into
Closed
pkozlowski-opensource wants to merge 1 commit into
pkozlowski-opensource wants to merge 1 commit into
Conversation
Member
Author
|
@crisbeto this PR has runtime bits + tests of the changed strategy of inserting conditional content into containers. I've added tests for Important notes:
|
crisbeto
reviewed
Mar 15, 2024
Member
There was a problem hiding this comment.
Nice! I would probably do it in a standalone PR though.
Member
Author
There was a problem hiding this comment.
Yep, make sense to do it in a separate PR!
This commit changes the way we use containers to insert conditional content. Previously if and switch conditional would always use the first content as the insertion container. This strategy interfered with content projection that projects entire containers - as the consequence content for _all_ cases would end up in slot matched by the first container. This could be very surprising as desicribed in angular#54840 After the change each conditional content is projected into its own container. This means that content projection can match more than one container and result in correct display. Fixes angular#54840
pkozlowski-opensource
force-pushed
the
control_flow_container_projection
branch
from
March 15, 2024 14:47
af54938 to
f084e77
Compare
Member
|
Compiler changes plus the changes from this PR are in #54921. |
Member
Author
|
Landed as part of #54921 |
|
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. |
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.
This commit changes the way we use containers to insert conditional content. Previously if and switch conditional would always use the first content as the insertion container. This strategy interfered with content projection that projects entire containers - as the consequence content for all cases would end up in slot matched by the first container. This could be very surprising as described in #54840
After the change each conditional content is projected into its own container. This means that content projection can match more than one container and result in correct display.
Fixes #54840