Bug 1496458 - Show the parent flex container accordion at the top if it exists. r=mtigley
authorGabriel Luong <gabriel.luong@gmail.com>
Thu, 11 Oct 2018 15:24:30 -0400
changeset 496551 f5bb9d00011e09fbd12b922c51dbd258fd746b4b
parent 496550 69dd27f16b71cdd416076de8b6ff37d55505139d
child 496552 fd60c9679d21619ec33574aa7c054850a43f5e88
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmtigley
bugs1496458
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1496458 - Show the parent flex container accordion at the top if it exists. r=mtigley
devtools/client/inspector/layout/components/LayoutApp.js
--- a/devtools/client/inspector/layout/components/LayoutApp.js
+++ b/devtools/client/inspector/layout/components/LayoutApp.js
@@ -115,19 +115,19 @@ class LayoutApp extends PureComponent {
         }
       });
 
       // If the current selected node is both a flex container and flex item. Render
       // an accordion with another Flexbox component where the flexbox to show is the
       // parent flex container of the current selected node.
       if (this.props.flexbox.flexItemContainer &&
           this.props.flexbox.flexItemContainer.actorID) {
-        // Insert the parent flex container to the second index of the accordion item
+        // Insert the parent flex container to the first index of the accordion item
         // list.
-        items.splice(1, 0, {
+        items.splice(0, 0, {
           component: Flexbox,
           componentProps: {
             ...this.props,
             flexContainer: this.props.flexbox.flexItemContainer,
           },
           header: this.getFlexboxHeader(this.props.flexbox.flexItemContainer),
           opened: Services.prefs.getBoolPref(FLEXBOX_OPENED_PREF),
           onToggled: () => {