-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(replay): Add layout shift to CLS replay data #13386
Merged
Merged
Changes from 5 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
f69ad3c
update cls to include all entries
c298lee 47b9d8c
update test
c298lee 46d2fc8
fix lint and tests
c298lee ccc3f9e
change back to nodeIds
c298lee 3c4ac43
CI
c298lee d228107
lint
c298lee 3bc5008
Update packages/replay-internal/src/util/createPerformanceEntries.ts
c298lee 9a01f96
PR comments
c298lee 505afeb
rename
c298lee b5cc4f0
return all nodeIds
c298lee bde59a9
update tests
c298lee d9a4bb7
Merge branch 'develop' into cl/web-vital-cls
c298lee ee1c9ef
rename
c298lee 2afdbb1
update browser tests
c298lee 4d996d2
Merge branch 'develop' into cl/web-vital-cls
c298lee 6fd3b0c
comments
c298lee 5ba269c
Merge branch 'develop' into cl/web-vital-cls
c298lee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,7 @@ describe('Unit | util | createPerformanceEntries', () => { | |
name: 'largest-contentful-paint', | ||
start: 1672531205.108299, | ||
end: 1672531205.108299, | ||
data: { value: 5108.299, rating: 'good', size: 5108.299, nodeIds: undefined }, | ||
data: { value: 5108.299, rating: 'good', size: 5108.299, nodeIds: [], layoutShift: undefined }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it doesn't make sense to have |
||
}); | ||
}); | ||
}); | ||
|
@@ -103,7 +103,7 @@ describe('Unit | util | createPerformanceEntries', () => { | |
name: 'cumulative-layout-shift', | ||
start: 1672531205.108299, | ||
end: 1672531205.108299, | ||
data: { value: 5108.299, size: 5108.299, rating: 'good', nodeIds: [] }, | ||
data: { value: 5108.299, size: 5108.299, rating: 'good', nodeIds: [], layoutShift: undefined }, | ||
}); | ||
}); | ||
}); | ||
|
@@ -123,7 +123,7 @@ describe('Unit | util | createPerformanceEntries', () => { | |
name: 'first-input-delay', | ||
start: 1672531205.108299, | ||
end: 1672531205.108299, | ||
data: { value: 5108.299, size: 5108.299, rating: 'good', nodeIds: undefined }, | ||
data: { value: 5108.299, size: 5108.299, rating: 'good', nodeIds: [], layoutShift: undefined }, | ||
}); | ||
}); | ||
}); | ||
|
@@ -143,7 +143,7 @@ describe('Unit | util | createPerformanceEntries', () => { | |
name: 'interaction-to-next-paint', | ||
start: 1672531205.108299, | ||
end: 1672531205.108299, | ||
data: { value: 5108.299, size: 5108.299, rating: 'good', nodeIds: undefined }, | ||
data: { value: 5108.299, size: 5108.299, rating: 'good', nodeIds: [], layoutShift: undefined }, | ||
}); | ||
}); | ||
}); | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would give this a more generic name, otherwise we have a 'WebVitalData' type that's generic with a
layoutShift
property that is very specific to a type of metric.Maybe:
attributions?: {value: number; nodeIds?: number}[]
? orsources?: {value: number; nodeIds?: number}[]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point!