From aa43d3ba8426ec6e188bf4e7867d914efac4312a Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Mon, 30 Jul 2018 16:41:33 -0700 Subject: [PATCH] add descriptions. remove longestChainCount from UI --- lighthouse-core/lib/locales/en-US.json | 12 ++++++------ .../report/html/renderer/crc-details-renderer.js | 4 ---- lighthouse-core/report/html/renderer/util.js | 5 +++-- lighthouse-core/report/html/templates.html | 3 --- lighthouse-core/test/results/sample_v2.json | 3 +-- 5 files changed, 10 insertions(+), 17 deletions(-) diff --git a/lighthouse-core/lib/locales/en-US.json b/lighthouse-core/lib/locales/en-US.json index 8a274661d9c6..cc37da30c301 100644 --- a/lighthouse-core/lib/locales/en-US.json +++ b/lighthouse-core/lib/locales/en-US.json @@ -436,15 +436,15 @@ "description": "Label shown preceding any important warnings that may have invalidated the entire report. For example, if the user has Chrome extensions installed, they may add enough performance overhead that Lighthouse's performance metrics are unreliable. If shown, this will be displayed at the top of the report UI." }, "lighthouse-core/report/html/renderer/util.js | scorescaleLabel": { - "message": "Score scale:" + "message": "Score scale:", + "description": "Label preceding a pictorial explanation of the scoring scale: 0-50 is red (bad), 50-90 is orange (ok), 90-100 is green (good). These colors are used throughout the report to provide context for how good/bad a particular result is." }, "lighthouse-core/report/html/renderer/util.js | crcInitialNavigation": { - "message": "Initial Navigation" + "message": "Initial Navigation", + "description": "String of text shown in a graphical representation of the flow of network requests for the web page. This label represents the initial network request that fetches an HTML page. This navigation may be redirected (eg. Initial navigation to http://example.com redirects to https://www.example.com)." }, "lighthouse-core/report/html/renderer/util.js | crcLongestDurationLabel": { - "message": "Longest chain:" - }, - "lighthouse-core/report/html/renderer/util.js | crcTransferSizeLabel": { - "message": "Transfer Size:" + "message": "Maximum critical path latency:", + "description": "Label of value shown in the summary of critical request chains. Refers to the total amount of time (milliseconds) of the longest critical path chain/sequence of network requests. Example value: 2310 ms" } } diff --git a/lighthouse-core/report/html/renderer/crc-details-renderer.js b/lighthouse-core/report/html/renderer/crc-details-renderer.js index 8d077b68072b..9e8811728b45 100644 --- a/lighthouse-core/report/html/renderer/crc-details-renderer.js +++ b/lighthouse-core/report/html/renderer/crc-details-renderer.js @@ -162,10 +162,6 @@ class CriticalRequestChainRenderer { Util.UIStrings.crcLongestDurationLabel; dom.find('.lh-crc__longest_duration', tmpl).textContent = Util.formatMilliseconds(details.longestChain.duration); - dom.find('.lh-crc__longest_transfersize_label', tmpl).textContent = - Util.UIStrings.crcTransferSizeLabel; - dom.find('.lh-crc__longest_transfersize', tmpl).textContent = - Util.formatBytesToKB(details.longestChain.transferSize); // Construct visual tree. const root = CriticalRequestChainRenderer.initTree(details.chains); diff --git a/lighthouse-core/report/html/renderer/util.js b/lighthouse-core/report/html/renderer/util.js index 8c40d83008c3..03abdbd67590 100644 --- a/lighthouse-core/report/html/renderer/util.js +++ b/lighthouse-core/report/html/renderer/util.js @@ -397,9 +397,10 @@ Util.UIStrings = { /** Label preceding a pictorial explanation of the scoring scale: 0-50 is red (bad), 50-90 is orange (ok), 90-100 is green (good). These colors are used throughout the report to provide context for how good/bad a particular result is. */ scorescaleLabel: 'Score scale:', + /** String of text shown in a graphical representation of the flow of network requests for the web page. This label represents the initial network request that fetches an HTML page. This navigation may be redirected (eg. Initial navigation to http://example.com redirects to https://www.example.com). */ crcInitialNavigation: 'Initial Navigation', - crcLongestDurationLabel: 'Longest chain:', - crcTransferSizeLabel: 'Transfer Size:', + /** Label of value shown in the summary of critical request chains. Refers to the total amount of time (milliseconds) of the longest critical path chain/sequence of network requests. Example value: 2310 ms */ + crcLongestDurationLabel: 'Maximum critical path latency:', }; if (typeof module !== 'undefined' && module.exports) { diff --git a/lighthouse-core/report/html/templates.html b/lighthouse-core/report/html/templates.html index 05e5a656ca26..7e752cdf3875 100644 --- a/lighthouse-core/report/html/templates.html +++ b/lighthouse-core/report/html/templates.html @@ -615,9 +615,6 @@
-
- -
diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index 72eae3d68375..596f9d8ed4ce 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -3388,8 +3388,7 @@ "toplevelWarningsMessage": "There were issues affecting this run of Lighthouse:", "scorescaleLabel": "Score scale:", "crcInitialNavigation": "Initial Navigation", - "crcLongestDurationLabel": "Longest chain:", - "crcTransferSizeLabel": "Transfer Size:" + "crcLongestDurationLabel": "Maximum critical path latency:" }, "icuMessagePaths": { "lighthouse-core/audits/metrics/first-contentful-paint.js | title": [