Bug 1444301 - Add missing PropTypes to ToolboxToolbar; r?jryans draft
authorBrian Birtles <birtles@gmail.com>
Thu, 05 Apr 2018 10:13:21 +0900
changeset 778368 76e8e9fa89bc7b1ea54cad153d0ee2833d808835
parent 778203 7b40283bf1c7a2a3e6a8a5d00156a2f506ff465b
child 778369 f89a01b063dce8f817b8f36dcc21cdaba3ab7d9b
push id105480
push userbmo:bbirtles@mozilla.com
push dateFri, 06 Apr 2018 08:29:15 +0000
reviewersjryans
bugs1444301
milestone61.0a1
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.