diff --git a/core/audits/bf-cache.js b/core/audits/bf-cache.js index f9877e514f43..21fedeaccc07 100644 --- a/core/audits/bf-cache.js +++ b/core/audits/bf-cache.js @@ -61,7 +61,7 @@ class BFCache extends Audit { failureTitle: str_(UIStrings.failureTitle), description: str_(UIStrings.description), supportedModes: ['navigation', 'timespan'], - guidanceLevel: 2, + guidanceLevel: 4, requiredArtifacts: ['BFCacheFailures', 'HostProduct'], scoreDisplayMode: Audit.SCORING_MODES.BINARY, }; diff --git a/core/audits/prioritize-lcp-image.js b/core/audits/prioritize-lcp-image.js index d9732f089980..2b61a209471f 100644 --- a/core/audits/prioritize-lcp-image.js +++ b/core/audits/prioritize-lcp-image.js @@ -37,7 +37,7 @@ class PrioritizeLcpImage extends Audit { title: str_(UIStrings.title), description: str_(UIStrings.description), supportedModes: ['navigation'], - guidanceLevel: 3, + guidanceLevel: 4, requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'TraceElements'], scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS, }; diff --git a/core/audits/unsized-images.js b/core/audits/unsized-images.js index ca57c7e5f9eb..37cd27668660 100644 --- a/core/audits/unsized-images.js +++ b/core/audits/unsized-images.js @@ -34,7 +34,7 @@ class UnsizedImages extends Audit { title: str_(UIStrings.title), failureTitle: str_(UIStrings.failureTitle), description: str_(UIStrings.description), - guidanceLevel: 3, + guidanceLevel: 4, requiredArtifacts: ['ImageElements'], scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS, }; diff --git a/core/test/fixtures/user-flows/reports/sample-flow-result.json b/core/test/fixtures/user-flows/reports/sample-flow-result.json index 587af03948e8..da432023247d 100644 --- a/core/test/fixtures/user-flows/reports/sample-flow-result.json +++ b/core/test/fixtures/user-flows/reports/sample-flow-result.json @@ -1989,7 +1989,7 @@ } ] }, - "guidanceLevel": 3 + "guidanceLevel": 4 }, "valid-source-maps": { "id": "valid-source-maps", @@ -2038,7 +2038,7 @@ "pathLength": 2 } }, - "guidanceLevel": 3 + "guidanceLevel": 4 }, "csp-xss": { "id": "csp-xss", @@ -3790,7 +3790,7 @@ "description": "Many navigations are performed by going back to a previous page, or forwards again. The back/forward cache (bfcache) can speed up these return navigations. [Learn more about the bfcache](https://developer.chrome.com/docs/lighthouse/performance/bf-cache/)", "score": 1, "scoreDisplayMode": "binary", - "guidanceLevel": 2 + "guidanceLevel": 4 } }, "configSettings": { @@ -7118,6 +7118,7 @@ "opportunityResourceColumnLabel": "Opportunity", "opportunitySavingsColumnLabel": "Estimated Savings", "passedAuditsGroupTitle": "Passed audits", + "pwaRemovalMessage": "Alongside [Chrome’s updated Installability Criteria](https://developer.chrome.com/blog/update-install-criteria), Lighthouse will be deprecating the PWA category in a future release. Please refer to the [updated PWA documentation](https://developer.chrome.com/docs/devtools/progressive-web-apps/) for future PWA testing.", "runtimeAnalysisWindow": "Initial page load", "runtimeAnalysisWindowSnapshot": "Point-in-time snapshot", "runtimeAnalysisWindowTimespan": "User interactions timespan", @@ -10100,7 +10101,7 @@ } ] }, - "guidanceLevel": 3 + "guidanceLevel": 4 }, "valid-source-maps": { "id": "valid-source-maps", @@ -10958,7 +10959,7 @@ "description": "Many navigations are performed by going back to a previous page, or forwards again. The back/forward cache (bfcache) can speed up these return navigations. [Learn more about the bfcache](https://developer.chrome.com/docs/lighthouse/performance/bf-cache/)", "score": 1, "scoreDisplayMode": "binary", - "guidanceLevel": 2 + "guidanceLevel": 4 } }, "configSettings": { @@ -12199,6 +12200,7 @@ "opportunityResourceColumnLabel": "Opportunity", "opportunitySavingsColumnLabel": "Estimated Savings", "passedAuditsGroupTitle": "Passed audits", + "pwaRemovalMessage": "Alongside [Chrome’s updated Installability Criteria](https://developer.chrome.com/blog/update-install-criteria), Lighthouse will be deprecating the PWA category in a future release. Please refer to the [updated PWA documentation](https://developer.chrome.com/docs/devtools/progressive-web-apps/) for future PWA testing.", "runtimeAnalysisWindow": "Initial page load", "runtimeAnalysisWindowSnapshot": "Point-in-time snapshot", "runtimeAnalysisWindowTimespan": "User interactions timespan", @@ -13045,7 +13047,7 @@ } ] }, - "guidanceLevel": 3 + "guidanceLevel": 4 }, "accesskeys": { "id": "accesskeys", @@ -17258,6 +17260,7 @@ "opportunityResourceColumnLabel": "Opportunity", "opportunitySavingsColumnLabel": "Estimated Savings", "passedAuditsGroupTitle": "Passed audits", + "pwaRemovalMessage": "Alongside [Chrome’s updated Installability Criteria](https://developer.chrome.com/blog/update-install-criteria), Lighthouse will be deprecating the PWA category in a future release. Please refer to the [updated PWA documentation](https://developer.chrome.com/docs/devtools/progressive-web-apps/) for future PWA testing.", "runtimeAnalysisWindow": "Initial page load", "runtimeAnalysisWindowSnapshot": "Point-in-time snapshot", "runtimeAnalysisWindowTimespan": "User interactions timespan", @@ -19944,7 +19947,7 @@ } ] }, - "guidanceLevel": 3 + "guidanceLevel": 4 }, "valid-source-maps": { "id": "valid-source-maps", @@ -19993,7 +19996,7 @@ "pathLength": 2 } }, - "guidanceLevel": 3 + "guidanceLevel": 4 }, "csp-xss": { "id": "csp-xss", @@ -21909,7 +21912,7 @@ "description": "Many navigations are performed by going back to a previous page, or forwards again. The back/forward cache (bfcache) can speed up these return navigations. [Learn more about the bfcache](https://developer.chrome.com/docs/lighthouse/performance/bf-cache/)", "score": 1, "scoreDisplayMode": "binary", - "guidanceLevel": 2 + "guidanceLevel": 4 } }, "configSettings": { @@ -25211,6 +25214,7 @@ "opportunityResourceColumnLabel": "Opportunity", "opportunitySavingsColumnLabel": "Estimated Savings", "passedAuditsGroupTitle": "Passed audits", + "pwaRemovalMessage": "Alongside [Chrome’s updated Installability Criteria](https://developer.chrome.com/blog/update-install-criteria), Lighthouse will be deprecating the PWA category in a future release. Please refer to the [updated PWA documentation](https://developer.chrome.com/docs/devtools/progressive-web-apps/) for future PWA testing.", "runtimeAnalysisWindow": "Initial page load", "runtimeAnalysisWindowSnapshot": "Point-in-time snapshot", "runtimeAnalysisWindowTimespan": "User interactions timespan", diff --git a/core/test/results/sample_v2.json b/core/test/results/sample_v2.json index 880091a7551c..a55affd646c6 100644 --- a/core/test/results/sample_v2.json +++ b/core/test/results/sample_v2.json @@ -2875,7 +2875,7 @@ } ] }, - "guidanceLevel": 3 + "guidanceLevel": 4 }, "valid-source-maps": { "id": "valid-source-maps", @@ -2969,7 +2969,7 @@ "pathLength": 4 } }, - "guidanceLevel": 3 + "guidanceLevel": 4 }, "csp-xss": { "id": "csp-xss", @@ -5852,7 +5852,7 @@ } ] }, - "guidanceLevel": 2 + "guidanceLevel": 4 } }, "configSettings": { @@ -9468,6 +9468,7 @@ "opportunityResourceColumnLabel": "Opportunity", "opportunitySavingsColumnLabel": "Estimated Savings", "passedAuditsGroupTitle": "Passed audits", + "pwaRemovalMessage": "Alongside [Chrome’s updated Installability Criteria](https://developer.chrome.com/blog/update-install-criteria), Lighthouse will be deprecating the PWA category in a future release. Please refer to the [updated PWA documentation](https://developer.chrome.com/docs/devtools/progressive-web-apps/) for future PWA testing.", "runtimeAnalysisWindow": "Initial page load", "runtimeAnalysisWindowSnapshot": "Point-in-time snapshot", "runtimeAnalysisWindowTimespan": "User interactions timespan", diff --git a/proto/lighthouse-result.proto b/proto/lighthouse-result.proto index 8126d66d6598..9d3df67a1cde 100644 --- a/proto/lighthouse-result.proto +++ b/proto/lighthouse-result.proto @@ -668,6 +668,9 @@ message I18n { // Descriptive label that this analysis considers a snapshot of the page at a single point in time string runtime_analysis_window_snapshot = 66; + + // Message for PWA deprecation. + string pwa_removal_message = 67; } // The message holding all formatted strings used in the renderer. diff --git a/report/renderer/pwa-category-renderer.js b/report/renderer/pwa-category-renderer.js index 2ca457b942f1..8745ab5dea6a 100644 --- a/report/renderer/pwa-category-renderer.js +++ b/report/renderer/pwa-category-renderer.js @@ -17,6 +17,12 @@ export class PwaCategoryRenderer extends CategoryRenderer { render(category, groupDefinitions = {}) { const categoryElem = this.dom.createElement('div', 'lh-category'); categoryElem.id = category.id; + // Deprecation warning banner. + const pwaMessageContainer = this.dom.createComponent('warningsToplevel'); + const pwaMessageEl = this.dom.find('.lh-warnings__msg', pwaMessageContainer); + pwaMessageEl.append(this.dom.convertMarkdownLinkSnippets(Globals.strings.pwaRemovalMessage)); + + categoryElem.append(pwaMessageContainer); categoryElem.append(this.renderCategoryHeader(category, groupDefinitions)); const auditRefs = category.auditRefs; diff --git a/report/renderer/report-utils.js b/report/renderer/report-utils.js index bdf8d2cb70b1..10bc0c5d924d 100644 --- a/report/renderer/report-utils.js +++ b/report/renderer/report-utils.js @@ -476,6 +476,9 @@ const UIStrings = { openInANewTabTooltip: 'Open in a new tab', /** Generic category name for all resources that could not be attributed to a 1st or 3rd party entity. */ unattributable: 'Unattributable', + + /** Message communicating the removal of the PWA category. */ + pwaRemovalMessage: 'Alongside [Chrome’s updated Installability Criteria](https://developer.chrome.com/blog/update-install-criteria), Lighthouse will be deprecating the PWA category in a future release. Please refer to the [updated PWA documentation](https://developer.chrome.com/docs/devtools/progressive-web-apps/) for future PWA testing.', }; export { diff --git a/report/test/renderer/report-renderer-test.js b/report/test/renderer/report-renderer-test.js index 0348c27ec663..03a4e85e504e 100644 --- a/report/test/renderer/report-renderer-test.js +++ b/report/test/renderer/report-renderer-test.js @@ -188,7 +188,10 @@ describe('ReportRenderer', () => { const warningResults = Object.assign({}, sampleResults, {runWarnings: []}); const container = renderer._dom.document().body; const output = renderer.renderReport(warningResults, container); - assert.strictEqual(output.querySelector('.lh-warnings--toplevel'), null); + const warningEls = output.querySelectorAll('.lh-warnings--toplevel'); + // PWA deprecation warning. + expect(warningEls).toHaveLength(1); + expect(warningEls[0].textContent).toContain('deprecating the PWA category'); }); it('renders a warning section', () => { diff --git a/shared/localization/locales/en-US.json b/shared/localization/locales/en-US.json index 4f3a31ef8e2e..4fc3e110a161 100644 --- a/shared/localization/locales/en-US.json +++ b/shared/localization/locales/en-US.json @@ -3398,6 +3398,9 @@ "report/renderer/report-utils.js | passedAuditsGroupTitle": { "message": "Passed audits" }, + "report/renderer/report-utils.js | pwaRemovalMessage": { + "message": "Alongside [Chrome’s updated Installability Criteria](https://developer.chrome.com/blog/update-install-criteria), Lighthouse will be deprecating the PWA category in a future release. Please refer to the [updated PWA documentation](https://developer.chrome.com/docs/devtools/progressive-web-apps/) for future PWA testing." + }, "report/renderer/report-utils.js | runtimeAnalysisWindow": { "message": "Initial page load" }, diff --git a/shared/localization/locales/en-XL.json b/shared/localization/locales/en-XL.json index 9b0491306075..7ec5c0e5746b 100644 --- a/shared/localization/locales/en-XL.json +++ b/shared/localization/locales/en-XL.json @@ -3398,6 +3398,9 @@ "report/renderer/report-utils.js | passedAuditsGroupTitle": { "message": "P̂áŝśêd́ âúd̂ít̂ś" }, + "report/renderer/report-utils.js | pwaRemovalMessage": { + "message": "Âĺôńĝśîd́ê [Ćĥŕôḿê’ś ûṕd̂át̂éd̂ Ín̂śt̂ál̂ĺâb́îĺît́ŷ Ćr̂ít̂ér̂íâ](https://developer.chrome.com/blog/update-install-criteria), Ĺîǵĥt́ĥóûśê ẃîĺl̂ b́ê d́êṕr̂éĉát̂ín̂ǵ t̂h́ê ṔŴÁ ĉát̂éĝór̂ý îń â f́ût́ûŕê ŕêĺêáŝé. P̂ĺêáŝé r̂éf̂ér̂ t́ô t́ĥé [ûṕd̂át̂éd̂ ṔŴÁ d̂óĉúm̂én̂t́ât́îón̂](https://developer.chrome.com/docs/devtools/progressive-web-apps/) f́ôŕ f̂út̂úr̂é P̂ẂÂ t́êśt̂ín̂ǵ." + }, "report/renderer/report-utils.js | runtimeAnalysisWindow": { "message": "Îńît́îál̂ ṕâǵê ĺôád̂" },