Title: [273847] trunk/Source/WebInspectorUI
Revision
273847
Author
commit-qu...@webkit.org
Date
2021-03-03 15:00:40 -0800 (Wed, 03 Mar 2021)

Log Message

Web Inspector: Refine CSS Grid overlay options
https://bugs.webkit.org/show_bug.cgi?id=222428
<rdar://problem/74751569>

Patch by Razvan Caliman <rcali...@apple.com> on 2021-03-03
Reviewed by BJ Burg.

Move CSS Grid overlay settings above node list, simplify labels, reorder and set default values.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Setting.js:
* UserInterface/Views/CSSGridSection.js:
(WI.CSSGridSection.prototype.initialLayout):
* UserInterface/Views/LayoutDetailsSidebarPanel.css:
(.details-section.layout-css-grid.collapsed > .content):
Drive-by: Fix a bug which prevented the contents from being hidden when the section is collapsed.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (273846 => 273847)


--- trunk/Source/WebInspectorUI/ChangeLog	2021-03-03 23:00:09 UTC (rev 273846)
+++ trunk/Source/WebInspectorUI/ChangeLog	2021-03-03 23:00:40 UTC (rev 273847)
@@ -1,3 +1,21 @@
+2021-03-03  Razvan Caliman  <rcali...@apple.com>
+
+        Web Inspector: Refine CSS Grid overlay options
+        https://bugs.webkit.org/show_bug.cgi?id=222428
+        <rdar://problem/74751569>
+
+        Reviewed by BJ Burg.
+
+        Move CSS Grid overlay settings above node list, simplify labels, reorder and set default values.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Base/Setting.js:
+        * UserInterface/Views/CSSGridSection.js:
+        (WI.CSSGridSection.prototype.initialLayout):
+        * UserInterface/Views/LayoutDetailsSidebarPanel.css:
+        (.details-section.layout-css-grid.collapsed > .content):
+        Drive-by: Fix a bug which prevented the contents from being hidden when the section is collapsed.
+
 2021-02-25  BJ Burg  <bb...@apple.com>
 
         [Cocoa] Web Inspector: add support for receiving Web Extension events via _WKInspectorExtensionDelegate

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


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2021-03-03 23:00:09 UTC (rev 273846)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2021-03-03 23:00:40 UTC (rev 273847)
@@ -178,6 +178,8 @@
 /* Approximate count of events */
 localizedStrings["Approximate Number"] = "~%s";
 localizedStrings["Area"] = "Area";
+/* Label for option to toggle the area names setting for CSS grid overlays */
+localizedStrings["Area names @ Layout Panel Overlay Options"] = "Area Names";
 localizedStrings["Assertion"] = "Assertion";
 localizedStrings["Assertion Failed"] = "Assertion Failed";
 localizedStrings["Assertion Failed: %s"] = "Assertion Failed: %s";
@@ -842,6 +844,10 @@
 localizedStrings["Line %d"] = "Line %d";
 localizedStrings["Line %d:%d"] = "Line %d:%d";
 localizedStrings["Line Number"] = "Line Number";
+/* Label for option to toggle the line names setting for CSS grid overlays */
+localizedStrings["Line names @ Layout Panel Overlay Options"] = "Line Names";
+/* Label for option to toggle the line numbers setting for CSS grid overlays */
+localizedStrings["Line numbers @ Layout Panel Overlay Options"] = "Line Numbers";
 localizedStrings["Line wrapping:"] = "Line wrapping:";
 localizedStrings["Linear Gradient"] = "Linear Gradient";
 /* Property value for `font-variant-numeric: lining-nums`. */
@@ -1033,8 +1039,8 @@
 localizedStrings["PNG"] = "PNG";
 localizedStrings["Page"] = "Page";
 localizedStrings["Page Issue"] = "Page Issue";
-/* Heading for list of grid overlay settings */
-localizedStrings["Page Overlay Settings @ Layout Panel Section Header"] = "Grid Overlay Settings";
+/* Heading for list of grid overlay options */
+localizedStrings["Page Overlay Options @ Layout Panel Section Header"] = "Page Overlay Options";
 /* Heading for list of grid nodes */
 localizedStrings["Page Overlays @ Layout Sidebar Section Header"] = "Grid Overlays";
 localizedStrings["Page navigated at %s"] = "Page navigated at %s";
@@ -1315,11 +1321,9 @@
 localizedStrings["Show Scope Chain on pause"] = "Show Scope Chain on pause";
 localizedStrings["Show all actions"] = "Show all actions";
 localizedStrings["Show all resources"] = "Show all resources";
-/* Label for option to toggle the area names setting for CSS grid overlays */
-localizedStrings["Show area names @ Layers Panel Grid Overlay Setting"] = "Show area names";
 localizedStrings["Show compositing borders"] = "Show compositing borders";
 /* Label for option to toggle the extended lines setting for CSS grid overlays */
-localizedStrings["Show extended lines @ Layers Panel Grid Overlay Setting"] = "Show extended lines";
+localizedStrings["Show extended lines @ Layout Panel Overlay Options"] = "Extended Grid Lines";
 localizedStrings["Show full certificate"] = "Show full certificate";
 localizedStrings["Show hidden tabs"] = "Show hidden tabs";
 /* Settings tab checkbox label for whether the independent styles sidebar should be shown */
@@ -1326,17 +1330,11 @@
 localizedStrings["Show independent Styles sidebar @ Settings Elements Pane"] = "Show independent Styles sidebar";
 localizedStrings["Show jump to effective property button"] = "Show jump to effective property button";
 localizedStrings["Show jump to variable declaration button"] = "Show jump to variable declaration button";
-/* Label for option to toggle the line names setting for CSS grid overlays */
-localizedStrings["Show line names @ Layers Panel Grid Overlay Setting"] = "Show line names";
-/* Label for option to toggle the line numbers setting for CSS grid overlays */
-localizedStrings["Show line numbers @ Layers Panel Grid Overlay Setting"] = "Show line numbers";
 localizedStrings["Show only for selected node"] = "Show only for selected node";
 localizedStrings["Show page rulers and node border lines"] = "Show page rulers and node border lines";
 localizedStrings["Show rulers"] = "Show rulers";
 localizedStrings["Show the details sidebar (%s)"] = "Show the details sidebar (%s)";
 localizedStrings["Show the navigation sidebar (%s)"] = "Show the navigation sidebar (%s)";
-/* Label for option to toggle the track sizes setting for CSS grid overlays */
-localizedStrings["Show track sizes @ Layers Panel Grid Overlay Setting"] = "Show track sizes";
 /* Settings tab checkbox label for whether the transparency grid is shown by default */
 localizedStrings["Show transparency grid (settings label)"] = "Show transparency grid";
 /* Tooltip for showing the checkered transparency grid under images and canvases */
@@ -1548,6 +1546,8 @@
 localizedStrings["Trace"] = "Trace";
 localizedStrings["Trace: %s"] = "Trace: %s";
 localizedStrings["Traces:"] = "Traces:";
+/* Label for option to toggle the track sizes setting for CSS grid overlays */
+localizedStrings["Track sizes @ Layout Panel Overlay Options"] = "Track Sizes";
 /* Property value for `font-variant-alternates: traditional`. */
 localizedStrings["Traditional Forms @ Font Details Sidebar Property Value"] = "Traditional Forms";
 /* Amount of data sent over the network for a single resource */

Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js (273846 => 273847)


--- trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js	2021-03-03 23:00:09 UTC (rev 273846)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js	2021-03-03 23:00:40 UTC (rev 273847)
@@ -200,8 +200,8 @@
     gridOverlayShowAreaNames: new WI.Setting("grid-overlay-show-area-names", false),
     gridOverlayShowExtendedGridLines: new WI.Setting("grid-overlay-show-extended-grid-lines", false),
     gridOverlayShowLineNames: new WI.Setting("grid-overlay-show-line-names", false),
-    gridOverlayShowLineNumbers: new WI.Setting("grid-overlay-show-line-numbers", false),
-    gridOverlayShowTrackSizes: new WI.Setting("grid-overlay-show-track-sizes", false),
+    gridOverlayShowLineNumbers: new WI.Setting("grid-overlay-show-line-numbers", true),
+    gridOverlayShowTrackSizes: new WI.Setting("grid-overlay-show-track-sizes", true),
     groupMediaRequestsByDOMNode: new WI.Setting("group-media-requests-by-dom-node", WI.Setting.migrateValue("group-by-dom-node") || false),
     indentUnit: new WI.Setting("indent-unit", 4),
     indentWithTabs: new WI.Setting("indent-with-tabs", false),

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSGridSection.js (273846 => 273847)


--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSGridSection.js	2021-03-03 23:00:09 UTC (rev 273846)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSGridSection.js	2021-03-03 23:00:40 UTC (rev 273847)
@@ -67,6 +67,15 @@
     {
         super.initialLayout();
 
+        let settingsGroup = new WI.SettingsGroup(WI.UIString("Page Overlay Options", "Page Overlay Options @ Layout Panel Section Header", "Heading for list of grid overlay options"));
+        this.element.append(settingsGroup.element);
+
+        settingsGroup.addSetting(WI.settings.gridOverlayShowTrackSizes, WI.UIString("Track Sizes", "Track sizes @ Layout Panel Overlay Options", "Label for option to toggle the track sizes setting for CSS grid overlays"));
+        settingsGroup.addSetting(WI.settings.gridOverlayShowLineNumbers, WI.UIString("Line Numbers", "Line numbers @ Layout Panel Overlay Options", "Label for option to toggle the line numbers setting for CSS grid overlays"));
+        settingsGroup.addSetting(WI.settings.gridOverlayShowLineNames, WI.UIString("Line Names", "Line names @ Layout Panel Overlay Options", "Label for option to toggle the line names setting for CSS grid overlays"));
+        settingsGroup.addSetting(WI.settings.gridOverlayShowAreaNames, WI.UIString("Area Names", "Area names @ Layout Panel Overlay Options", "Label for option to toggle the area names setting for CSS grid overlays"));
+        settingsGroup.addSetting(WI.settings.gridOverlayShowExtendedGridLines, WI.UIString("Extended Grid Lines", "Show extended lines @ Layout Panel Overlay Options", "Label for option to toggle the extended lines setting for CSS grid overlays"));
+
         let listHeading = this.element.appendChild(document.createElement("h2"));
         listHeading.classList.add("heading");
         listHeading.textContent = WI.UIString("Grid Overlays", "Page Overlays @ Layout Sidebar Section Header", "Heading for list of grid nodes");
@@ -73,15 +82,6 @@
 
         this._listElement = this.element.appendChild(document.createElement("ul"));
         this._listElement.classList.add("node-overlay-list");
-
-        let settingsGroup = new WI.SettingsGroup(WI.UIString("Grid Overlay Settings", "Page Overlay Settings @ Layout Panel Section Header", "Heading for list of grid overlay settings"));
-        this.element.append(settingsGroup.element);
-
-        settingsGroup.addSetting(WI.settings.gridOverlayShowLineNumbers, WI.UIString("Show line numbers", "Show line numbers @ Layers Panel Grid Overlay Setting", "Label for option to toggle the line numbers setting for CSS grid overlays"));
-        settingsGroup.addSetting(WI.settings.gridOverlayShowLineNames, WI.UIString("Show line names", "Show line names @ Layers Panel Grid Overlay Setting", "Label for option to toggle the line names setting for CSS grid overlays"));
-        settingsGroup.addSetting(WI.settings.gridOverlayShowExtendedGridLines, WI.UIString("Show extended lines", "Show extended lines @ Layers Panel Grid Overlay Setting", "Label for option to toggle the extended lines setting for CSS grid overlays"));
-        settingsGroup.addSetting(WI.settings.gridOverlayShowAreaNames, WI.UIString("Show area names", "Show area names @ Layers Panel Grid Overlay Setting", "Label for option to toggle the area names setting for CSS grid overlays"));
-        settingsGroup.addSetting(WI.settings.gridOverlayShowTrackSizes, WI.UIString("Show track sizes", "Show track sizes @ Layers Panel Grid Overlay Setting", "Label for option to toggle the track sizes setting for CSS grid overlays"));
     }
 
     layout()

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayoutDetailsSidebarPanel.css (273846 => 273847)


--- trunk/Source/WebInspectorUI/UserInterface/Views/LayoutDetailsSidebarPanel.css	2021-03-03 23:00:09 UTC (rev 273846)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LayoutDetailsSidebarPanel.css	2021-03-03 23:00:40 UTC (rev 273847)
@@ -28,7 +28,7 @@
     margin-bottom: 4px;
 }
 
-.details-section.layout-css-grid > .content,
+.details-section.layout-css-grid:not(.collapsed) > .content,
 .details-section.layout-css-grid > .content > .group {
     display: block;
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to