Bug 1405235 - Part 2: Show USB devices using SidebarItem. r=jdescottes
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Thu, 20 Sep 2018 03:27:05 +0000
changeset 437652 b380a630683149aa315a476b4adb31a248b4e7ef
parent 437651 8ac3f47057c433f5f49ca028414a2d724dbe7c41
child 437653 5a566d2d672293b5bb293fbf221ec1db42f9a311
push id69741
push userdakatsuka@mozilla.com
push dateFri, 21 Sep 2018 11:24:53 +0000
treeherderautoland@b380a6306831 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1405235
milestone64.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 1405235 - Part 2: Show USB devices using SidebarItem. r=jdescottes Depends on D5647 Differential Revision: https://phabricator.services.mozilla.com/D5648
devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js
--- a/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js
+++ b/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js
@@ -13,16 +13,17 @@ const Localized = createFactory(FluentRe
 
 const { PAGES, RUNTIMES } = require("../../constants");
 
 const DeviceSidebarItemAction = createFactory(require("./DeviceSidebarItemAction"));
 const SidebarItem = createFactory(require("./SidebarItem"));
 const FIREFOX_ICON = "chrome://devtools/skin/images/aboutdebugging-firefox-logo.svg";
 const CONNECT_ICON = "chrome://devtools/skin/images/aboutdebugging-connect-icon.svg";
 const GLOBE_ICON = "chrome://devtools/skin/images/aboutdebugging-globe-icon.svg";
+const USB_ICON = "chrome://devtools/skin/images/aboutdebugging-connect-icon.svg";
 
 class Sidebar extends PureComponent {
   static get propTypes() {
     return {
       dispatch: PropTypes.func.isRequired,
       runtimes: PropTypes.array.isRequired,
       selectedPage: PropTypes.string.isRequired,
     };
@@ -60,17 +61,25 @@ class Sidebar extends PureComponent {
           dispatch,
           icon: GLOBE_ICON,
           isSelected: selectedPage === pageId,
           name: runtime.id,
           runtimeId: runtime.id,
           selectable: runtimeHasClient,
         });
       }),
-      ...runtimes.usbRuntimes.map(runtime => dom.li({}, runtime.name)),
+      ...runtimes.usbRuntimes.map(runtime =>
+        SidebarItem({
+          id: `usb-${ runtime.id }`,
+          dispatch,
+          icon: USB_ICON,
+          isSelected: false,
+          name: runtime.name,
+          selectable: false,
+        })),
     ];
   }
 
   render() {
     const { dispatch, selectedPage } = this.props;
 
     return dom.aside(
       {