Skip to content

Commit 7c394a8

Browse files
docs(list, simple list, data list, description list): Updates images for v6. (#4542)
Co-authored-by: Andrew Ronaldson <aronalds@redhat.com>
1 parent f349b8b commit 7c394a8

24 files changed

Lines changed: 1383 additions & 27 deletions

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

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ section: components
44
related: ['Table']
55
---
66

7+
import '../components.css';
8+
79
## Elements
10+
811
The elements mentioned below are similar for a data list with compact or default spacing. This example shows a data list with compact spacing.
912

10-
<img src="./img/datalist-elements.png" alt="example of elements on a data list" width="1273"/>
13+
<div class="ws-docs-content-img">
14+
![Elements of a data list](./img/datalist-elements.svg)
15+
</div>
1116

1217
1. **[Toolbar](/components/toolbar/design-guidelines):** Sits above the list and contains controls for manipulating list data. Common actions include filtering, sorting, and pagination.
1318
2. **[Bulk selection](/patterns/bulk-selection):** When present, selects all items in a table. If pagination is being used, this will only select items on the current page. See [bulk selection](/patterns/bulk-selection) for more information.
@@ -20,6 +25,7 @@ The elements mentioned below are similar for a data list with compact or default
2025

2126

2227
## Usage
28+
2329
Think of each row in a data list as a container for some formatted content. In PatternFly, data list rows can accept any [layout](/layouts/bullseye) supported by the design system as long as all rows apply the same layout. Here are some common layouts that may be useful in a data list:
2430

2531
* **[Grid](/layouts/grid):** Displays content in a responsive grid.
@@ -42,14 +48,17 @@ Data lists can also appear in primary-detail views. Visit the [primary-detail gu
4248
* The clarity of your content would benefit from well defined columns and headings.
4349

4450
## Variations
51+
4552
PatterFly supports 2 main types of data lists:
4653

4754
1. **[Compact data list](#compact-spacing):** Use when you want to show as much data per page as possible.
4855
2. **[Default data list](#default-spacing):** Use when you don’t have to minimize paging.
4956

5057
See [when to use compact vs. default spacing](#when-to-use-a-data-list-vs.-a-table)for more information about the styling and usage.
5158

52-
<img src="./img/compact-and-default-list.png" alt="Compact and default data list" />
59+
<div class="ws-docs-content-img">
60+
![Examples of compact and default data lists.](./img/datalist-variations.svg)
61+
</div>
5362

5463
### Data list capabilities
5564
Every data list can be extended with these functionalities:
@@ -62,7 +71,9 @@ Every data list can be extended with these functionalities:
6271
### Selectable data list
6372
The selectable data list provides checkboxes that enable users to select one or more rows in the list. Users may then act on those selections using options in the [toolbar](/components/toolbar/design-guidelines).
6473

65-
<img src="./img/datalist-selectable.png" alt="example of selectable data list" width="1214"/>
74+
<div class="ws-docs-content-img">
75+
![Example of a selectable data list.](./img/datalist-selectable.svg)
76+
</div>
6677

6778
1. **[Bulk selection](/patterns/bulk-selection):** When present, selects all items in a table. If pagination is being used, this will only select items on the current page. See [bulk selection](/patterns/bulk-selection) for more information.
6879
2. **Checkbox:** Enables a user to select a row.
@@ -77,7 +88,9 @@ The selectable data list provides checkboxes that enable users to select one or
7788
### Clickable data list
7889
The clickable data list can be used when data lists need to provide additional information while keeping the row information available via a primary-detail drawer. This can be done by clicking on the row itself.
7990

80-
<img src="./img/datalist-clickable.png" alt="example of clickable data list" width="2606"/>
91+
<div class="ws-docs-content-img">
92+
![Example of a clickable data list.](./img/datalist-clickable.svg)
93+
</div>
8194

8295
1. **Row:** Enables the user to click on the row to trigger the action of opening a primary-detail drawer
8396
2. **Primary-detail:** Additional drawer of information that allows the user to still see the data list
@@ -90,7 +103,9 @@ The clickable data list can be used when data lists need to provide additional i
90103
### Expandable data list
91104
The expandable list adds an expansion panel to every row to reveal more details about the item.
92105

93-
<img src="./img/datalist-expandable.png" alt="example of expandable data list" width="1273"/>
106+
<div class="ws-docs-content-img">
107+
![Example of an expandable data list.](./img/datalist-expandable.svg)
108+
</div>
94109

95110
1. **Expand all (optional):** Expands or collapses every row in the data list at the same time.
96111
2. **Expansion caret:** Toggles the expansion open and closed for the individual row.
@@ -103,23 +118,37 @@ The expandable list adds an expansion panel to every row to reveal more details
103118
* You want to provide a way for advanced users to access information that is not applicable to all users.
104119

105120
### Draggable data list rows
106-
107121
Draggable data list rows can be added to any data list and allow you to customize the order of rows within a data list.
108122

109-
<img src="./img/datalist-draggable1.png" alt="example of draggable data list" width="1011"/>
110-
111123
1. **Drag icon:** To indicate a row is draggable, use the fa-grip icon. Use grip-vertical to indicate the ability to move a vertically-oriented component via drag and drop. Use grip-horizontal to move a horizontally-oriented component via drag and drop. For example, if you are selecting items to be dragged from two parallel lists.
124+
125+
<div class="ws-docs-content-img">
126+
![Example of a draggable data list.](./img/datalist-draggable1.svg)
127+
</div>
128+
112129
2. **Dragged row:** When dragging a row, it becomes slightly less opaque and floats above the static rows to indicate that it is the one moving.
113130

114-
<img src="./img/datalist-draggable2.png" alt="example of draggable data list" width="1006"/>
131+
<div class="ws-docs-content-img">
132+
![Example of a data list item being dragged.](./img/datalist-draggable2.svg)
133+
</div>
115134

116135
3. **Dragged row positioning:** When positioning the row, the other elements in the data list will move to indicate the dragged row’s position.
136+
137+
<div class="ws-docs-content-img">
138+
![Example of a data list being reordered on drag.](./img/datalist-draggable3.svg)
139+
</div>
140+
117141
4. **Final position:** After the row has been placed where desired, the data list becomes static again, until the user decides to drag another row.
118142

143+
<div class="ws-docs-content-img">
144+
![Example of a reordered data list after dragging an item.](./img/datalist-draggable4.svg)
145+
</div>
146+
119147
#### When to use
120148
Use draggable data list rows when you want to allow users to order their choices within a list. A common example of this is [column management](/components/table/react-demos#column-management-with-draggable). Users can choose the number of columns and the order they are shown in a table by selecting and dragging rows in the **Manage columns** modal. Another common use case is ordering the importance of roles or types relative to a resource.
121149

122150
## Spacing
151+
123152
Whether to use a data list with compact or default spacing is up to you and your use case. However, here is some guidance for when to use which option. You can see examples of each option for comparison.
124153

125154
### Compact spacing
@@ -131,8 +160,6 @@ A data list may sometimes need to be compact to make more rows visible at a time
131160
* You need to minimize paging.
132161
* Readability is a secondary concern.
133162

134-
<img src="./img/compact-datalist.png" alt="Example of compact spacing data list" width="990"/>
135-
136163
**Example:**
137164
* You can see more data on one page.
138165
* You have a good overview about the structure of data.
@@ -147,12 +174,11 @@ A data list may sometimes need more space for rich graphical data. See an exampl
147174
* You don't have to minimize paging.
148175
* Readability is a primary concern.
149176

150-
<img src="./img/default-datalist.png" alt="Example of default spacing data list" width="990"/>
151-
152177
**Example:**
153178
* You can see less data on one page.
154179
* You will need a pagination to see more rows.
155180
* Data structure includes many visual elements.
156181

157182
## Alternative solutions
183+
158184
Alternative to a data list include [tables](/components/table/design-guidelines) or [card views](/components/card/design-guidelines#card-views). Card views and data lists have similar properties, but information in a card view is chunked into a grid of individual cards. In choosing between a data list and a card view, consider the type of data that will be displayed and the format that best suits that data. If you cannot easily fit all of the data that needs to be displayed into a card, a data list might be a better solution.

0 commit comments

Comments
 (0)