Skip to content

Commit

Permalink
more tweaks with hwi
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed May 5, 2018
1 parent b91c5f8 commit 46c9cf8
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ class PerformanceCategoryRenderer extends CategoryRenderer {
// Opportunities
const opportunityAudits = category.audits
.filter(audit => audit.group === 'load-opportunities' && audit.result.score < 1)
.sort((auditA, auditB) => auditB.result.rawValue - auditA.result.rawValue);
.sort((auditA, auditB) => auditB.result.details.summary.wastedMs - auditA.result.details.summary.wastedMs);
if (opportunityAudits.length) {
const maxWaste = Math.max(...opportunityAudits.map(audit => audit.result.rawValue));
const maxWaste = Math.max(...opportunityAudits.map(audit => audit.result.details.summary.wastedMs));
const scale = Math.ceil(maxWaste / 1000) * 1000;
const groupEl = this.renderAuditGroup(groups['load-opportunities'], {expandable: false});
const tmpl = this.dom.cloneTemplate('#tmpl-lh-opportunity-header', this.templateContext);
Expand Down
73 changes: 44 additions & 29 deletions lighthouse-core/report/html/report-styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lighthouse-core/report/html/templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ <h1 class="leftnav__header__title">Lighthouse</h1>
<template id="tmpl-lh-gauge">
<style>
.lh-gauge__wrapper {
--circle-size: calc(2.5 * var(--header-font-size));
--circle-size: calc(3 * var(--header-font-size));
--circle-size-half: calc(var(--circle-size) / 2);
--circle-background: hsl(216, 12%, 92%);
--circle-border-width: 9;
Expand Down

0 comments on commit 46c9cf8

Please sign in to comment.