Title: [246510] trunk/Source/WebInspectorUI
Revision
246510
Author
[email protected]
Date
2019-06-17 12:32:11 -0700 (Mon, 17 Jun 2019)

Log Message

Web Inspector: Settings: split the General panel into sub panels so it's less crowded
https://bugs.webkit.org/show_bug.cgi?id=198803

Reviewed by Timothy Hatcher.

* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype.initialLayout):
(WI.SettingsTabContentView.prototype._createGeneralSettingsView):
Many of the settings in General only affect a specific part of Web Inspector, and therefore
aren't really "general".

(WI.SettingsTabContentView.prototype._createElementsSettingsView): Added.
 - Element Selection
 - CSS Changes

(WI.SettingsTabContentView.prototype._createSourcesSettingsView): Added.
 - Debugger
 - Source Maps

(WI.SettingsTabContentView.prototype._createConsoleSettingsView): Added.
 - Traces (renamed from "Console")
 - WebRTC Logging
 - Media Logging
 - MSE Logging

* Localizations/en.lproj/localizedStrings.js:

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (246509 => 246510)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-06-17 19:30:54 UTC (rev 246509)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-06-17 19:32:11 UTC (rev 246510)
@@ -1,5 +1,34 @@
 2019-06-17  Devin Rousso  <[email protected]>
 
+        Web Inspector: Settings: split the General panel into sub panels so it's less crowded
+        https://bugs.webkit.org/show_bug.cgi?id=198803
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/SettingsTabContentView.js:
+        (WI.SettingsTabContentView.prototype.initialLayout):
+        (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
+        Many of the settings in General only affect a specific part of Web Inspector, and therefore
+        aren't really "general".
+
+        (WI.SettingsTabContentView.prototype._createElementsSettingsView): Added.
+         - Element Selection
+         - CSS Changes
+
+        (WI.SettingsTabContentView.prototype._createSourcesSettingsView): Added.
+         - Debugger
+         - Source Maps
+
+        (WI.SettingsTabContentView.prototype._createConsoleSettingsView): Added.
+         - Traces (renamed from "Console")
+         - WebRTC Logging
+         - Media Logging
+         - MSE Logging
+
+        * Localizations/en.lproj/localizedStrings.js:
+
+2019-06-17  Devin Rousso  <[email protected]>
+
         Web Inspector: Sources: the Inspector Style Sheet is missing when grouped by path
         https://bugs.webkit.org/show_bug.cgi?id=198860
 

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (246509 => 246510)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2019-06-17 19:30:54 UTC (rev 246509)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2019-06-17 19:32:11 UTC (rev 246510)
@@ -148,7 +148,7 @@
 localizedStrings["Auto"] = "Auto";
 localizedStrings["Auto - %s"] = "Auto - %s";
 localizedStrings["Auto Increment"] = "Auto Increment";
-localizedStrings["Auto-expand Traces"] = "Auto-expand Traces";
+localizedStrings["Auto-expand"] = "Auto-expand";
 localizedStrings["Automatically continue after evaluating"] = "Automatically continue after evaluating";
 localizedStrings["Available Style Sheets"] = "Available Style Sheets";
 localizedStrings["Average CPU: %s"] = "Average CPU: %s";
@@ -270,7 +270,6 @@
 localizedStrings["Console Profile Recorded"] = "Console Profile Recorded";
 localizedStrings["Console cleared at %s"] = "Console cleared at %s";
 localizedStrings["Console opened at %s"] = "Console opened at %s";
-localizedStrings["Console:"] = "Console:";
 localizedStrings["Containing"] = "Containing";
 localizedStrings["Content"] = "Content";
 localizedStrings["Content Security Policy violation of directive: %s"] = "Content Security Policy violation of directive: %s";
@@ -1006,7 +1005,7 @@
 localizedStrings["Sort Ascending"] = "Sort Ascending";
 localizedStrings["Sort Descending"] = "Sort Descending";
 localizedStrings["Source"] = "Source";
-localizedStrings["Source maps:"] = "Source maps:";
+localizedStrings["Source Maps:"] = "Source Maps:";
 localizedStrings["Sources"] = "Sources";
 localizedStrings["Sources:"] = "Sources:";
 localizedStrings["Space"] = "Space";
@@ -1122,6 +1121,7 @@
 localizedStrings["Totals:"] = "Totals:";
 localizedStrings["Trace"] = "Trace";
 localizedStrings["Trace: %s"] = "Trace: %s";
+localizedStrings["Traces:"] = "Traces:";
 /* Amount of data sent over the network for a single resource */
 localizedStrings["Transfer Size"] = "Transfer Size";
 localizedStrings["Transferred"] = "Transferred";

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js (246509 => 246510)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js	2019-06-17 19:30:54 UTC (rev 246509)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js	2019-06-17 19:32:11 UTC (rev 246510)
@@ -162,6 +162,9 @@
         this.addSubview(this._navigationBar);
 
         this._createGeneralSettingsView();
+        this._createElementsSettingsView();
+        this._createSourcesSettingsView();
+        this._createConsoleSettingsView();
         this._createExperimentalSettingsView();
 
         WI.notifications.addEventListener(WI.Notification.DebugUIEnabledDidChange, this._updateDebugSettingsViewVisibility, this);
@@ -177,7 +180,6 @@
         let generalSettingsView = new WI.SettingsView("general", WI.UIString("General"));
 
         const indentValues = [WI.UIString("Tabs"), WI.UIString("Spaces")];
-
         let indentEditor = generalSettingsView.addGroupWithCustomSetting(WI.UIString("Prefer indent using:"), WI.SettingEditor.Type.Select, {values: indentValues});
         indentEditor.value = indentValues[WI.settings.indentWithTabs.value ? 0 : 1];
         indentEditor.addEventListener(WI.SettingEditor.Event.ValueDidChange, () => {
@@ -206,12 +208,6 @@
 
         generalSettingsView.addSeparator();
 
-        generalSettingsView.addSetting(WI.UIString("Debugger:"), WI.settings.showScopeChainOnPause, WI.UIString("Show Scope Chain on pause"));
-        generalSettingsView.addSetting(WI.UIString("Source maps:"), WI.settings.sourceMapsEnabled, WI.UIString("Enable source maps"));
-        generalSettingsView.addSetting(WI.UIString("Console:"), WI.settings.consoleAutoExpandTrace, WI.UIString("Auto-expand Traces"));
-
-        generalSettingsView.addSeparator();
-
         let searchGroup = generalSettingsView.addGroup(WI.UIString("Search:", "Search: @ Settings", "Settings tab label for search related settings"));
         searchGroup.addSetting(WI.settings.searchCaseSensitive, WI.UIString("Case Sensitive", "Case Sensitive @ Settings", "Settings tab checkbox label for whether searches should be case sensitive."));
         searchGroup.addSetting(WI.settings.searchRegularExpression, WI.UIString("Regular _expression_", "Regular _expression_ @ Settings", "Settings tab checkbox label for whether searches should be treated as regular expressions."));
@@ -218,16 +214,6 @@
 
         generalSettingsView.addSeparator();
 
-        generalSettingsView.addSetting(WI.UIString("CSS Changes:"), WI.settings.cssChangesPerNode, WI.UIString("Show only for selected node"));
-
-        generalSettingsView.addSeparator();
-
-        if (InspectorBackend.domains.DOM && InspectorBackend.domains.DOM.setInspectModeEnabled && InspectorBackend.domains.DOM.setInspectModeEnabled.supports("showRulers")) {
-            generalSettingsView.addSetting(WI.UIString("Element Selection:"), WI.settings.showRulersDuringElementSelection, WI.UIString("Show page rulers and node border lines"));
-
-            generalSettingsView.addSeparator();
-        }
-
         const zoomLevels = [0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8, 2, 2.2, 2.4];
         const zoomValues = zoomLevels.map((level) => [level, Number.percentageString(level, 0)]);
 
@@ -236,7 +222,49 @@
         zoomEditor.addEventListener(WI.SettingEditor.Event.ValueDidChange, () => { WI.setZoomFactor(zoomEditor.value); });
         WI.settings.zoomFactor.addEventListener(WI.Setting.Event.Changed, () => { zoomEditor.value = WI.getZoomFactor().maxDecimals(2); });
 
+        this.addSettingsView(generalSettingsView);
+    }
+
+    _createElementsSettingsView()
+    {
+        if (!InspectorBackend.domains.DOM)
+            return;
+
+        let elementsSettingsView = new WI.SettingsView("elements", WI.UIString("Elements"));
+
+        if (InspectorBackend.domains.DOM.setInspectModeEnabled && InspectorBackend.domains.DOM.setInspectModeEnabled.supports("showRulers")) {
+            elementsSettingsView.addSetting(WI.UIString("Element Selection:"), WI.settings.showRulersDuringElementSelection, WI.UIString("Show page rulers and node border lines"));
+
+            elementsSettingsView.addSeparator();
+        }
+
+        elementsSettingsView.addSetting(WI.UIString("CSS Changes:"), WI.settings.cssChangesPerNode, WI.UIString("Show only for selected node"));
+
+        this.addSettingsView(elementsSettingsView);
+    }
+
+    _createSourcesSettingsView()
+    {
+        let sourcesSettingsView = new WI.SettingsView("sources", WI.UIString("Sources"));
+
+        sourcesSettingsView.addSetting(WI.UIString("Debugger:"), WI.settings.showScopeChainOnPause, WI.UIString("Show Scope Chain on pause"));
+
+        sourcesSettingsView.addSeparator();
+
+        sourcesSettingsView.addSetting(WI.UIString("Source Maps:"), WI.settings.sourceMapsEnabled, WI.UIString("Enable source maps"));
+
+        this.addSettingsView(sourcesSettingsView);
+    }
+
+    _createConsoleSettingsView()
+    {
+        let consoleSettingsView = new WI.SettingsView("console", WI.UIString("Console"));
+
+        consoleSettingsView.addSetting(WI.UIString("Traces:"), WI.settings.consoleAutoExpandTrace, WI.UIString("Auto-expand"));
+
         if (WI.ConsoleManager.supportsLogChannels()) {
+            consoleSettingsView.addSeparator();
+
             const logLevels = [
                 [WI.LoggingChannel.Level.Off, WI.UIString("Off")],
                 [WI.LoggingChannel.Level.Basic, WI.UIString("Basic")],
@@ -250,7 +278,7 @@
 
             let channels = WI.consoleManager.customLoggingChannels;
             for (let channel of channels) {
-                let logEditor = generalSettingsView.addGroupWithCustomSetting(editorLabels[channel.source], WI.SettingEditor.Type.Select, {values: logLevels});
+                let logEditor = consoleSettingsView.addGroupWithCustomSetting(editorLabels[channel.source], WI.SettingEditor.Type.Select, {values: logLevels});
                 logEditor.value = channel.level;
                 logEditor.addEventListener(WI.SettingEditor.Event.ValueDidChange, () => {
                     for (let target of WI.targets)
@@ -259,7 +287,7 @@
             }
         }
 
-        this.addSettingsView(generalSettingsView);
+        this.addSettingsView(consoleSettingsView);
     }
 
     _createExperimentalSettingsView()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to