Bug 1370004 - Rearrange the order of the grid panel to be first on the Layout view and change the no grids display message. r=pbro draft
authorGabriel Luong <gabriel.luong@gmail.com>
Tue, 06 Jun 2017 16:15:37 -0400
changeset 589786 c09ecb16a1d23e90d7d402a5024acfd5f5988b13
parent 589785 78aa5a83314a9d35fe03c8f7ab552ccfa81e1190
child 632010 b5e616482ebf912d36396d3b41c762abf8cdaabb
push id62510
push userbmo:gl@mozilla.com
push dateTue, 06 Jun 2017 20:16:01 +0000
reviewerspbro
bugs1370004
milestone55.0a1
Bug 1370004 - Rearrange the order of the grid panel to be first on the Layout view and change the no grids display message. r=pbro MozReview-Commit-ID: EUBsxbBk7MP
devtools/client/inspector/grids/components/Grid.js
devtools/client/inspector/layout/components/App.js
devtools/client/locales/en-US/layout.properties
--- a/devtools/client/inspector/grids/components/Grid.js
+++ b/devtools/client/inspector/grids/components/Grid.js
@@ -90,13 +90,13 @@ module.exports = createClass({
           :
           null
       )
       :
       dom.div(
         {
           className: "layout-no-grids",
         },
-        getStr("layout.noGrids")
+        getStr("layout.noGridsOnThisPage")
       );
   },
 
 });
--- a/devtools/client/inspector/layout/components/App.js
+++ b/devtools/client/inspector/layout/components/App.js
@@ -56,35 +56,35 @@ const App = createClass({
     return dom.div(
       {
         id: "layout-container",
         className: "devtools-monospace",
       },
       Accordion({
         items: [
           {
+            header: LAYOUT_L10N.getStr("layout.header"),
+            component: Grid,
+            componentProps: this.props,
+            opened: Services.prefs.getBoolPref(GRID_OPENED_PREF),
+            onToggled: () => {
+              let opened = Services.prefs.getBoolPref(GRID_OPENED_PREF);
+              Services.prefs.setBoolPref(GRID_OPENED_PREF, !opened);
+            }
+          },
+          {
             header: BOXMODEL_L10N.getStr("boxmodel.title"),
             component: BoxModel,
             componentProps: this.props,
             opened: Services.prefs.getBoolPref(BOXMODEL_OPENED_PREF),
             onToggled: () => {
               let opened = Services.prefs.getBoolPref(BOXMODEL_OPENED_PREF);
               Services.prefs.setBoolPref(BOXMODEL_OPENED_PREF, !opened);
             }
           },
-          {
-            header: LAYOUT_L10N.getStr("layout.header"),
-            component: Grid,
-            componentProps: this.props,
-            opened: Services.prefs.getBoolPref(GRID_OPENED_PREF),
-            onToggled: () => {
-              let opened = Services.prefs.getBoolPref(GRID_OPENED_PREF);
-              Services.prefs.setBoolPref(GRID_OPENED_PREF, !opened);
-            }
-          },
         ]
       })
     );
   },
 
 });
 
 module.exports = connect(state => state)(App);
--- a/devtools/client/locales/en-US/layout.properties
+++ b/devtools/client/locales/en-US/layout.properties
@@ -26,19 +26,19 @@ layout.extendGridLinesInfinitely=Extend 
 
 # LOCALIZATION NOTE (layout.header): The accordion header for the CSS Grid pane.
 layout.header=Grid
 
 # LOCALIZATION NOTE (layout.gridDisplaySettings): The header for the grid display
 # settings container in the CSS Grid pane.
 layout.gridDisplaySettings=Grid Display Settings
 
-# LOCALIZATION NOTE (layout.noGrids): In the case where there are no CSS grid
+# LOCALIZATION NOTE (layout.noGridsOnThisPage): In the case where there are no CSS grid
 # containers to display.
-layout.noGrids=No grids
+layout.noGridsOnThisPage=CSS Grid is not in use on this page
 
 # LOCALIZATION NOTE (layout.overlayMultipleGrids): The header for the list of grid
 # container elements that can be highlighted in the CSS Grid pane.
 layout.overlayMultipleGrids=Overlay Multiple Grids
 
 # LOCALIZATION NOTE (layout.overlayGrid): Alternate header for the list of grid container
 # elements if only one item can be selected.
 layout.overlayGrid=Overlay Grid