Skip to content

docs(description-list): Updates design guidelines for accuracy and cleanup. #4612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the numbered list to match the annotations is all #1s?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org should be able to process it and make it an ordered list accordingly! At least it looks right for me in preview, but lmk if that's just me

image

(just for context, sticking with all #1s in markdown and letting org handle the formatting was advice I received from devs in the past + it scales lists easier with additions)

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@ section: components

import '../components.css';

## Elements


<div class="ws-docs-content-img">
![Description list with annotation markers.](./img/description-list-elements.svg)
</div>
1. **Term:** The label for the list item.
1. **Description:** The descriptive value for a term.
1. **Contextual help (optional):** When clicked, will trigger a popover that offers more details or definition for a term. Marked by a dotted underline.
1. **Editable item (optional):** Using an [inline edit component](/components/inline-edit), allows users to edit the description linked to a term. For more guidance, refer to [term help text](#term-help-text).

## Usage

Use a description list when you have a set of terms and definitions related to a single item. The content within the definitions is not limited to only plain text. This component can be extremely useful in context of Detail pages for a certain resource or item.
Use a description list when you have a set of terms and definitions related to a single topic. Definitions can be plain text or links.

This is particularly useful in context of detail pages, for a certain resource or item:

<div class="ws-docs-content-img">
![Example of a description list.](./img/descriptionlist-usage.svg)
Expand All @@ -23,14 +36,14 @@ By default, the description list will be formatted so that the term stacks verti
</div>

### Horizontal
Description lists can also be horizontally formatted so that the term and description sit inline and the term comes before the description.
Description lists can also be formatted horizontally, so that the term and description sit inline, with the term placed before the description.

<div class="ws-docs-content-img">
![Example of a horizontal description list.](./img/descriptionlist-horizontal.svg)
</div>

### Using columns
Columns can be applied in both vertical and horizontal formats. By default, there will be 24px gutters within the column grid.
Columns can be applied in both vertical and horizontal formats. By default, there will be a 2xl spacer of gutters within the column grid.

<div class="ws-docs-content-img">
![Example of a default description list with two columns.](./img/descriptionlist-columns1.svg)
Expand All @@ -41,7 +54,7 @@ Columns can be applied in both vertical and horizontal formats. By default, ther
</div>

### Term help text
To provide help text about a term in the description list, you may add popovers indicated by a dotted underline on the label. This is recommended in detailed lists where you have many popovers and using a blue link or icon would clutter the page.
To provide help text about a term in the description list, you can add popovers indicated by a dotted underline on the label. This is recommended in detailed lists where you have many popovers and using a blue link or icon would clutter the page.

<div class="ws-docs-content-img">
![Example of a description list with help text.](./img/descriptionlist-helptext.svg)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.