-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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: normalize node information in gathering #11405
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
ef4db92
added consistency within artifacts that use nodes - for better node i…
adrianaixba 9b97ab9
cleaning up getNodeInfo
adrianaixba c299b95
fixed declarationa and oopif smoke rect error
adrianaixba 279d86b
fixed some smoke tests, and added implementation of getNodeInfo on li…
adrianaixba 82d4e72
lint things
adrianaixba 3bec7f1
removed boundingRect from script-elements
adrianaixba f0b3938
iframe-elements clientRect for backwards capabilities
adrianaixba 55a5f00
cool object.assign() implementation for cleaning up getNodeInfo spread
adrianaixba 76e7d72
Merge branch 'master' into devtools-node-path
adrianaixba 9fe609f
anchor-elements outerHTML property not needed, same as node snippet
adrianaixba dc516c9
Merge branch 'devtools-node-path' of https://github.com/GoogleChrome/…
adrianaixba c3346c3
cleanups
adrianaixba af20d48
cleanups
adrianaixba df39ee1
fixed passwords artifact, deleted truncate method
adrianaixba f18bb19
cleanup
adrianaixba cda6169
changing getNodeInfo to getNodeDetails
adrianaixba bb4ab94
cleanups
adrianaixba 1a7d1d1
cleanups
adrianaixba 9d57d5f
cleanups
adrianaixba ae2782a
added NodeDetails interface
adrianaixba f9afa97
cleanups
adrianaixba 3da2b5e
cleanups
adrianaixba 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
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
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.
in connor's braindump he noted our artifacts use both
path
anddevtoolsNodePath
, and suggested we normalize to dNP.however our public audit details type of
NodeValue
usespath
:lighthouse/types/audit-details.d.ts
Line 206 in a1571ba
this is the only property that gets renamed from artifacts to audit details...
snippet
,selector
and evennodeLabel
are consistent on both sides.renaming these as
path
in the artifacts would be nice for consistency.. it does lose a bit of signal, but perhaps its worth it? wdyt @connorjclark @patrickhulceThere 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'd agree if
path
weren't so painfully ambiguous (never in a million years as a standard consumer of an LHR would I expectpath
to be this series of random integers nor would I know how to use it) 😬For that reason I think it's worth the cost to normalize on
devtoolsNodePath
and upgrade the renderer to support both in a future PR (which eventual removal of.path
in some future breaking version). The fact that it also is only relevant to DevTools integration makes it easier of a change in the renderer/LHR too since it's unlikely our other big report renderer implementations (LHCI, Calibre, Treo, etc) are relying on this.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.
FWIW when I was helping with adding
devtoolsNodePath
in #11061, I found it confusing when trying to remember howNodeDetails
worked and the extra context from the name helped on the artifacts side. It would be unfortunate to lose that.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.
yah sg. renaming the audit details prop to devtoolsNodePath seems like a win, even if its a bit more painful to do.