Bug 1388368 - Fix the Console panel in Launchpad; r=nchevobbe draft
authorJan Odvarko <odvarko@gmail.com>
Wed, 09 Aug 2017 14:57:14 +0200
changeset 643250 f9340c349819f08fc3aaf88f1ffec02f8fa4b6db
parent 641444 bb8de16ce00cb57b587a14c210ecc7505f366328
child 725241 feb474828a77f1c22ee233b7d7359932f661e070
push id73028
push userjodvarko@mozilla.com
push dateWed, 09 Aug 2017 12:57:40 +0000
reviewersnchevobbe
bugs1388368
milestone57.0a1
Bug 1388368 - Fix the Console panel in Launchpad; r=nchevobbe MozReview-Commit-ID: DBG4aXOlhp
devtools/client/webconsole/local-dev/index.js
devtools/client/webconsole/local-dev/jsterm-stub.js
devtools/client/webconsole/local-dev/system-stub.js
devtools/client/webconsole/new-webconsole.js
devtools/client/webconsole/package.json
devtools/client/webconsole/webpack.config.js
--- a/devtools/client/webconsole/local-dev/index.js
+++ b/devtools/client/webconsole/local-dev/index.js
@@ -16,17 +16,20 @@ try {
   const Perf = require("react-addons-perf");
   window.Perf = Perf;
 } catch (e) {
   // Perf addon is only available in development builds
 }
 
 EventEmitter.decorate(window);
 
-require("../../themes/new-webconsole.css");
+require("../../themes/widgets.css");
+require("../../themes/webconsole.css");
+require("../../themes/components-frame.css");
+require("../../themes/light-theme.css");
 require("../../shared/components/reps/reps.css");
 
 pref("devtools.debugger.remote-timeout", 10000);
 pref("devtools.hud.loglimit", 1000);
 pref("devtools.webconsole.filter.error", true);
 pref("devtools.webconsole.filter.warn", true);
 pref("devtools.webconsole.filter.info", true);
 pref("devtools.webconsole.filter.log", true);
--- a/devtools/client/webconsole/local-dev/jsterm-stub.js
+++ b/devtools/client/webconsole/local-dev/jsterm-stub.js
@@ -166,11 +166,14 @@ JSTerm.prototype = {
     if (frame == this.SELECTED_FRAME) {
       grip = state.frames[state.selected];
     } else {
       grip = state.frames[frame];
     }
 
     return grip ? grip.actor : null;
   },
+
+  focus() {
+  },
 };
 
 module.exports.JSTerm = JSTerm;
new file mode 100644
--- /dev/null
+++ b/devtools/client/webconsole/local-dev/system-stub.js
@@ -0,0 +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/. */
+
+"use strict";
+
+var platform = "";
+
+if (/Mac OS X/.test(window.navigator.userAgent)) {
+  platform = "macosx";
+}
+
+module.exports = {
+  constants: {
+    platform: platform
+  }
+};
--- a/devtools/client/webconsole/new-webconsole.js
+++ b/devtools/client/webconsole/new-webconsole.js
@@ -9,17 +9,17 @@
 const {Utils: WebConsoleUtils} = require("devtools/client/webconsole/utils");
 const EventEmitter = require("devtools/shared/event-emitter");
 const promise = require("promise");
 const defer = require("devtools/shared/defer");
 const Services = require("Services");
 const { gDevTools } = require("devtools/client/framework/devtools");
 const { JSTerm } = require("devtools/client/webconsole/jsterm");
 const { WebConsoleConnectionProxy } = require("devtools/client/webconsole/webconsole-connection-proxy");
-const KeyShortcuts = require("devtools/client/shared/key-shortcuts");
+const { KeyShortcuts } = require("devtools/client/shared/key-shortcuts");
 const { l10n } = require("devtools/client/webconsole/new-console-output/utils/messages");
 const system = require("devtools/shared/system");
 const { ZoomKeys } = require("devtools/client/shared/zoom-keys");
 
 const PREF_MESSAGE_TIMESTAMP = "devtools.webconsole.timestampMessages";
 const PREF_PERSISTLOG = "devtools.webconsole.persistlog";
 
 // XXX: This file is incomplete (see bug 1326937).
--- a/devtools/client/webconsole/package.json
+++ b/devtools/client/webconsole/package.json
@@ -11,17 +11,17 @@
   },
   "dependencies": {
     "amd-loader": "0.0.5",
     "babel-preset-es2015": "^6.6.0",
     "babel-register": "^6.24.0",
     "cross-env": "^3.1.3",
     "devtools-config": "0.0.12",
     "devtools-launchpad": "0.0.67",
-    "devtools-modules": "0.0.24",
+    "devtools-modules": "0.0.28",
     "enzyme": "^2.4.1",
     "expect": "^1.16.0",
     "file-loader": "^0.10.1",
     "immutable": "^3.8.1",
     "jsdom": "^9.4.1",
     "jsdom-global": "^2.0.0",
     "json-loader": "^0.5.4",
     "mocha": "^2.5.3",
--- a/devtools/client/webconsole/webpack.config.js
+++ b/devtools/client/webconsole/webpack.config.js
@@ -38,17 +38,17 @@ let webpackConfig = {
     {
       "promise": "var Promise",
     }
   ],
 };
 
 webpackConfig.resolve = {
   alias: {
-    "Services": "devtools-modules/client/shared/shim/Services",
+    "Services": "devtools-modules/src/Services",
 
     "devtools/client/webconsole/jsterm": path.join(projectPath, "jsterm-stub"),
     "devtools/client/webconsole/utils": path.join(__dirname, "new-console-output/test/fixtures/WebConsoleUtils"),
     "devtools/client/webconsole/new-console-output": path.join(__dirname, "new-console-output"),
     "devtools/client/webconsole/webconsole-connection-proxy": path.join(__dirname, "webconsole-connection-proxy"),
     "devtools/client/webconsole/webconsole-l10n": path.join(__dirname, "webconsole-l10n"),
 
     "react": path.join(__dirname, "node_modules/react"),
@@ -58,30 +58,33 @@ webpackConfig.resolve = {
     "devtools/client/shared/vendor/react-redux": "react-redux",
     "devtools/client/shared/vendor/redux": "redux",
 
     "devtools/client/locales": path.join(__dirname, "../../client/locales/en-US"),
     "toolkit/locales": path.join(__dirname, "../../../toolkit/locales/en-US"),
     "devtools/shared/locales": path.join(__dirname, "../../shared/locales/en-US"),
     "devtools/shared/plural-form": path.join(__dirname, "../../shared/plural-form"),
     "devtools/shared/l10n": path.join(__dirname, "../../shared/l10n"),
+    "devtools/shared/system": path.join(projectPath, "system-stub"),
 
     "devtools/client/framework/devtools": path.join(__dirname, "../../client/shims/devtools"),
-    "devtools/client/framework/menu": "devtools-modules/client/framework/menu",
+    "devtools/client/framework/menu": "devtools-modules/src/menu",
     "devtools/client/framework/menu-item": path.join(__dirname, "../../client/framework/menu-item"),
 
     "devtools/client/shared/components/reps/reps": path.join(__dirname, "../../client/shared/components/reps/reps"),
     "devtools/client/shared/redux/middleware/thunk": path.join(__dirname, "../../client/shared/redux/middleware/thunk"),
     "devtools/client/shared/redux/middleware/debounce": path.join(__dirname, "../../client/shared/redux/middleware/debounce"),
     "devtools/client/shared/components/stack-trace": path.join(__dirname, "../../client/shared/components/stack-trace"),
     "devtools/client/shared/source-utils": path.join(__dirname, "../../client/shared/source-utils"),
     "devtools/client/shared/components/frame": path.join(__dirname, "../../client/shared/components/frame"),
+    "devtools/client/shared/key-shortcuts": "devtools-modules/src/key-shortcuts",
+    "devtools/client/shared/zoom-keys": "devtools-modules/src/zoom-keys",
 
     "devtools/shared/defer": path.join(__dirname, "../../shared/defer"),
-    "devtools/shared/event-emitter": "devtools-modules/shared/event-emitter",
+    "devtools/shared/event-emitter": "devtools-modules/src/utils/event-emitter",
     "devtools/shared/client/main": path.join(__dirname, "new-console-output/test/fixtures/ObjectClient"),
     "devtools/shared/platform/clipboard": path.join(__dirname, "../../shared/platform/content/clipboard"),
   }
 };
 
 const mappings = [
   [
     /utils\/menu/, "devtools-launchpad/src/components/shared/menu"