-
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: rename diagnostics to debugData #8298
Conversation
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.
LGTM from a proto perspective. Since it is in details
it's hard to mess it up since its freeform. I'll leave the efficacy of this rename to other reviewers 😉
@@ -63,11 +63,11 @@ class AxeAudit extends Audit { | |||
{key: 'node', itemType: 'node', text: str_(UIStrings.failingElementsHeader)}, | |||
]; | |||
|
|||
/** @type {LH.Audit.Details.Diagnostic|undefined} */ | |||
/** @type {LH.Audit.Details.DebugData|undefined} */ | |||
let diagnostic; |
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.
rename variable?
types/audit-details.d.ts
Outdated
@@ -51,7 +51,7 @@ declare global { | |||
overallSavingsBytes?: number; | |||
headings: OpportunityColumnHeading[]; | |||
items: OpportunityItem[]; | |||
diagnostic?: Diagnostic; | |||
diagnostic?: DebugData; |
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 think all these diagnostic
need to be renamed?
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.
yeah fo sho, didn't expect the first name go around to be accepted :D
/** @type {LH.Audit.Details.Diagnostic|undefined} */ | ||
let diagnostic; | ||
/** @type {LH.Audit.Details.DebugData|undefined} */ | ||
let debugData; |
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.
just debug
?
edit: or keep as debugData
, see below
types/audit-details.d.ts
Outdated
export interface Diagnostic { | ||
type: 'diagnostic'; | ||
export interface DebugData { | ||
type: 'debug'; |
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.
if we go with type DebugData
maybe this string should be debugdata
and the property name debugData
?
It's a little confusing having both debug
and debugData
as reasonable local variable names
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.
agreed, debugdata
SGTM :)
name wfm. 👍 |
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.
love it
Summary
All the data here is essentially used for debugging, so
debugData
seems fair.metrics
audit is probably the one exception where I'd expect folks to be explicitly relying on this for presentation, so I'm not sure what to do there. OTOH I also don't feel particularly strongly it needs to be renamed away fromdiagnostics
since neither of them describe how it's being used inmetrics
:)Related Issues/PRs
No issue was filed specifically, so it can't be closed yet! ;)
#7752