Audits: Redesign the start view.
Begin deprecation of the throttling setting, and move throttling and clear cache in a settings pane.
The start view is also now responsive.
https://imgur.com/a/AGpii0m
https://imgur.com/a/XZqaFNk
Change-Id: I322dced736be0bc2b4266f1278227eaa6701e7aa
Bug: 772558
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1885347
Commit-Queue: Paul Irish <paulirish@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
diff --git a/front_end/audits/AuditsController.js b/front_end/audits/AuditsController.js
index 23b2b99..9d48c88 100644
--- a/front_end/audits/AuditsController.js
+++ b/front_end/audits/AuditsController.js
@@ -261,36 +261,15 @@
],
},
{
- setting: Common.settings.createSetting('audits.throttling', 'default'),
+ // This setting is disabled, but we keep it around to show in the UI.
+ setting: Common.settings.createSetting('audits.throttling', true),
+ title: ls`Simulated throttling`,
+ // We will disable this when we have a Lantern trace viewer within DevTools.
+ learnMore:
+ 'https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md#devtools-audits-panel-throttling',
setFlags: (flags, value) => {
- switch (value) {
- case 'devtools':
- flags.throttlingMethod = 'devtools';
- break;
- case 'off':
- flags.throttlingMethod = 'provided';
- break;
- default:
- flags.throttlingMethod = 'simulate';
- }
+ flags.throttlingMethod = value ? 'simulate' : 'devtools';
},
- options: [
- {
- label: ls`Simulated Slow 4G, 4x CPU Slowdown`,
- value: 'default',
- title: ls`Throttling is simulated, resulting in faster audit runs with similar measurement accuracy`
- },
- {
- label: ls`Applied Slow 4G, 4x CPU Slowdown`,
- value: 'devtools',
- title: ls`Typical DevTools throttling, with actual traffic shaping and CPU slowdown applied`
- },
- {
- label: ls`No throttling`,
- value: 'off',
- title: ls`No network or CPU throttling used. (Useful when not evaluating performance)`
- },
- ],
},
{
setting: Common.settings.createSetting('audits.clear_storage', true),