Skip to content

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Jul 31, 2024

These changes replace most usages of removeChild with remove. The latter has the advantage of not having to look up the parentNode and ensure that the child being removed actually belongs to the specific parent.

The refactor should be fairly safe since all the browsers we cover support remove. Something similar was done in Components some time ago and there haven't been any bug reports as a result.

@crisbeto crisbeto added area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release action: global presubmit The PR is in need of a google3 global presubmit labels Jul 31, 2024
@ngbot ngbot bot added this to the Backlog milestone Jul 31, 2024
@crisbeto crisbeto force-pushed the remove-child-again branch from a19a358 to 8457281 Compare July 31, 2024 06:38
@crisbeto
Copy link
Member Author

crisbeto commented Jul 31, 2024

Mostly passing TGP, aside from one unrelated failure and one that I'll clean up before we submit.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: global presubmit The PR is in need of a google3 global presubmit labels Jul 31, 2024
@crisbeto crisbeto marked this pull request as ready for review July 31, 2024 10:40
Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Reviewed-for: fw-security

Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-for: global-approvers

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker action: global presubmit The PR is in need of a google3 global presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer action: merge The PR is ready for merge by the caretaker labels Aug 6, 2024
@crisbeto
Copy link
Member Author

crisbeto commented Aug 6, 2024

Will run another TGP just in case.

These changes replace most usages of `removeChild` with `remove`. The latter has the advantage of not having to look up the `parentNode` and ensure that the child being removed actually belongs to the specific parent.

The refactor should be fairly safe since all the browsers we cover support `remove`. [Something similar was done in Components](angular/components#23592) some time ago and there haven't been any bug reports as a result.
@crisbeto crisbeto force-pushed the remove-child-again branch from 8457281 to 108356b Compare August 7, 2024 11:37
@crisbeto
Copy link
Member Author

crisbeto commented Aug 7, 2024

Passing TGP from today

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: global presubmit The PR is in need of a google3 global presubmit labels Aug 7, 2024
thePunderWoman pushed a commit that referenced this pull request Aug 7, 2024
These changes replace most usages of `removeChild` with `remove`. The latter has the advantage of not having to look up the `parentNode` and ensure that the child being removed actually belongs to the specific parent.

The refactor should be fairly safe since all the browsers we cover support `remove`. [Something similar was done in Components](angular/components#23592) some time ago and there haven't been any bug reports as a result.

PR Close #57203
@thePunderWoman
Copy link
Contributor

This PR was merged into the repository by commit 513a4fe.

The changes were merged into the following branches: main, 18.1.x

nartc added a commit to angular-threejs/angular-three that referenced this pull request Aug 13, 2024
This was affected by a recent change in Angular upstream that Angular
core decides to use `element.remove()` instead of
`parent.removeChild(element)`. Hence, during the unmount phase, the
`parent` is never calculated and passed in.
angular/angular#57203
@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 Sep 7, 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 target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants