feat: add config options for reportAll CLS and LCP #619
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Revision 2
In web-vitals 4.x, CLS (along with INP) is only reported by default when visibility-change event fires. Previously, CLS was reported after first input. That means there is no way to make the integ test work unless we flip the
reportAlChanges
flag.We want to release
reportAllChanges
flag for web vitals anyways. Since that feature unblocks the integ test in this pull request, then we can group them together for CLS+LCP and fast-forward merge to preserve the commit history.Revision 1
The web-vitals library has upgraded to 4.x, and we need to keep pace. This is also necessary for INP.
One breaking change is that they renamed the incorrectly named LCP attribution
resourceLoadTime
toresourceLoadDuration
. GoogleChrome/web-vitals#450We will not rename this field yet unless we upgrade to another major version. So in the meantime we will keep the old name but take the same value.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.