Skip to content
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

Merged
merged 3 commits into from
Apr 17, 2019
Merged

Conversation

patrickhulce
Copy link
Collaborator

@patrickhulce patrickhulce commented Apr 15, 2019

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 from diagnostics since neither of them describe how it's being used in metrics :)

Related Issues/PRs
No issue was filed specifically, so it can't be closed yet! ;)
#7752

Copy link
Member

@exterkamp exterkamp left a 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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename variable?

@@ -51,7 +51,7 @@ declare global {
overallSavingsBytes?: number;
headings: OpportunityColumnHeading[];
items: OpportunityItem[];
diagnostic?: Diagnostic;
diagnostic?: DebugData;
Copy link
Member

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?

Copy link
Collaborator Author

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;
Copy link
Member

@brendankenny brendankenny Apr 15, 2019

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

export interface Diagnostic {
type: 'diagnostic';
export interface DebugData {
type: 'debug';
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, debugdata SGTM :)

@paulirish
Copy link
Member

name wfm. 👍

@paulirish paulirish mentioned this pull request Apr 16, 2019
67 tasks
Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it

@brendankenny brendankenny merged commit 7154ebd into master Apr 17, 2019
@brendankenny brendankenny deleted the diagnostic_rename branch April 17, 2019 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants