-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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(lhr): rename perf-hint, perf-info, etc #5102
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.
mostly LGTM, just a few naming nits and potential unnecessary changes
infoAudits.forEach(item => infoAuditsEl.appendChild(this.renderAudit(item))); | ||
infoAuditsEl.open = true; | ||
element.appendChild(infoAuditsEl); | ||
const diagAudits = category.audits |
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.
does diagnosticAudits push this over line limits? diag
is a bit more of a stretch IMO :)
hintAudits.forEach(item => hintAuditsEl.appendChild(this._renderPerfHintAudit(item, scale))); | ||
hintAuditsEl.open = true; | ||
element.appendChild(hintAuditsEl); | ||
const oppsEl = this.renderAuditGroup(groups['load-opportunities'], {expandable: false}); |
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.
might as well go with groupEl
at this point :)
@@ -1131,7 +1131,7 @@ | |||
{ | |||
"id": "first-meaningful-paint", | |||
"weight": 5, | |||
"group": "perf-metric", |
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.
what uses this, does it really need to be updated?
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
const diagnosticAudits = category.audits | ||
.filter(audit => audit.group === 'diagnostics' && audit.result.score < 1); | ||
if (diagnosticAudits.length) { | ||
const diagsEl = this.renderAuditGroup(groups['diagnostics'], {expandable: false}); |
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 meant groupEl here too :)
@@ -153,30 +154,30 @@ class PerformanceCategoryRenderer extends CategoryRenderer { | |||
element.appendChild(metricAuditsEl); | |||
|
|||
// Opportunities | |||
const hintAudits = category.audits | |||
.filter(audit => audit.group === 'perf-hint' && audit.result.score < 1) | |||
const oppAudits = category.audits |
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.
does opportunityAudits
not fit? :D
breaking change to the config:
perf-metric
=>metrics
perf-hint
=>load-opportunities
perf-info
=>diagnostics
Updated report classnames, and renderer method names.
ref #5008