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
--- 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