Skip to content
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

feat(platform-browser): enable removal of styles on component destroy by default #51571

Closed

Conversation

alan-agius4
Copy link
Contributor

This change aligns the settings between G3 and P3 as REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT is already set to true internally.

BREAKING CHANGE: REMOVE_STYLES_ON_COMPONENT_DESTROY default value is now true. This causes CSS of components to be removed from the DOM when destroyed. You retain the previous behaviour by providing the REMOVE_STYLES_ON_COMPONENT_DESTROY injection token.

import {REMOVE_STYLES_ON_COMPONENT_DESTROY} from '@angular/platform-browser';
...
providers: [{
  provide: REMOVE_STYLES_ON_COMPONENT_DESTROY,
  useValue: false,
}]

@alan-agius4 alan-agius4 added area: core Issues related to the framework runtime target: major This PR is targeted for the next major release labels Aug 30, 2023
@ngbot ngbot bot modified the milestone: Backlog Aug 30, 2023
@pullapprove pullapprove bot requested a review from crisbeto August 30, 2023 11:45
@alan-agius4 alan-agius4 force-pushed the change-remove-style-comp-destroy branch from 91bca8b to 67ece0a Compare August 30, 2023 11:46
@angular-robot angular-robot bot added detected: breaking change PR contains a commit with a breaking change detected: feature PR contains a feature commit labels Aug 30, 2023
@alan-agius4 alan-agius4 marked this pull request as draft August 30, 2023 11:46
@alan-agius4 alan-agius4 removed the request for review from crisbeto August 30, 2023 11:46
@alan-agius4
Copy link
Contributor Author

Caretaker note: this needed to be landed in combination with http://cl/561303540 as a patch need to be deleted.

@alan-agius4 alan-agius4 added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Aug 30, 2023
… by default

This change aligns the settings between G3 and P3 as `REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT` is already set to `true` internally.

BREAKING CHANGE: `REMOVE_STYLES_ON_COMPONENT_DESTROY` default value is now `true`. This causes CSS of components to be removed from the DOM when destroyed. You retain the previous behaviour by providing the `REMOVE_STYLES_ON_COMPONENT_DESTROY` injection token.

```ts
import {REMOVE_STYLES_ON_COMPONENT_DESTROY} from '@angular/platform-browser';
...
providers: [{
  provide: REMOVE_STYLES_ON_COMPONENT_DESTROY,
  useValue: false,
}]
```
@alan-agius4 alan-agius4 force-pushed the change-remove-style-comp-destroy branch from 67ece0a to a70e23b Compare August 30, 2023 11:59
@alan-agius4 alan-agius4 marked this pull request as ready for review August 30, 2023 12:23
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 30, 2023
Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

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

LGTM

@jessicajaniuk jessicajaniuk removed the request for review from AndrewKushnir August 30, 2023 14:39
@jessicajaniuk jessicajaniuk added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 30, 2023
@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit c340d6e.

@alan-agius4 alan-agius4 deleted the change-remove-style-comp-destroy branch August 30, 2023 15:11
LayZeeDK pushed a commit to LayZeeDK/angular__angular that referenced this pull request Sep 20, 2023
… by default (angular#51571)

This change aligns the settings between G3 and P3 as `REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT` is already set to `true` internally.

BREAKING CHANGE: `REMOVE_STYLES_ON_COMPONENT_DESTROY` default value is now `true`. This causes CSS of components to be removed from the DOM when destroyed. You retain the previous behaviour by providing the `REMOVE_STYLES_ON_COMPONENT_DESTROY` injection token.

```ts
import {REMOVE_STYLES_ON_COMPONENT_DESTROY} from '@angular/platform-browser';
...
providers: [{
  provide: REMOVE_STYLES_ON_COMPONENT_DESTROY,
  useValue: false,
}]
```

PR Close angular#51571
@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 30, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
… by default (angular#51571)

This change aligns the settings between G3 and P3 as `REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT` is already set to `true` internally.

BREAKING CHANGE: `REMOVE_STYLES_ON_COMPONENT_DESTROY` default value is now `true`. This causes CSS of components to be removed from the DOM when destroyed. You retain the previous behaviour by providing the `REMOVE_STYLES_ON_COMPONENT_DESTROY` injection token.

```ts
import {REMOVE_STYLES_ON_COMPONENT_DESTROY} from '@angular/platform-browser';
...
providers: [{
  provide: REMOVE_STYLES_ON_COMPONENT_DESTROY,
  useValue: false,
}]
```

PR Close angular#51571
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 detected: breaking change PR contains a commit with a breaking change detected: feature PR contains a feature commit merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants