From 4a57f192803a00e57576be193df6073da18e94aa Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Fri, 26 Apr 2019 14:42:00 -0700 Subject: [PATCH] report(redesign): remove units from table columns --- lighthouse-core/lib/i18n/en-US.json | 6 ++-- lighthouse-core/lib/i18n/i18n.js | 6 ++-- lighthouse-core/test/results/sample_v2.json | 32 ++++++++++----------- proto/sample_v2_round_trip.json | 20 ++++++------- 4 files changed, 31 insertions(+), 33 deletions(-) diff --git a/lighthouse-core/lib/i18n/en-US.json b/lighthouse-core/lib/i18n/en-US.json index 3c37fd85c737..8e7d2e4e1142 100644 --- a/lighthouse-core/lib/i18n/en-US.json +++ b/lighthouse-core/lib/i18n/en-US.json @@ -1196,7 +1196,7 @@ "description": "Label for the TTL column in data tables, entries will be the time to live value of the cache header on a web resource" }, "lighthouse-core/lib/i18n/i18n.js | columnSize": { - "message": "Size (KB)", + "message": "Size", "description": "Label for the size column in data tables, entries will be the size of a web resource in kilobytes" }, "lighthouse-core/lib/i18n/i18n.js | columnTimeSpent": { @@ -1208,11 +1208,11 @@ "description": "Label for the URL column in data tables, entries will be the URL of a web resource" }, "lighthouse-core/lib/i18n/i18n.js | columnWastedBytes": { - "message": "Potential Savings (KB)", + "message": "Potential Savings", "description": "Label for the wasted bytes column in data tables, entries will be the number of kilobytes the user could reduce their page by if they implemented the suggestions" }, "lighthouse-core/lib/i18n/i18n.js | columnWastedMs": { - "message": "Potential Savings (ms)", + "message": "Potential Savings", "description": "Label for the wasted bytes column in data tables, entries will be the number of milliseconds the user could reduce page load by if they implemented the suggestions" }, "lighthouse-core/lib/i18n/i18n.js | displayValueByteSavings": { diff --git a/lighthouse-core/lib/i18n/i18n.js b/lighthouse-core/lib/i18n/i18n.js index e77bc4e50ef6..9c4ba39347d5 100644 --- a/lighthouse-core/lib/i18n/i18n.js +++ b/lighthouse-core/lib/i18n/i18n.js @@ -47,13 +47,13 @@ const UIStrings = { /** Label for the URL column in data tables, entries will be the URL of a web resource */ columnURL: 'URL', /** Label for the size column in data tables, entries will be the size of a web resource in kilobytes */ - columnSize: 'Size (KB)', + columnSize: 'Size', /** Label for the TTL column in data tables, entries will be the time to live value of the cache header on a web resource */ columnCacheTTL: 'Cache TTL', /** Label for the wasted bytes column in data tables, entries will be the number of kilobytes the user could reduce their page by if they implemented the suggestions */ - columnWastedBytes: 'Potential Savings (KB)', + columnWastedBytes: 'Potential Savings', /** Label for the wasted bytes column in data tables, entries will be the number of milliseconds the user could reduce page load by if they implemented the suggestions */ - columnWastedMs: 'Potential Savings (ms)', + columnWastedMs: 'Potential Savings', /** Label for the time spent column in data tables, entries will be the number of milliseconds spent during a particular activity */ columnTimeSpent: 'Time Spent', }; diff --git a/lighthouse-core/test/results/sample_v2.json b/lighthouse-core/test/results/sample_v2.json index a413fe98da15..0d32b4970d63 100644 --- a/lighthouse-core/test/results/sample_v2.json +++ b/lighthouse-core/test/results/sample_v2.json @@ -1928,7 +1928,7 @@ { "key": "totalBytes", "itemType": "bytes", - "text": "Size (KB)", + "text": "Size", "displayUnit": "kb", "granularity": 1 } @@ -2036,7 +2036,7 @@ { "key": "totalBytes", "itemType": "bytes", - "text": "Size (KB)" + "text": "Size" } ], "items": [ @@ -2119,12 +2119,12 @@ { "key": "totalBytes", "valueType": "bytes", - "label": "Size (KB)" + "label": "Size" }, { "key": "wastedMs", "valueType": "timespanMs", - "label": "Potential Savings (ms)" + "label": "Potential Savings" } ], "items": [ @@ -2193,12 +2193,12 @@ { "key": "totalBytes", "valueType": "bytes", - "label": "Size (KB)" + "label": "Size" }, { "key": "wastedBytes", "valueType": "bytes", - "label": "Potential Savings (KB)" + "label": "Potential Savings" } ], "items": [ @@ -2254,12 +2254,12 @@ { "key": "totalBytes", "valueType": "bytes", - "label": "Size (KB)" + "label": "Size" }, { "key": "wastedBytes", "valueType": "bytes", - "label": "Potential Savings (KB)" + "label": "Potential Savings" } ], "items": [ @@ -2311,12 +2311,12 @@ { "key": "totalBytes", "valueType": "bytes", - "label": "Size (KB)" + "label": "Size" }, { "key": "wastedBytes", "valueType": "bytes", - "label": "Potential Savings (KB)" + "label": "Potential Savings" } ], "items": [ @@ -5139,8 +5139,11 @@ "path": "audits[render-blocking-resources].displayValue" } ], - "lighthouse-core/lib/i18n/i18n.js | columnWastedMs": [ - "audits[render-blocking-resources].details.headings[2].label" + "lighthouse-core/lib/i18n/i18n.js | columnWastedBytes": [ + "audits[render-blocking-resources].details.headings[2].label", + "audits[unminified-javascript].details.headings[2].label", + "audits[uses-webp-images].details.headings[3].label", + "audits[uses-text-compression].details.headings[2].label" ], "lighthouse-core/audits/byte-efficiency/unminified-css.js | title": [ "audits[unminified-css].title" @@ -5174,11 +5177,6 @@ "path": "audits[uses-text-compression].displayValue" } ], - "lighthouse-core/lib/i18n/i18n.js | columnWastedBytes": [ - "audits[unminified-javascript].details.headings[2].label", - "audits[uses-webp-images].details.headings[3].label", - "audits[uses-text-compression].details.headings[2].label" - ], "lighthouse-core/audits/byte-efficiency/unused-css-rules.js | title": [ "audits[unused-css-rules].title" ], diff --git a/proto/sample_v2_round_trip.json b/proto/sample_v2_round_trip.json index d7fecdafdc88..d391fb3d3649 100644 --- a/proto/sample_v2_round_trip.json +++ b/proto/sample_v2_round_trip.json @@ -2093,12 +2093,12 @@ }, { "key": "totalBytes", - "label": "Size (KB)", + "label": "Size", "valueType": "bytes" }, { "key": "wastedMs", - "label": "Potential Savings (ms)", + "label": "Potential Savings", "valueType": "timespanMs" } ], @@ -2335,7 +2335,7 @@ { "itemType": "bytes", "key": "totalBytes", - "text": "Size (KB)" + "text": "Size" } ], "items": [ @@ -2415,12 +2415,12 @@ }, { "key": "totalBytes", - "label": "Size (KB)", + "label": "Size", "valueType": "bytes" }, { "key": "wastedBytes", - "label": "Potential Savings (KB)", + "label": "Potential Savings", "valueType": "bytes" } ], @@ -2583,7 +2583,7 @@ "granularity": 1.0, "itemType": "bytes", "key": "totalBytes", - "text": "Size (KB)" + "text": "Size" } ], "items": [ @@ -2785,12 +2785,12 @@ }, { "key": "totalBytes", - "label": "Size (KB)", + "label": "Size", "valueType": "bytes" }, { "key": "wastedBytes", - "label": "Potential Savings (KB)", + "label": "Potential Savings", "valueType": "bytes" } ], @@ -2832,12 +2832,12 @@ }, { "key": "totalBytes", - "label": "Size (KB)", + "label": "Size", "valueType": "bytes" }, { "key": "wastedBytes", - "label": "Potential Savings (KB)", + "label": "Potential Savings", "valueType": "bytes" } ],