Merge pull request #1422
* UX-2323 Update Toolbar article * UX-2323 Update Toolbar article * UX-2323 Update Toolbar article * UX-2323 Update Toolbar article
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 28 KiB |
BIN
images/ui/toolbar/more_toolbars_correct.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
images/ui/toolbar/more_toolbars_correct_dark.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
images/ui/toolbar/more_toolbars_incorrect.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
images/ui/toolbar/more_toolbars_incorrect_dark.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 224 KiB |
BIN
images/ui/toolbar/toolbar.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 24 KiB |
BIN
images/ui/toolbar/toolbar_dark.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
images/ui/toolbar/toolbar_dialogs_horizontal.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
images/ui/toolbar/toolbar_dialogs_horizontal_dark.png
Normal file
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 3.9 KiB |
BIN
images/ui/toolbar/toolbar_horizontal_tool_window.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
images/ui/toolbar/toolbar_horizontal_tool_window_at_right.png
Normal file
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 28 KiB |
BIN
images/ui/toolbar/toolbar_horizontal_tool_window_dark.png
Normal file
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 52 KiB |
BIN
images/ui/toolbar/toolbar_items.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
images/ui/toolbar/toolbar_items_alignment.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
images/ui/toolbar/toolbar_items_alignment_dark.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
images/ui/toolbar/toolbar_items_dark.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
images/ui/toolbar/toolbar_items_grouping.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
images/ui/toolbar/toolbar_items_grouping_dark.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
images/ui/toolbar/toolbar_items_grouping_with_label.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
images/ui/toolbar/toolbar_items_grouping_with_label_dark.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
images/ui/toolbar/toolbar_items_order.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
images/ui/toolbar/toolbar_items_order_dark.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
images/ui/toolbar/toolbar_overflow.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
images/ui/toolbar/toolbar_overflow_dark.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
images/ui/toolbar/toolbar_overflow_hover.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
images/ui/toolbar/toolbar_overflow_hover_dark.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
images/ui/toolbar/toolbar_scroll_top.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
images/ui/toolbar/toolbar_scroll_top_dark.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
images/ui/toolbar/toolbar_scroll_under.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
images/ui/toolbar/toolbar_scroll_under_dark.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
images/ui/toolbar/toolbar_separators_correct.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
images/ui/toolbar/toolbar_separators_correct_dark.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
images/ui/toolbar/toolbar_separators_incorrect.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
images/ui/toolbar/toolbar_separators_incorrect_dark.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB |
BIN
images/ui/toolbar/toolbar_vertical_tool_window.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
images/ui/toolbar/toolbar_vertical_tool_window_dark.png
Normal file
After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.7 KiB |
@ -11,154 +11,188 @@
|
||||
|
||||
</tldr>
|
||||
|
||||
A toolbar provides quick access to frequently used actions and filters. It appears in dialogs, pop-ups, tool windows, lists, trees, and tables.
|
||||
A toolbar provides quick access to frequently used actions and settings. It appears in dialogs, popups, tool windows, lists, trees, and tables.
|
||||
|
||||
{width=428}
|
||||
{width=706}
|
||||
|
||||
## Toolbar items
|
||||
|
||||
{width=706}
|
||||
|
||||
The following controls can appear on a toolbar:
|
||||
|
||||
* [Icon button](icon_button.md): action, toggle, or drop-down
|
||||
|
||||
* [Split icon button](split_icon_button.md)
|
||||
|
||||
* [Toolbar drop-down list](toolbar_drop_down.md)
|
||||
|
||||
* [Search field](search_field.md)
|
||||
|
||||
* [Button](button.topic)
|
||||
|
||||
* Separator
|
||||
|
||||
* Label
|
||||
|
||||
* Chevron
|
||||
|
||||
{width=704}
|
||||
|
||||
## What items to add on toolbar
|
||||
|
||||
Put only the most frequently used commands on the toolbar. Rely on usage statistics if it’s available.
|
||||
### Frequently used items
|
||||
Add actions and settings that are frequently used:
|
||||
* If usage statistics are available, frequent use is more than 5% of this feature's users.
|
||||
* If usage statistics are not available:
|
||||
* Add items that are needed for the most common use cases of this feature.
|
||||
* If possible, add usage statistics logging for toolbar items that lack it. Check statistics after 3–4 weeks of use. If the items are used by less than 5% of the feature's users, consider removing them from the toolbar.
|
||||
|
||||
If an action is new, and it seems useful, add it to the corresponding toolbar.
|
||||
Remove it after several releases if it’s not popular, which means it’s used by less than ~5% of users who use this toolbar.
|
||||
|
||||
Do **not** put unpopular or well-known commands, like Copy and Paste on the toolbar. Use the main menu or the context menu for such commands.
|
||||
<note>Exception: some actions can be used most frequently because they are widely known, like the Copy and Paste actions. Place such actions on the toolbar only if you want to promote them. Otherwise, place them only in a context menu or the main menu.</note>
|
||||
|
||||
It’s **not** recommended to add more items than the default toolbar length. Otherwise, the items will be hidden and it will be hard to discover them.
|
||||
### New items
|
||||
When adding a new action or setting for a UI area that already has a toolbar: if the new item is expected to be used frequently, add it to increase its discoverability.
|
||||
|
||||
{width=283}
|
||||
|
||||
Left align items on a horizontal toolbar and top align on a vertical toolbar.
|
||||
## How to use
|
||||
|
||||
Group related toolbar icon buttons and separate groups with lines. If there are several unrelated icons, do **not** add separators after each icon.
|
||||
### Location
|
||||
|
||||
{width=242}
|
||||
Toolbars can be horizontal or vertical. Which type to use, depends on what control the toolbar is used for.
|
||||
|
||||
Label a group of icons if it helps to make the icons clearer and if it’s needed to promote the icons. The icons group becomes more visible with the label.
|
||||
#### Lists, trees, tables
|
||||
|
||||
Arrange items inside groups by the frequency of use, from left to right from top to bottom. Rely on statistics.
|
||||
Use horizontal toolbars for lists, trees, and tables that appear in dialogs and popups. Place the toolbar at the top of the control.
|
||||
|
||||
It is recommended to arrange groups in the following order unless it contradicts the usage statistics. If it does, arrange groups by the frequency of use.
|
||||
{width=706}
|
||||
|
||||
{width=260}
|
||||
#### Vertical tool windows
|
||||
|
||||
The less frequently used commands can be right aligned.
|
||||
Use horizontal toolbars in tool windows that are vertical by default.
|
||||
|
||||
{width=491}
|
||||
{width=706}
|
||||
|
||||
Do **not** put two toolbars next to each other. One toolbar should be enough for the most popular actions.
|
||||
#### Horizontal tool windows
|
||||
|
||||
<table>
|
||||
Use vertical toolbars for tool windows that are horizontal by default. Place the toolbar on the left in a tool window.
|
||||
|
||||
{width=706}
|
||||
|
||||
<br/>
|
||||
|
||||
If a horizontal tool window has several sections, place a toolbar on the right in sections after the first one if these conditions are true:
|
||||
* The sections are a master-detail layout, with a list or tree on the left and a selected item's details on the right.
|
||||
* The toolbar contains actions that are used occasionally, like the <control>Soft-Wrap</control> setting in the <control>Console</control> section of the <control>Build</control> tool window.
|
||||
|
||||
This way the toolbar would not break the connection between the master and the detail sections.
|
||||
|
||||
|
||||
{width=706}
|
||||
|
||||
<br/>
|
||||
|
||||
A horizontal toolbar can be used in a horizontal tool window in the two cases:
|
||||
* The toolbar contains items used for managing processes, like <control>Step In</control> and <control>Step Out</control> in the <control>Debug</control> tool window, or <control>Run</control> and <control>Stop</control> in the <control>Run</control> tool window. A horizontal toolbar makes the actions more noticeable and easy to reach.
|
||||
* The toolbar contains items that need horizontal space, like a <control>search field</control> and <control>drop-down lists</control> in the <control>Git</control> tool window.
|
||||
|
||||
{width=706}
|
||||
|
||||
|
||||
{width=706}
|
||||
|
||||
|
||||
### Items alignment
|
||||
On a vertical toolbar, always top-align items.
|
||||
|
||||
On a horizontal toolbar:
|
||||
* Left-align items by default.
|
||||
* Right-align the less frequently used items.
|
||||
|
||||
{width=706}
|
||||
|
||||
|
||||
### Items grouping
|
||||
Group related toolbar items and separate groups with lines.
|
||||
|
||||
{width=706}
|
||||
|
||||
<br/>
|
||||
|
||||
If there are several unrelated icons, do not add separators after each icon. Separators could be entirely omitted if there are 5 and fewer icons on a toolbar.
|
||||
|
||||
<table style="none" border="false" column-width="fixed">
|
||||
<tr>
|
||||
<td width="50%"><format color="Red" style="bold">Incorrect</format></td>
|
||||
<td width="50%"><format color="Green" style="bold">Correct</format></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="toolbars_2.png" alt="" width="58" /></td>
|
||||
<td><img src="toolbars_1.png" alt="" width="30" /></td>
|
||||
<td>
|
||||
<format color="369650" style="bold">Correct</format>
|
||||
<img src="toolbar_separators_correct.png" alt="A toolbar with five icons without separators" width="378"/>
|
||||
</td>
|
||||
<td><format color="E55765" style="bold">Incorrect</format>
|
||||
<img src="toolbar_separators_incorrect.png" alt="A toolbar with five icons and three separators" width="378"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Make every toolbar action available from the main menu or the context menu.
|
||||
Toolbars are customizable and can be hidden, so commands should be available from other places as well.
|
||||
#### Label
|
||||
|
||||
If the default component size changes and there is not enough space for items on a toolbar, hide them under the chevron.
|
||||
Label a group of icons if it helps to make the icons clearer and if it’s needed to promote the icons. The icons group becomes more visible with the label.
|
||||
|
||||
{width=30}
|
||||
{width=706}
|
||||
|
||||
## Visibility and customization
|
||||
|
||||
Provide the ability to hide the toolbar in the main window via the toolbar context menu.
|
||||
### Items order
|
||||
Arrange separate items or groups in the following order by default.
|
||||
|
||||
{width=428}
|
||||
If usage statistics are available, and popular items appear not at the top or left of a toolbar, consider arranging by the frequency of use.
|
||||
|
||||
Provide commands for invoking the toolbar. Use the main menu for the main window toolbars. Use the pane view settings for toolbars in tool windows.
|
||||
{width=706}
|
||||
|
||||
{width=597}
|
||||
|
||||
Provide the ability to customize toolbars in the main window.
|
||||
To do this, add the toolbar to the list on the <ui-path>Settings | Appearance & Behavior | Menus and Toolbars</ui-path> page and open
|
||||
it using the <control>Customize Toolbar...</control> action from the toolbar context menu.
|
||||
### Toolbar overflow
|
||||
A toolbar's width is usually limited by the element it belongs to. If there is not enough space for items on the toolbar, they are hidden under a <control>chevron</control>. Hovering the chevron shows the hidden items.
|
||||
|
||||
{width=404}
|
||||
It is recommended to keep the number of toolbar items to what would be visible by default. Otherwise, the items will be hidden and it will be hard to discover them.
|
||||
|
||||
## Sizes and placement
|
||||
<table style="none" border="false" column-width="fixed">
|
||||
<tr>
|
||||
<td>
|
||||
<img src="toolbar_overflow.png" alt="A horizontal toolbar above a tree with seven icons and an overflow chevron at the right" width="378"/>
|
||||
</td>
|
||||
<td>
|
||||
<img src="toolbar_overflow_hover.png" alt="The same UI as in the previous image but with the overflow chevron hovered: the full toolbar with nine icons becomes visible" width="378"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
The toolbar can be vertical or horizontal.
|
||||
|
||||
{width=498}
|
||||
#### Avoid two toolbars
|
||||
Do not counter a toolbar overflow by adding more toolbars. If there are too many items on a toolbar:
|
||||
* Group items under drop-down icon buttons
|
||||
* Remove unpopular items by following the guidelines in [](#what-items-to-add-on-toolbar)
|
||||
|
||||
By default, place the toolbar at the top of the area.
|
||||
<table style="none" border="false" column-width="fixed">
|
||||
<tr>
|
||||
<td>
|
||||
<format color="369650" style="bold">Correct</format>
|
||||
<img src="more_toolbars_correct.png" alt="A vertical toolbar with seven icons" width="378"/>
|
||||
</td>
|
||||
<td>
|
||||
<format color="E55765" style="bold">Incorrect</format>
|
||||
<img src="more_toolbars_incorrect.png" alt="Two vertical toolbars stacked together with 19 icons in total" width="378"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{width=220}
|
||||
|
||||
### Exceptions
|
||||
### Toolbar border
|
||||
|
||||
Place the toolbar on the left in horizontal tool windows if horizontal space is not limited.
|
||||
A horizontal toolbar will be too wide and will occupy lots of space:
|
||||
For scrollable content in <control>tool windows</control>, do not show a toolbar border if the content is at the top scroll position. Show the border once the content is scrolled under the toolbar.
|
||||
|
||||
{width=220}
|
||||
<table style="none" border="false" column-width="fixed">
|
||||
<tr>
|
||||
<td>
|
||||
<img src="toolbar_scroll_top.png" alt="A tree with a toolbar above it. The tree is at the top scroll position, the toolbar border is not visible." width="378"/>
|
||||
</td>
|
||||
<td>
|
||||
<img src="toolbar_scroll_under.png" alt="A tree with a toolbar above it. The tree is scrolled under the toolbar, the toolbar border is visible." width="378"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Place the toolbar on the right if it’s not the first toolbar in the pane, and it’s rarely used.
|
||||
|
||||
{width=386}
|
||||
In places other than tool windows, it is fine to always show the border.
|
||||
|
||||
Place the toolbar at the bottom on macOS, and on the right on Windows and Linux in [tables](table.md).
|
||||
|
||||
{width=432 style=block}
|
||||
*macOS*
|
||||
## Customization
|
||||
|
||||
{width=431 style=block}
|
||||
*Windows*
|
||||
Provide the ability to customize toolbars in the main window. To do this, add the toolbar to the list on the <ui-path>Settings | Appearance & Behavior | Menus and Toolbars</ui-path> page.
|
||||
|
||||
The toolbar width is limited by the width of the element it belongs to. For example, by the width of the tool window or the list part in a master-detail layout.
|
||||
|
||||
| <format color="Red" style="bold">Incorrect</format> | <format color="Green" style="bold">Correct</format> |
|
||||
|-----------------------------------------------------|-----------------------------------------------------|
|
||||
| {width="283"} | {width=283} |
|
||||
|
||||
Toolbar sizes are the same for all themes:
|
||||
|
||||
{width=539}
|
||||
|
||||
{width=418}
|
||||
|
||||
The toolbar items sizes change together with the application font size proportionally.
|
||||
|
||||
{width=604}
|
||||
|
||||
## Style
|
||||
|
||||
{width=477}
|
||||
|
||||
Separate the toolbar from the content with a line from all four sides if it appears in a tool window or a table:
|
||||
|
||||
| <format color="Red" style="bold">Incorrect</format> | <format color="Green" style="bold">Correct</format> |
|
||||
|-----------------------------------------------------|-----------------------------------------------------|
|
||||
| {width="220"} | {width="220"} |
|
||||
|
||||
Do **not** separate a toolbar with lines if it appears above the list:
|
||||
|
||||
{width=404}
|
||||
|