Skip to content

Commit 3395902

Browse files
edonehoodlabaj
andauthored
docs(menu): Updates menu guidelines for v6. (#4745)
* docs(menu): Updates menu guidelines for v6. * Updates per feedback. * Updates split button description. * Fix typos and links --------- Co-authored-by: Donald Labaj <dlabaj@redhat.com>
1 parent 12748f3 commit 3395902

29 files changed

+205
-179
lines changed

packages/documentation-site/patternfly-docs/content/design-guidelines/components/application-launcher/application-launcher.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,22 @@ subsection: menus
77
import '../components.css';
88

99
## Elements
10-
An application launcher has two main elements.
1110

1211
<div class="ws-docs-content-img">
1312
![Elements of the application launcher component.](./img/app-launcher-elements.svg)
1413
</div>
1514

16-
1. **Icon:** used to open and close the menu.
17-
2. **Menu:** contains a list of links.
18-
3. **Favorites (optional):** allows users to pin items to the top of the list.
15+
1. **Icon:** Used to open and close the menu.
16+
2. **Menu:** Contains a list of links to applications.
17+
3. **Favorites (optional):** Section at the top of the menu that contains pinned items.
1918

2019
## Usage
2120

22-
Application launchers are usually found within the masthead of a UI. They are commonly used when you want to allow users to launch multiple applications from a common location. Use the external link icon to indicate when a link opens a new window. You can also use icons in the list.
21+
Application launchers are usually found within the [masthead](/components/masthead) of a UI. They are commonly used when you want to allow users to launch multiple applications from a common location. Use the external link icon to indicate when a link opens a new window. You can also use icons in the list.
2322

24-
For longer lists, you can optionally add the ability to search the list and favorite items. Favoriting an item using the star icon allows users to pin items to the top of the menu in a separate Favorites section. The item will appear in the list twice: once in the Favorites section and once in its original location.
23+
For longer lists, you can optionally add the ability to search the list and favorite items. Favoriting an item using the star icon allows users to pin items to the top of the menu in a separate "Favorites" section. The item will appear in the list twice: once in the "Favorites" section and once in its original location.
2524

26-
27-
## Examples
25+
### Examples
2826
**Application launcher with external links**
2927
<div class="ws-docs-content-img">
3028
![Example of an application launcher with external links.](./img/app-launcher-ext-links.svg)

packages/documentation-site/patternfly-docs/content/design-guidelines/components/dropdown/dropdown.md

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ A basic dropdown consists of a toggle control to open and close a menu of action
1313
![Elements of a basic dropdown.](./img/dropdown-elements.svg)
1414
</div>
1515

16-
1. **Toggle:** The toggle is used to open and close the menu. It takes on all of the behaviors of a button. The toggle label is used to name the menu and should be descriptive of the actions that it contains. If no more descriptive name makes sense, use “Actions” as a default name.
16+
1. **Toggle:** Used to open and close the dropdown menu. It takes on all of the behaviors of a [button](/components/button). The toggle label is used to name the menu and should describe the actions that it contains. If no unique descriptive name applies, default to using “Actions”.
1717

18-
2. **Menu:** The menu contains a list of actions or links. Menus should optimally contain seven (7) or less items for easy scanning by the user. For longer menus, items may be grouped. See the [menu component guidelines](/components/menus/menu/design-guidelines) for more information about supported options, including use of icons, grouping, and descriptions. The Dropdown component includes many common built-in menu variants. It’s also possible to attach a custom menu by using the [basic panel variant](/components/menus/dropdown#basic-panel).
18+
2. **Menu:** Contains a list of options, which could be actions or links. Menus should optimally contain 7 items or fewer to enable better scannability. For longer menus, items can be grouped. For more guidance on supported options in menus (use of icons, grouping, and descriptions) refer to the [menu component guidelines](/components/menus/menu/design-guidelines).
1919

2020
## Variations
21-
In addition to the basic dropdown shown above, you may apply the following variants to the dropdown toggle element.
21+
In addition to the basic dropdown toggle, you can use the following dropdown toggle variants.
2222

2323
<div class="ws-docs-content-img">
2424
![Example of different dropdown variations.](./img/dropdown-variations.svg)
@@ -27,21 +27,39 @@ In addition to the basic dropdown shown above, you may apply the following varia
2727
### Primary toggle
2828
The primary toggle should be used in the same way as you would use a primary button. If you want to draw the user’s attention to a dropdown menu as the primary place to take action on a page, consider using a dropdown with primary styling.
2929

30+
<div class="ws-docs-content-img">
31+
![A menu toggle that is pill-shaped with a blue fill and white label.](./img/primary-toggle.svg)
32+
</div>
33+
3034
### Secondary toggle
31-
The secondary toggle is a variation of the primary toggle. It has less visual prominence than the primary toggle, but more visual prominence than the basic toggle and other toggle variations. Use a secondary toggle when the actions in the dropdown are the secondary actions you’d want a user to take.
35+
The secondary toggle is a variation of the primary toggle. It has less visual prominence than the primary toggle, but more visual prominence than the basic toggle and other toggle variations.
36+
37+
<div class="ws-docs-content-img">
38+
![A menu toggle that is pill-shaped with a blue border and label.](./img/secondary-toggle.svg)
39+
</div>
3240

33-
Use a secondary toggle when other toggle variations would appear visually inconsistent, or lack the sufficient prominence needed to create a visual hierarchy.
41+
Use a secondary toggle when the actions in the dropdown are the secondary actions you’d want a user to take. You can also use a secondary toggle when other toggle variations would appear visually inconsistent, or lack the sufficient prominence needed to create a visual hierarchy.
3442

3543
### Plain toggle
36-
Plain styling removes the border treatment from a dropdown toggle. This is useful in places where the default border treatment might make your layout feel visually cluttered or crowded. Use a plain toggle when further action hierarchy needs to be established and you already have primary or secondary action toggle on the page.
44+
Plain styling removes the border from a dropdown toggle, which is useful when the default border treatment might make your layout feel visually cluttered or crowded.
45+
46+
<div class="ws-docs-content-img">
47+
![A menu toggle that is only text with a dropdown caret. There is no fill or border.](./img/plain-toggle.svg)
48+
</div>
49+
50+
Use a plain toggle when further action hierarchy needs to be established and you already have a primary or secondary action toggle on the page.
3751

3852
### Icon toggle
39-
When there is not enough space for a labeled button, an icon can be used instead. Icon toggles are best used when you can use a common icon that has a well understood meaning or when you are working with limited space. A common default is to use the vertical ellipses (kebab) icon to generally indicate that it is connected with a menu as shown above.
53+
When there is not enough space for a labeled button, use an icon toggle instead. Icon toggles are most effective when you use a common icon with a well-understood meaning, like the vertical ellipses (kebab) icon.
54+
55+
<div class="ws-docs-content-img">
56+
![A kebab ellipsis icon above a menu that has two items.](./img/icon-toggle.svg)
57+
</div>
4058

4159
### Split button
4260
A split button can be used when you want to combine an action button or other control with a dropdown menu. Use a split button action dropdown when you have multiple actions to show that are related to each other, but one action is more likely or important than the rest.
4361

44-
There are two types of split buttons: split buttons with checkboxes and split buttons with actions.
62+
There are 2 types of split buttons: split buttons with checkboxes and split buttons with actions.
4563

4664
#### Split button with checkbox
4765

@@ -53,20 +71,16 @@ A split button with a checkbox can be used in bulk selection use cases for a lis
5371

5472
#### Split button with actions
5573

56-
A split button with actions is useful when you want to expose a default action with a single click, but also allow access to other actions via the dropdown menu. This can be thought of as providing a shortcut to the most recent or frequently used item in the menu. A split button with actions can contain a labeled action or an icon in place of the label for use when there is limited space.
74+
A split button with actions is useful when you want to expose a default action with a single click, but also allow access to other actions via the dropdown menu. This can be thought of as providing a shortcut to the most recent or frequently used item in the menu. The default action should be clearly labeled in the button.
5775

5876
<div class="ws-docs-content-img">
5977
![Example of split button actions.](./img/split-button-actions.svg)
6078
</div>
6179

62-
**Behavior**
63-
64-
In this case, the user can either click on the primary button, or on the caret to open/view the rest of the related options. When a user clicks on an action whether the surfaced one, or one from inside the menu, the action will be selected and applied immediately.
80+
#### Example
6581

66-
**Example**
82+
In this case, the user can either click on the primary button, or on the caret to open/view the rest of the related options. When a user clicks on an action&mdash;either the surfaced action or one from inside the menu&mdash;the action will be selected and applied immediately.
6783

6884
<div class="ws-docs-content-img">
6985
![Example of a split button used in a modal.](./img/split-button-behavior.svg)
70-
</div>
71-
72-
A split action button is used in a modal where there are different possible submit variations. Here, all the buttons are related in that they are different ways to submit the modal, but the surfaced option is the most likely to be used, while the ones housed in the toggle are other less likely options.
86+
</div>

0 commit comments

Comments
 (0)