Bug 1416104 - Part 4: Implement base of animated property list. r?gl draft
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Fri, 19 Jan 2018 15:20:23 +0900
changeset 722539 4dea7ca825de4f711ddb9e6e351ab3f5074bc05a
parent 722538 ee8f2e3e7302781d1ace4bee8f54f8419fcf5331
child 722540 fda8d5643ab0e9a4b0b41f6ef005202a7cb59c60
push id96167
push userbmo:dakatsuka@mozilla.com
push dateFri, 19 Jan 2018 07:35:17 +0000
reviewersgl
bugs1416104
milestone59.0a1
Bug 1416104 - Part 4: Implement base of animated property list. r?gl MozReview-Commit-ID: 8HOajYo3WKr
devtools/client/inspector/animation/components/AnimatedPropertyList.js
devtools/client/inspector/animation/components/AnimatedPropertyListContainer.js
devtools/client/inspector/animation/components/AnimatedPropertyListHeader.js
devtools/client/inspector/animation/components/AnimationDetailContainer.js
devtools/client/inspector/animation/components/moz.build
new file mode 100644
--- /dev/null
+++ b/devtools/client/inspector/animation/components/AnimatedPropertyList.js
@@ -0,0 +1,20 @@
+/* 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 { PureComponent } = require("devtools/client/shared/vendor/react");
+const dom = require("devtools/client/shared/vendor/react-dom-factories");
+
+class AnimatedPropertyList extends PureComponent {
+  render() {
+    return dom.ul(
+      {
+        className: "animated-property-list"
+      }
+    );
+  }
+}
+
+module.exports = AnimatedPropertyList;
new file mode 100644
--- /dev/null
+++ b/devtools/client/inspector/animation/components/AnimatedPropertyListContainer.js
@@ -0,0 +1,25 @@
+/* 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 AnimatedPropertyList = createFactory(require("./AnimatedPropertyList"));
+const AnimatedPropertyListHeader = createFactory(require("./AnimatedPropertyListHeader"));
+
+class AnimatedPropertyListContainer extends PureComponent {
+  render() {
+    return dom.div(
+      {
+        className: "animated-property-list-container"
+      },
+      AnimatedPropertyListHeader(),
+      AnimatedPropertyList()
+    );
+  }
+}
+
+module.exports = AnimatedPropertyListContainer;
new file mode 100644
--- /dev/null
+++ b/devtools/client/inspector/animation/components/AnimatedPropertyListHeader.js
@@ -0,0 +1,20 @@
+/* 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 { PureComponent } = require("devtools/client/shared/vendor/react");
+const dom = require("devtools/client/shared/vendor/react-dom-factories");
+
+class AnimatedPropertyListHeader extends PureComponent {
+  render() {
+    return dom.div(
+      {
+        className: "animated-property-list-header"
+      }
+    );
+  }
+}
+
+module.exports = AnimatedPropertyListHeader;
--- a/devtools/client/inspector/animation/components/AnimationDetailContainer.js
+++ b/devtools/client/inspector/animation/components/AnimationDetailContainer.js
@@ -5,39 +5,45 @@
 "use strict";
 
 const { connect } = require("devtools/client/shared/vendor/react-redux");
 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 AnimationDetailHeader = createFactory(require("./AnimationDetailHeader"));
+const AnimatedPropertyListContainer =
+  createFactory(require("./AnimatedPropertyListContainer"));
 
 class AnimationDetailContainer extends PureComponent {
   static get propTypes() {
     return {
       animation: PropTypes.object.isRequired,
     };
   }
 
   render() {
     const { animation } = this.props;
 
     return dom.div(
       {
         className: "animation-detail-container"
       },
       animation ?
-      AnimationDetailHeader(
-        {
-          animation,
-        }
-      )
+        AnimationDetailHeader(
+          {
+            animation,
+          }
+        )
       :
-      null
+        null,
+      animation ?
+        AnimatedPropertyListContainer()
+      :
+        null
     );
   }
 }
 
 const mapStateToProps = state => {
   return {
     animation: state.animations.selectedAnimation,
   };
--- a/devtools/client/inspector/animation/components/moz.build
+++ b/devtools/client/inspector/animation/components/moz.build
@@ -2,16 +2,19 @@
 # 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/.
 
 DIRS += [
     'graph'
 ]
 
 DevToolsModules(
+    'AnimatedPropertyList.js',
+    'AnimatedPropertyListContainer.js',
+    'AnimatedPropertyListHeader.js',
     'AnimationDetailContainer.js',
     'AnimationDetailHeader.js',
     'AnimationItem.js',
     'AnimationList.js',
     'AnimationListContainer.js',
     'AnimationListHeader.js',
     'AnimationTarget.js',
     'AnimationTimelineTickItem.js',