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

core(layout-shift-elements): aggregate all remaining elements #15593

Merged
merged 8 commits into from
Dec 8, 2023

Conversation

adamraine
Copy link
Member

@adamraine adamraine commented Nov 7, 2023

Closes #15423

@connorjclark
Copy link
Collaborator

connorjclark commented Nov 14, 2023

LGTM

note: this will exacerbate #14583 - CLS is from just the largest shift window, but this audit does not consider windows and shows all shifts. So if you sum these up you'll get something > than CLS (assuming there is more than one shift window).

personally I'd rather show all the shifts regardless of CLS windowing (as the audit does now), and just be OK w/ these not summing to CLS score. the windowing thing for CLS score makes sense in terms of defining a metric, but for fixing layout shifts on a page I feel like it's more important to consider the largest shifts / largest impacted nodes. It won't give the min. path to a smaller CLS but it will have larger user impact imo.

@adamraine

This comment was marked as resolved.

]);
});

it('combines scores for the same nodeId accross multiple shift events', async () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

This test case was moved to computed/metrics/cumulative-layout-shift-test.js. The remaining tests were already covered in that file.

@adamraine adamraine marked this pull request as ready for review December 7, 2023 21:26
@adamraine adamraine requested a review from a team as a code owner December 7, 2023 21:26
@adamraine adamraine requested review from connorjclark and removed request for a team December 7, 2023 21:26
@adamraine adamraine merged commit 2338efc into main Dec 8, 2023
27 checks passed
@adamraine adamraine deleted the layout-shift-event-aggregate branch December 8, 2023 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

layout-shift-elements max out at 5 elements
3 participants