Bug 1444301 - Add missing PropTypes to ToolboxToolbar; r=jryans
authorBrian Birtles <birtles@gmail.com>
Thu, 05 Apr 2018 10:13:21 +0900
changeset 412185 b46dad596df40ddcaee8153e4501bb5649d819e7
parent 412184 a3860d8fb4a2a8b0e062894e11513e36791c5bcd
child 412186 b34330320b8c06cf1faaaeb1ff41e9f14f42af31
push id33786
push usercbrindusan@mozilla.com
push dateSat, 07 Apr 2018 09:54:54 +0000
treeherdermozilla-central@2ae59181b9de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1444301
milestone61.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 1444301 - Add missing PropTypes to ToolboxToolbar; r=jryans MozReview-Commit-ID: Bab6tFM6QUH
devtools/client/framework/components/toolbox-toolbar.js
--- a/devtools/client/framework/components/toolbox-toolbar.js
+++ b/devtools/client/framework/components/toolbox-toolbar.js
@@ -23,22 +23,34 @@ class ToolboxToolbar extends Component {
       // The currently focused item (for arrow keyboard navigation)
       // This ID determines the tabindex being 0 or -1.
       focusedButton: PropTypes.string,
       // List of command button definitions.
       toolboxButtons: PropTypes.array,
       // The id of the currently selected tool, e.g. "inspector"
       currentToolId: PropTypes.string,
       // An optionally highlighted tools, e.g. "inspector".
-      // Note: highlightedTools must be an instance of Set.
-      highlightedTools: PropTypes.object,
-      // List of tool panel definitions.
+      highlightedTools: PropTypes.instanceOf(Set),
+      // Should the docking options be enabled? They are disabled in some
+      // contexts such as WebIDE.
+      areDockButtonsEnabled: PropTypes.bool,
+      // Do we need to add UI for closing the toolbox? We don't when the
+      // toolbox is undocked, for example.
+      canCloseToolbox: PropTypes.bool,
+      // List of tool panel definitions (used by ToolboxTabs component).
       panelDefinitions: PropTypes.array,
+      // List of possible docking options.
+      hostTypes: PropTypes.arrayOf(PropTypes.shape({
+        position: PropTypes.string.isRequired,
+        switchHost: PropTypes.func.isRequired,
+      })),
       // Function to select a tool based on its id.
       selectTool: PropTypes.func,
+      // Function to completely close the toolbox.
+      closeToolbox: PropTypes.func,
       // Keep a record of what button is focused.
       focusButton: PropTypes.func,
       // The options button definition.
       optionsPanel: PropTypes.object,
       // Hold off displaying the toolbar until enough information is ready for
       // it to render nicely.
       canRender: PropTypes.bool,
       // Localization interface.