Skip to content
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

docs: apply tabbed view to components #1038

Merged
merged 2 commits into from
Dec 20, 2024
Merged
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
20 changes: 19 additions & 1 deletion docs/components/button-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ eleventyNavigation:

<span class="govuk-caption-xl">The button menu is a versatile component that allows users to view tasks as buttons in a collapsible menu.</span>

{% example "/examples/button-menu", 250 %}

{% tabs "Contents" %}

{% tab "Overview" %}

{% example "/examples/button-menu", 250 %}

## Overview

Expand Down Expand Up @@ -55,6 +59,10 @@ There’s also the:
- [summary list component on the GOV.UK Design System](https://design-system.service.gov.uk/components/summary-list/)
- [identity bar component](/components/identity-bar/)

{% endtab %}

{% tab "How to use" %}

## How to use

### Position on the page
Expand Down Expand Up @@ -119,6 +127,10 @@ Users may believe that menu buttons with the same title (particularly generic ti

Content can run into a second line.

{% endtab %}

{% tab "Examples" %}

## Examples

### Within a case management system
Expand All @@ -132,3 +144,9 @@ The location of the buttons helps users to know what the tasks relate to.
Adding a button menu to the multi select component helps users complete common tasks quickly, for example assigning cases.

<p><img src="{{ 'assets/images/button-menu-multi-select-example-2024.png' | rev | url }}" alt="An example of a button menu and GOV.UK default button on a Ministry of Justice webpage. The grey button menu is to the right of the green button. This is next to the H2 title 'Case management'. Both are below the H1 title 'Case management'. The title of the green button is 'Record review' and the button menu is 'Print options', which contains: Print case, Print review, Print investigation and Print referral."></p>

{% endtab %}

{% endtabs %}

<hr />
18 changes: 18 additions & 0 deletions docs/components/date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ eleventyNavigation:

<span class="govuk-caption-xl">The date picker component enables users to select a date from a calendar. </span>

{% tabs "Contents" %}

{% tab "Overview" %}

{% example "/examples/date-picker", 590 %}

## Overview
Expand Down Expand Up @@ -43,6 +47,10 @@ Date pickers are fully navigable using a keyboard, but can be slow for keyboard-

There's also the ['Ask users for dates' pattern in the GOV.UK Design System](https://design-system.service.gov.uk/patterns/dates/).

{% endtab %}

{% tab "How to use" %}

## How to use

### Hint text
Expand Down Expand Up @@ -105,6 +113,10 @@ Follow the [GOV.UK Design System guidance on error messages](https://design-syst

If you're using more than one date picker, give each text field its own error summary and message (even if the error is the same).

{% endtab %}

{% tab "Examples" %}

## Examples

### Filtering information with a date picker
Expand All @@ -114,3 +126,9 @@ If you're using more than one date picker, give each text field its own error su
### Asking a question with a date picker

<p><img src="{{ 'assets/images/date-picker-question-example-2024.png' | rev | url }}" alt="A screenshot with the title 'What date do you want to view appointments for?' Underneath is the title 'Date' and then a text input field with the calendar icon. Underneath that is a green 'Continue' button."></p>

{% endtab %}

{% endtabs %}

<hr />
14 changes: 14 additions & 0 deletions docs/components/interruption-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ eleventyNavigation:

<span class="govuk-caption-xl">The interruption card component pauses a user’s journey with important information.</span>

{% tabs "Contents" %}

{% tab "Overview" %}

{% example "/examples/interruption-card", 590 %}

## Overview
Expand Down Expand Up @@ -113,6 +117,10 @@ There’s also the:
- [GOV.UK Design System panel](https://design-system.service.gov.uk/components/panel/)
- [GOV.UK Design System notification banner](https://design-system.service.gov.uk/components/notification-banner/)

{% endtab %}

{% tab "How to use" %}

## How to use

### What to add to it
Expand Down Expand Up @@ -170,3 +178,9 @@ If a lot of interruption cards are emerging in a service, it might be a sign tha
Users completing the same journey multiple times in a service will become overexposed to a particular interruption card. This could be a poor user experience if the card is used to highlight something important and the user has already seen it several times.

Consider limiting the amount of times a particular interruption card is shown to users at the same stage of the journey.

{% endtab %}

{% endtabs %}

<hr />
Loading