Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(platform-browser): styles not replaced during HMR when using animations renderer #59393

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

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jan 7, 2025

When we replace a component during HMR, we clear it from the cache of the renderer factory, however when using animations, there's an animation-specific renderer factory that wraps the base DOM one and was preventing the cache from being cleared.

These changes rework the logic that clear the cache to go through a method so we can forward the call to the delegated factory.

@crisbeto crisbeto added target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 7, 2025
@crisbeto crisbeto marked this pull request as ready for review January 7, 2025 11:27
…ations renderer

When we replace a component during HMR, we clear it from the cache of the renderer factory, however when using animations, there's an animation-specific renderer factory that wraps the base DOM one and was preventing the cache from being cleared.

These changes rework the logic that clear the cache to go through a method so we can forward the call to the delegated factory.
Copy link
Contributor

@thePunderWoman thePunderWoman 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: fw-general, size-tracking

@pullapprove pullapprove bot requested a review from thePunderWoman January 7, 2025 15:14
@thePunderWoman thePunderWoman added the area: core Issues related to the framework runtime label Jan 7, 2025
@ngbot ngbot bot added this to the Backlog milestone Jan 7, 2025
@thePunderWoman thePunderWoman 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 Jan 7, 2025
thePunderWoman pushed a commit that referenced this pull request Jan 7, 2025
…ations renderer (#59393)

When we replace a component during HMR, we clear it from the cache of the renderer factory, however when using animations, there's an animation-specific renderer factory that wraps the base DOM one and was preventing the cache from being cleared.

These changes rework the logic that clear the cache to go through a method so we can forward the call to the delegated factory.

PR Close #59393
@thePunderWoman
Copy link
Contributor

This PR was merged into the repository by commit 0e23f20.

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

@crisbeto crisbeto mentioned this pull request Jan 21, 2025
crisbeto added a commit to crisbeto/angular that referenced this pull request Jan 21, 2025
…nc animations

Fixes that the async animations renderer didn't have the logic to clean up its style cache during HMR. This is identical to angular#59393.

Fixes angular#59640.
AndrewKushnir pushed a commit that referenced this pull request Jan 21, 2025
…nc animations (#59644)

Fixes that the async animations renderer didn't have the logic to clean up its style cache during HMR. This is identical to #59393.

Fixes #59640.

PR Close #59644
AndrewKushnir pushed a commit that referenced this pull request Jan 21, 2025
…nc animations (#59644)

Fixes that the async animations renderer didn't have the logic to clean up its style cache during HMR. This is identical to #59393.

Fixes #59640.

PR Close #59644
@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 Feb 7, 2025
PrajaktaB27 pushed a commit to PrajaktaB27/angular that referenced this pull request Feb 7, 2025
…ations renderer (angular#59393)

When we replace a component during HMR, we clear it from the cache of the renderer factory, however when using animations, there's an animation-specific renderer factory that wraps the base DOM one and was preventing the cache from being cleared.

These changes rework the logic that clear the cache to go through a method so we can forward the call to the delegated factory.

PR Close angular#59393
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.

3 participants