Bug 1586634: Add a sidebar panel for the compatibility tool. r=rcaliman,gl

Differential Revision: https://phabricator.services.mozilla.com/D48322

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Daisuke Akatsuka 2019-10-09 00:37:55 +00:00
Родитель 03797d6eff
Коммит 070a64c7e7
5 изменённых файлов: 84 добавлений и 0 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Просмотреть файл

@ -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",
)

Просмотреть файл

@ -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')

Просмотреть файл

@ -6,6 +6,7 @@ DIRS += [
'animation',
'boxmodel',
'changes',
'compatibility',
'components',
'computed',
'extensions',