-
Notifications
You must be signed in to change notification settings - Fork 142
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
🐛 ignore layout shifts that happen before view start #3058
Conversation
On "route change" views, the CLS computation took any buffered layout shift entry into account, so in some cases it reflected the CLS of an anterior view. This commit fixes the issue by ignoring layout shifts that happened before the view start. We still use the buffered entries so we can use layout shift entries that happens before the SDK is initialized.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3058 +/- ##
==========================================
- Coverage 93.67% 93.53% -0.15%
==========================================
Files 275 275
Lines 7610 7611 +1
Branches 1707 1707
==========================================
- Hits 7129 7119 -10
- Misses 481 492 +11 ☔ View full report in Codecov by Sentry. |
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
/to-staging |
🚂 Branch Integration: starting soon, median merge time is 0s Commit 178e8767b0 will soon be integrated into staging-41. Use |
Integrated commit sha: 178e876 Co-authored-by: Benoît Zugmeyer <[email protected]>
🚂 Branch Integration: This commit was successfully integrated Commit 178e8767b0 has been merged into staging-41 in merge commit 4364884347. Check out the triggered pipeline on Gitlab 🦊 |
Motivation
On "route change" views, the CLS computation took any buffered layout shift entry into account, so in some cases it reflected the CLS of an anterior view.
Changes
This commit fixes the issue by ignoring layout shifts that happened before the view start.
We still use the buffered entries so we can use layout shift entries that happens before the SDK is initialized.
Testing
I have gone over the contributing documentation.