Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core(pwa): adjust score weights #5233

Merged
merged 3 commits into from
May 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions lighthouse-core/config/default-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,16 +289,20 @@ module.exports = {
'[PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are ' +
'not automatically checked by Lighthouse. They do not affect your score but it\'s important that you verify them manually.',
auditRefs: [
// Most difficult and critical for good UX
{id: 'load-fast-enough-for-pwa', weight: 7}, // can't be green in the category without being fast
{id: 'works-offline', weight: 5},
// Encompasses most of the other checks
{id: 'webapp-install-banner', weight: 3},
// Important but not too difficult
{id: 'is-on-https', weight: 2},
{id: 'redirects-http', weight: 2},
{id: 'viewport', weight: 2},
// Relatively easy checkboxes to tick with minimal value on their own
{id: 'service-worker', weight: 1},
{id: 'works-offline', weight: 1},
{id: 'without-javascript', weight: 1},
{id: 'is-on-https', weight: 1},
{id: 'redirects-http', weight: 1},
{id: 'load-fast-enough-for-pwa', weight: 1},
{id: 'webapp-install-banner', weight: 1},
{id: 'splash-screen', weight: 1},
{id: 'themed-omnibox', weight: 1},
{id: 'viewport', weight: 1},
{id: 'content-width', weight: 1},
// Manual audits
{id: 'pwa-cross-browser', weight: 0},
Expand Down
28 changes: 14 additions & 14 deletions lighthouse-core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3011,43 +3011,43 @@
"manualDescription": "These checks are required by the baseline [PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are not automatically checked by Lighthouse. They do not affect your score but it's important that you verify them manually.",
"auditRefs": [
{
"id": "service-worker",
"weight": 1
"id": "load-fast-enough-for-pwa",
"weight": 7
},
{
"id": "works-offline",
"weight": 1
"weight": 5
},
{
"id": "without-javascript",
"weight": 1
"id": "webapp-install-banner",
"weight": 3
},
{
"id": "is-on-https",
"weight": 1
"weight": 2
},
{
"id": "redirects-http",
"weight": 1
"weight": 2
},
{
"id": "load-fast-enough-for-pwa",
"weight": 1
"id": "viewport",
"weight": 2
},
{
"id": "webapp-install-banner",
"id": "service-worker",
"weight": 1
},
{
"id": "splash-screen",
"id": "without-javascript",
"weight": 1
},
{
"id": "themed-omnibox",
"id": "splash-screen",
"weight": 1
},
{
"id": "viewport",
"id": "themed-omnibox",
"weight": 1
},
{
Expand All @@ -3068,7 +3068,7 @@
}
],
"id": "pwa",
"score": 0.36
"score": 0.42
},
"accessibility": {
"title": "Accessibility",
Expand Down