[DevTools] Move button 'clear site data' upward
Hoist this button upward so that a user no longer needs to scroll down
to find it if the console is docked at the lower half of the Application
panel, providing convenience and less confusion to first-time users.
Bug: 825132
Change-Id: I6808695c1c3e00d92553e221169b9d76a2791b2e
Reviewed-on: https://chromium-review.googlesource.com/c/1306412
Commit-Queue: Haihong Li (Harley) <[email protected]>
Reviewed-by: Erik Luo <[email protected]>
Reviewed-by: Dmitry Gozman <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#604429}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a48ba69617ee94831de8e58354b55692c0308554
diff --git a/front_end/resources/ClearStorageView.js b/front_end/resources/ClearStorageView.js
index 0872cfa..2255c5f 100644
--- a/front_end/resources/ClearStorageView.js
+++ b/front_end/resources/ClearStorageView.js
@@ -44,6 +44,10 @@
usageBreakdownRow.appendChild(this._pieChart.element);
usageBreakdownRow.appendChild(this._pieChartLegend);
+ const clearButtonSection = this._reportView.appendSection('', 'clear-storage-button').appendRow();
+ this._clearButton = UI.createTextButton(ls`Clear site data`, this._clear.bind(this));
+ clearButtonSection.appendChild(this._clearButton);
+
const application = this._reportView.appendSection(Common.UIString('Application'));
this._appendItem(application, Common.UIString('Unregister service workers'), 'service_workers');
@@ -58,10 +62,6 @@
this._appendItem(caches, Common.UIString('Application cache'), 'appcache');
SDK.targetManager.observeTargets(this, SDK.Target.Capability.Browser);
- const footer = this._reportView.appendSection('', 'clear-storage-button').appendRow();
- this._clearButton = UI.createTextButton(
- Common.UIString('Clear site data'), this._clear.bind(this), Common.UIString('Clear site data'));
- footer.appendChild(this._clearButton);
}
/**