Bug 1498115 - Part 1: Remove the FlexboxContainerProperties component. r=pbro

This commit is contained in:
Gabriel Luong committed 2018-11-15 10:02:44 -05:00
1 parent b656a50b55
commit bbee8e738b
5 files changed
-80

No files matched your search

@@ -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;
@@ -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
)
);
}
@@ -7,7 +7,6 @@
DevToolsModules(
'Flexbox.js',
'FlexContainer.js',
'FlexContainerProperties.js',
'FlexItem.js',
'FlexItemList.js',
'FlexItemSelector.js',
@@ -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
-14
View File
@@ -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
*/