Skip to content

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jun 8, 2023

MDC was setting will-change on a couple of elements which caused significant scrolling performance issues on pages with a lot of form fields. These changes reset the will-change, because one of the elements wasn't being animated at all and the other one was only animating transform which is hardware-accelerated.

Fixes #27249.

For reference, this is before:
https://github.com/angular/components/assets/4450522/923fbb24-4984-47ba-b87b-5645fd344bf6

And this is after:
https://github.com/angular/components/assets/4450522/26565ce1-662d-4c52-b3a3-a5a209027ddb

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release labels Jun 8, 2023
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

LGTM with nits

@crisbeto crisbeto self-assigned this Jun 9, 2023
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jun 9, 2023
@aviralgoyal
Copy link

Any updates on this?

MDC was setting `will-change` on a couple of elements which caused significant scrolling performance issues on pages with a lot of form fields. These changes reset the `will-change`, because one of the elements wasn't being animated at all and the other one was only animating `transform` which is hardware-accelerated.

Fixes angular#27249.
@crisbeto crisbeto merged commit f6e8584 into angular:main Feb 28, 2024
crisbeto added a commit that referenced this pull request Feb 28, 2024
MDC was setting `will-change` on a couple of elements which caused significant scrolling performance issues on pages with a lot of form fields. These changes reset the `will-change`, because one of the elements wasn't being animated at all and the other one was only animating `transform` which is hardware-accelerated.

Fixes #27249.

(cherry picked from commit f6e8584)
crisbeto added a commit to crisbeto/material2 that referenced this pull request Mar 12, 2024
When `will-change` was removed in angular#27251, the form field lost its implicit stacking context which means that some of its descendants may be stacked on top of the container.

These changes add an explicit `z-index` on the container to resolve the issue.

Fixes angular#28708.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Mar 12, 2024
When `will-change` was removed in angular#27251, the form field lost its implicit stacking context which means that some of its descendants may be stacked on top of the container.

These changes add an explicit `z-index` on the container to resolve the issue.

Fixes angular#28708.
crisbeto added a commit that referenced this pull request Mar 12, 2024
…28713)

When `will-change` was removed in #27251, the form field lost its implicit stacking context which means that some of its descendants may be stacked on top of the container.

These changes add an explicit `z-index` on the container to resolve the issue.

Fixes #28708.
crisbeto added a commit that referenced this pull request Mar 12, 2024
…28713)

When `will-change` was removed in #27251, the form field lost its implicit stacking context which means that some of its descendants may be stacked on top of the container.

These changes add an explicit `z-index` on the container to resolve the issue.

Fixes #28708.

(cherry picked from commit ce9a395)
@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 Mar 30, 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 P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance issue in Angular 15/16 Form Fields
4 participants