Skip to content

Commit ac23b75

Browse files
docs(data-list): Updates design guidelines for accuracy. (#4609)
Co-authored-by: Andrew Ronaldson <aronalds@redhat.com>
1 parent ade1a52 commit ac23b75

1 file changed

Lines changed: 31 additions & 36 deletions

File tree

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

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

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,44 @@ Data lists can also appear in primary-detail views. Visit the [primary-detail gu
4949

5050
## Variations
5151

52-
PatterFly supports 2 main types of data lists:
53-
52+
PatterFly supports 2 main types of data lists:
5453
1. **[Compact data list](#compact-spacing):** Use when you want to show as much data per page as possible.
5554
2. **[Default data list](#default-spacing):** Use when you don’t have to minimize paging.
5655

57-
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.
58-
5956
<div class="ws-docs-content-img">
6057
![Examples of compact and default data lists.](./img/datalist-variations.svg)
6158
</div>
6259

60+
While using a compact or default data list largely depends on your use case, adhere to the following general guidelines.
61+
62+
### Compact spacing
63+
A data list may sometimes need to be compact to make more rows visible at a time. The more rows you can see, the less you need to use [pagination](/components/pagination/design-guidelines). Compact spacing is recommended for data with a simple structure.
64+
65+
**Use compact spacing when:**
66+
* You need to show as much data as possible on one page.
67+
* You need to show data in a small space, like in a modal or wizard.
68+
* You need to minimize paging.
69+
* Readability is a secondary concern.
70+
71+
**Example:**
72+
* You can see more data on one page.
73+
* You have a good overview about the structure of data.
74+
* The structure of data is simple, informative and have less visual elements.
75+
76+
### Default spacing
77+
A data list may sometimes need more space for rich graphical data.
78+
79+
**Use default spacing when:**
80+
* You don’t have to display a lot of data on one page.
81+
* You use many visual indicators that are placed in columns, such as icons or charts.
82+
* You don't have to minimize paging.
83+
* Readability is a primary concern.
84+
85+
**Example:**
86+
* You can see less data on one page.
87+
* You will need a pagination to see more rows.
88+
* Data structure includes many visual elements.
89+
6390
### Data list capabilities
6491
Every data list can be extended with these functionalities:
6592

@@ -147,38 +174,6 @@ Draggable data list rows can be added to any data list and allow you to customiz
147174
#### When to use
148175
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.
149176

150-
## Spacing
151-
152-
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.
153-
154-
### Compact spacing
155-
A data list may sometimes need to be compact to make more rows visible at a time. The more rows you can see, the less you need to use [pagination](/components/pagination/design-guidelines). Compact spacing is recommended for data with a simple structure. See an example below.
156-
157-
**Use compact spacing when:**
158-
* You need to show as much data as possible on one page.
159-
* You need to show data in a small space, like in a modal or wizard.
160-
* You need to minimize paging.
161-
* Readability is a secondary concern.
162-
163-
**Example:**
164-
* You can see more data on one page.
165-
* You have a good overview about the structure of data.
166-
* The structure of data is simple, informative and have less visual elements.
167-
168-
### Default spacing
169-
A data list may sometimes need more space for rich graphical data. See an example below.
170-
171-
**Use default spacing when:**
172-
* You don’t have to display a lot of data on one page.
173-
* You use many visual indicators that are placed in columns, such as icons or charts.
174-
* You don't have to minimize paging.
175-
* Readability is a primary concern.
176-
177-
**Example:**
178-
* You can see less data on one page.
179-
* You will need a pagination to see more rows.
180-
* Data structure includes many visual elements.
181-
182177
## Alternative solutions
183178

184179
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)