Skip to content

Commit

Permalink
Collapse the 9 manifest PWA audits into 3 (#1847)
Browse files Browse the repository at this point in the history
Introduces 3 new audits:  webapp-install-banner (née _add to homescreen_), themed-omnibox, splash-screen.
These audits subsume and deprecate the following audits: theme-color-meta, manifest-{background-color, display, exists, icons-min-{144,192}, name, start_url, theme-color}.

A new manifestValue computed artifact is introduced and used as helper for the 3 audits.
  • Loading branch information
paulirish committed Mar 28, 2017
1 parent e822cbe commit 5034961
Show file tree
Hide file tree
Showing 38 changed files with 1,147 additions and 1,669 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ module.exports = [
'viewport': {
score: true
},
'manifest-display': {
score: false
},
'without-javascript': {
score: true
},
Expand All @@ -55,34 +52,13 @@ module.exports = [
score: true,
displayValue: '0'
},
'manifest-exists': {
score: false
},
'manifest-background-color': {
score: false
},
'manifest-theme-color': {
score: false
},
'manifest-icons-min-192': {
score: false
},
'manifest-icons-min-144': {
score: false
},
'manifest-name': {
score: false
},
'manifest-short-name': {
score: false
},
'manifest-short-name-length': {
'webapp-install-banner': {
score: false
},
'manifest-start-url': {
'splash-screen': {
score: false
},
'theme-color-meta': {
'themed-omnibox': {
score: false
},
'aria-valid-attr': {
Expand Down Expand Up @@ -128,9 +104,6 @@ module.exports = [
'viewport': {
score: true
},
'manifest-display': {
score: false
},
'without-javascript': {
score: true
},
Expand All @@ -142,34 +115,13 @@ module.exports = [
score: false,
displayValue: '1'
},
'manifest-exists': {
score: false
},
'manifest-background-color': {
score: false
},
'manifest-theme-color': {
score: false
},
'manifest-icons-min-192': {
score: false
},
'manifest-icons-min-144': {
score: false
},
'manifest-name': {
score: false
},
'manifest-short-name': {
score: false
},
'manifest-short-name-length': {
'webapp-install-banner': {
score: false
},
'manifest-start-url': {
'splash-screen': {
score: false
},
'theme-color-meta': {
'themed-omnibox': {
score: false
},
'aria-valid-attr': {
Expand Down
13 changes: 4 additions & 9 deletions lighthouse-cli/test/smokehouse/pwa-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
gatherers: [
'url',
'https',
'theme-color',
'manifest',
// https://github.com/GoogleChrome/lighthouse/issues/566
// 'cache-contents'
Expand All @@ -52,15 +53,9 @@ module.exports = {
'redirects-http',
'service-worker',
'works-offline',
'manifest-display',
'manifest-exists',
'manifest-background-color',
'manifest-theme-color',
'manifest-icons-min-192',
'manifest-icons-min-144',
'manifest-name',
'manifest-short-name',
'manifest-start-url',
'webapp-install-banner',
'splash-screen',
'themed-omnibox',
// https://github.com/GoogleChrome/lighthouse/issues/566
// 'cache-start-url'
],
Expand Down
120 changes: 15 additions & 105 deletions lighthouse-cli/test/smokehouse/pwa-expectations.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,13 @@ module.exports = [
'works-offline': {
score: true
},
'manifest-display': {
score: true,
displayValue: 'standalone'
},
'manifest-exists': {
'webapp-install-banner': {
score: true
},
'manifest-background-color': {
score: true,
extendedInfo: {
value: '#2196F3'
}
},
'manifest-theme-color': {
'splash-screen': {
score: true
},
'manifest-icons-min-192': {
score: true
},
'manifest-icons-min-144': {
score: true
},
'manifest-name': {
score: true
},
'manifest-short-name': {
score: true
},
'manifest-start-url': {
'themed-omnibox': {
score: true
},
// 'cache-start-url': {
Expand Down Expand Up @@ -99,35 +77,13 @@ module.exports = [
'works-offline': {
score: false
},
'manifest-display': {
score: true,
displayValue: 'standalone'
},
'manifest-exists': {
'webapp-install-banner': {
score: true
},
'manifest-background-color': {
score: true,
extendedInfo: {
value: '#366597'
}
},
'manifest-theme-color': {
score: true
},
'manifest-icons-min-192': {
score: true
},
'manifest-icons-min-144': {
'splash-screen': {
score: true
},
'manifest-name': {
score: true
},
'manifest-short-name': {
score: true
},
'manifest-start-url': {
'themed-omnibox': {
score: true
},
// 'cache-start-url': {
Expand All @@ -152,37 +108,13 @@ module.exports = [
'works-offline': {
score: true
},
'manifest-display': {
score: true,
displayValue: 'standalone'
},
'manifest-exists': {
score: true
},
'manifest-background-color': {
score: true,
extendedInfo: {
value: '#bababa'
}
},
'manifest-theme-color': {
score: true
},
'manifest-icons-min-192': {
score: true,
displayValue: 'found sizes: 600x600',
},
'manifest-icons-min-144': {
score: true,
displayValue: 'found sizes: 600x600',
},
'manifest-name': {
score: true
'webapp-install-banner': {
score: false
},
'manifest-short-name': {
'splash-screen': {
score: true
},
'manifest-start-url': {
'themed-omnibox': {
score: true
},
// 'cache-start-url': {
Expand Down Expand Up @@ -260,36 +192,14 @@ module.exports = [
'works-offline': {
score: true
},
'manifest-display': {
score: true,
displayValue: 'standalone'
},
'manifest-exists': {
score: true
},
'manifest-background-color': {
score: true,
extendedInfo: {
value: '#383838'
}
},
'manifest-theme-color': {
score: true
},
'manifest-icons-min-192': {
score: true
},
'manifest-icons-min-144': {
'webapp-install-banner': {
score: true
},
'manifest-name': {
score: true
},
'manifest-short-name': {
score: true
'splash-screen': {
score: false
},
'manifest-start-url': {
score: true
'themed-omnibox': {
score: false
},
// 'cache-start-url': {
// score: true
Expand Down
64 changes: 0 additions & 64 deletions lighthouse-core/audits/manifest-background-color.js

This file was deleted.

Loading

0 comments on commit 5034961

Please sign in to comment.