Skip to content

Conversation

@adamraine
Copy link
Contributor

@adamraine adamraine commented Oct 13, 2023

#15445 (comment)

Metric filter was still using relevantAudits which is just a manually curated list that we haven't touched in a while. This PR uses metricSavings instead to determine filter applicability and sorts the audits on the filtered metric.

const labelEl = this.dom.createChildOf(metricFilterEl, 'label', 'lh-metricfilter__label');
labelEl.htmlFor = elemId;
labelEl.title = metric.result?.title;
labelEl.title = 'result' in metric ? metric.result.title : '';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes a bug where the title of the "All" filter button is "undefined"

@adamraine adamraine changed the title WIP: use metric savings for metric filter report(performance): use metric savings for metric filter Oct 16, 2023
@adamraine adamraine marked this pull request as ready for review October 16, 2023 20:56
@adamraine adamraine requested a review from a team as a code owner October 16, 2023 20:56
@adamraine adamraine requested review from connorjclark and removed request for a team October 16, 2023 20:56
/** Gather mode used to collect artifacts. */
type GatherMode = 'navigation'|'timespan'|'snapshot';

type MetricAcronym = 'FCP' | 'LCP' | 'TBT' | 'CLS' | 'INP' | 'SI' | 'TTI' | 'FMP';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@paulirish
Copy link
Member

ping @connorjclark

Copy link
Collaborator

@adrianaixba adrianaixba left a comment

Choose a reason for hiding this comment

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

lgtm!

renderAudit(audit) {
const component = this.dom.createComponent('audit');
return this.populateAuditValues(audit, component);
return /** @type {HTMLElement} */ (this.populateAuditValues(audit, component));
Copy link
Collaborator

Choose a reason for hiding this comment

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

which part required this change to return type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants