From bbee8e738bed4531d81a8eaa02f57080bf94de62 Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Thu, 15 Nov 2018 10:02:44 -0500 Subject: [PATCH] Bug 1498115 - Part 1: Remove the FlexboxContainerProperties component. r=pbro --- .../components/FlexContainerProperties.js | 51 ------------------- .../inspector/flexbox/components/Flexbox.js | 10 ---- .../inspector/flexbox/components/moz.build | 1 - .../client/locales/en-US/layout.properties | 4 -- devtools/client/themes/layout.css | 14 ----- 5 files changed, 80 deletions(-) delete mode 100644 devtools/client/inspector/flexbox/components/FlexContainerProperties.js diff --git a/devtools/client/inspector/flexbox/components/FlexContainerProperties.js b/devtools/client/inspector/flexbox/components/FlexContainerProperties.js deleted file mode 100644 index dec31ade5053..000000000000 --- a/devtools/client/inspector/flexbox/components/FlexContainerProperties.js +++ /dev/null @@ -1,51 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react"); -const dom = require("devtools/client/shared/vendor/react-dom-factories"); -const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); -const { getStr } = require("devtools/client/inspector/layout/utils/l10n"); - -const ComputedProperty = createFactory(require("devtools/client/inspector/layout/components/ComputedProperty")); - -const Types = require("../types"); - -class FlexContainerProperties extends PureComponent { - static get propTypes() { - return { - properties: PropTypes.shape(Types.flexContainerProperties).isRequired, - }; - } - - render() { - const { properties } = this.props; - - return ( - dom.div( - { - id: "flex-container-properties", - className: "flexbox-container", - }, - dom.div({ className: "layout-properties-header" }, - getStr("flexbox.flexContainerProperties") - ), - dom.div( - { - className: "layout-properties-wrapper devtools-monospace", - tabIndex: 0, - }, - Object.entries(properties).map(([name, value]) => ComputedProperty({ - key: name, - name, - value, - })) - ) - ) - ); - } -} - -module.exports = FlexContainerProperties; diff --git a/devtools/client/inspector/flexbox/components/Flexbox.js b/devtools/client/inspector/flexbox/components/Flexbox.js index 925e371a34b7..011b5be07d63 100644 --- a/devtools/client/inspector/flexbox/components/Flexbox.js +++ b/devtools/client/inspector/flexbox/components/Flexbox.js @@ -14,9 +14,6 @@ const dom = require("devtools/client/shared/vendor/react-dom-factories"); const PropTypes = require("devtools/client/shared/vendor/react-prop-types"); const { getStr } = require("devtools/client/inspector/layout/utils/l10n"); -loader.lazyGetter(this, "FlexContainerProperties", function() { - return createFactory(require("./FlexContainerProperties")); -}); loader.lazyGetter(this, "FlexItemList", function() { return createFactory(require("./FlexItemList")); }); @@ -46,12 +43,6 @@ class Flexbox extends PureComponent { }; } - renderFlexContainerProperties() { - return FlexContainerProperties({ - properties: this.props.flexContainer.properties, - }); - } - renderFlexItemList() { const { onHideBoxModelHighlighter, @@ -133,7 +124,6 @@ class Flexbox extends PureComponent { }), !flexItemShown && flexItems.length > 0 ? this.renderFlexItemList() : null, flexItemShown ? this.renderFlexItemSizing() : null, - !flexItemShown ? this.renderFlexContainerProperties() : null ) ); } diff --git a/devtools/client/inspector/flexbox/components/moz.build b/devtools/client/inspector/flexbox/components/moz.build index 5630bd1c9f93..8feff61c113e 100644 --- a/devtools/client/inspector/flexbox/components/moz.build +++ b/devtools/client/inspector/flexbox/components/moz.build @@ -7,7 +7,6 @@ DevToolsModules( 'Flexbox.js', 'FlexContainer.js', - 'FlexContainerProperties.js', 'FlexItem.js', 'FlexItemList.js', 'FlexItemSelector.js', diff --git a/devtools/client/locales/en-US/layout.properties b/devtools/client/locales/en-US/layout.properties index b2afe7e3956e..9b19c937eb5d 100644 --- a/devtools/client/locales/en-US/layout.properties +++ b/devtools/client/locales/en-US/layout.properties @@ -21,10 +21,6 @@ flexbox.flexItemOf=Flex Item of %S # flex containers to display. flexbox.noFlexboxeOnThisPage=Select a Flex container or item to continue. -# LOCALIZATION NOTE (flexbox.flexContainerProperties): Header for the flex container -# properties in the Flexbox panel. -flexbox.flexContainerProperties=Flex Container Properties - # LOCALIZATION NOTE (flexbox.itemSizing.baseSizeSectionHeader): Header label displayed # at the start of the flex item sizing Base Size section. flexbox.itemSizing.baseSizeSectionHeader=Base Size diff --git a/devtools/client/themes/layout.css b/devtools/client/themes/layout.css index 3cc11ab5aef4..e9ebea4068a2 100644 --- a/devtools/client/themes/layout.css +++ b/devtools/client/themes/layout.css @@ -444,20 +444,6 @@ list-style: none; } -/** - * Flex Container Properties - */ - -#flex-container-properties { - border-block-start: 1px solid var(--theme-splitter-color); - margin-bottom: 5px; -} - -#flex-container-properties .layout-properties-header { - padding: 5px 0; - padding-inline-start: 20px; -} - /** * Grid Container */