-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ToolsPanel: switch to plus icon when no controls present in panel body (
#34107) * When there are no selected controls within a ToolsPanel, change the icon to a plus symbol. This is to indicate to the user that they can add controls to the panel. * Moving business logic into the hook * Ensure that optional controls, when hidden and available, trigger the plus icon in the ToolsPanel header. Updated stories. * updating variable name to make it clearer that we want to track if optional items are available at all *and* if so, are they hidden * This commit adds a variable aria-label to the tools panel header menu button to describe the element and its intended effects. Added component tests. * Changing copy from "Show" to "View" Updating tests * Renaming `areAllOptionalControlsHidden` variable and adding it as a property to the ToolsPanelContext type Modified default value of areAllOptionalControlsHidden and updated comments * Make `areAllOptionalControlsHidden` required on the ToolsPanelContent object. * Update packages/components/src/tools-panel/test/index.js Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> * Add custom fixtures for optional control props in order to test the panel header icon toggle in isolation from the other tests. * Update packages/components/src/tools-panel/stories/index.js Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> * Consolidating comment and reinstating `false` as the default value for the state var `areAllOptionalControlsHidden` Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com>
- Loading branch information
1 parent
5430baf
commit 1961b03
Showing
7 changed files
with
131 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters