Bug 1586634: Add a sidebar panel for the compatibility tool. r=rcaliman,gl
authorDaisuke Akatsuka <daisuke@birchill.co.jp>
Wed, 09 Oct 2019 00:37:55 +0000
changeset 496862 958b4d641752dfd907db9c44dbc3d4a0fcd9e730
parent 496861 f377025d40efce384792de947be5b96c7ecf4136
child 496863 5a4992c15f6693c72b08bfc106e48020463696a9
push id97509
push userdakatsuka.birchill@mozilla.com
push dateWed, 09 Oct 2019 00:38:41 +0000
treeherderautoland@f4421c5861f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrcaliman, gl
bugs1586634
milestone71.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 1586634: Add a sidebar panel for the compatibility tool. r=rcaliman,gl Differential Revision: https://phabricator.services.mozilla.com/D48322
devtools/client/inspector/compatibility/CompatibilityView.js
devtools/client/inspector/compatibility/components/CompatibilityApp.js
devtools/client/inspector/compatibility/components/moz.build
devtools/client/inspector/compatibility/moz.build
devtools/client/inspector/moz.build
new file mode 100644
--- /dev/null
+++ b/devtools/client/inspector/compatibility/CompatibilityView.js
@@ -0,0 +1,37 @@
+/* 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,
+  createElement,
+} = require("devtools/client/shared/vendor/react");
+const { Provider } = require("devtools/client/shared/vendor/react-redux");
+
+const CompatibilityApp = createFactory(
+  require("./components/CompatibilityApp")
+);
+
+class CompatibilityView {
+  constructor(inspector, window) {
+    this._init();
+  }
+
+  destroy() {}
+
+  _init() {
+    const compatibilityApp = new CompatibilityApp();
+
+    this.provider = createElement(
+      Provider,
+      {
+        id: "compatibilityview",
+      },
+      compatibilityApp
+    );
+  }
+}
+
+module.exports = CompatibilityView;
new file mode 100644
--- /dev/null
+++ b/devtools/client/inspector/compatibility/components/CompatibilityApp.js
@@ -0,0 +1,21 @@
+/* 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 CompatibilityApp extends PureComponent {
+  render() {
+    return dom.div(
+      {
+        className: "theme-sidebar inspector-tabpanel",
+      },
+      "Compatibility View"
+    );
+  }
+}
+
+module.exports = CompatibilityApp;
new file mode 100644
--- /dev/null
+++ b/devtools/client/inspector/compatibility/components/moz.build
@@ -0,0 +1,9 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+DevToolsModules(
+    "CompatibilityApp.js",
+)
new file mode 100644
--- /dev/null
+++ b/devtools/client/inspector/compatibility/moz.build
@@ -0,0 +1,16 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+DIRS += [
+    'components',
+]
+
+DevToolsModules(
+    'CompatibilityView.js',
+)
+
+with Files('**'):
+    BUG_COMPONENT = ('DevTools', 'Inspector: Compatibility')
--- a/devtools/client/inspector/moz.build
+++ b/devtools/client/inspector/moz.build
@@ -1,16 +1,17 @@
 # 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/.
 
 DIRS += [
     'animation',
     'boxmodel',
     'changes',
+    'compatibility',
     'components',
     'computed',
     'extensions',
     'flexbox',
     'fonts',
     'grids',
     'layout',
     'markup',