Skip to content

Commit

Permalink
document extended grid
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave House committed Jan 14, 2019
1 parent 1a20518 commit 827270c
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/patterns/check-answers/default/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ layout: layout-example-full-page.njk
text: "Licence period"
},
value: {
html: '<p class="govuk-body">This is a longer paragraph of text provided by the user to provide additional information.</p><p class="govuk-body">This is a second paragraph of text provided by the user.</p>'
text: "Valid for 6 months"
},
actions: {
items: [
Expand All @@ -184,7 +184,7 @@ layout: layout-example-full-page.njk
<input type="hidden" name="answers-checked" value="true">

{{ govukButton({
text: "Accept and send application"
text: "Accept and send"
}) }}

</form>
Expand Down
14 changes: 7 additions & 7 deletions src/patterns/check-answers/index.md.njk
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Let users check their answers before submitting information to a service.

## When to use this pattern

Show a single Check answers page immediately before the confirmation screen for small to medium-sized transactions.
Show a single check answers page immediately before the confirmation screen for small to medium-sized transactions.

When designing a very large transaction with multiple sections, it may help to include a Check answers pages at the end of each section.
When designing a very large transaction with multiple sections, it may help to include a check answers pages at the end of each section.

This can be valuable for services where different users might be completing each section. You should test this approach with your users to find out if it’s helpful.

Expand All @@ -30,7 +30,7 @@ Check answers pages help to:

### Make the page easy to understand

On your Check answers page you should:
On your check answers page you should:

- make it clear there’s a task to perform on the page
- make it clear that the transaction will not be complete until a user confirms their information is correct
Expand All @@ -41,14 +41,14 @@ On your Check answers page you should:

### Let users go back and change their answers

You should provide a ‘Change’ link next to each section on your Check answers page so that users can add or change the information.
You should provide a ‘Change’ link next to each section on your check answers page so that users can add or change the information.

The answers pages should look the same way they did when the user last used them, with all their answers pre-populated.

When they’ve finished, the ‘Continue’ button should return them to the Check answers page. They should not need to go through the rest of the transaction again.
When they’ve finished, the ‘Continue’ button should return them to the check answers page. They should not need to go through the rest of the transaction again.

If a user changes their response in a way that means you need to ask them more questions, do this before returning them to the Check answers page.
If a user changes their response in a way that means you need to ask them more questions, do this before returning them to the check answers page.

## Research on this pattern

Read a blog about [how the Carer’s Allowance Service used Check answers to improve its users’ experience](https://dwpdigital.blog.gov.uk/2016/07/08/a-live-service-is-not-the-end-of-the-story/).
Read a blog about [how the Carer’s Allowance Service used check answers to improve its users’ experience](https://dwpdigital.blog.gov.uk/2016/07/08/a-live-service-is-not-the-end-of-the-story/).
2 changes: 1 addition & 1 deletion src/styles/layout/combinations/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ layout: layout-example.njk
ignore_in_sitemap: true
stylesheets:
- ../grid-annotate.css
- grid-combinations-annotate.css
- ../grid-combinations-annotate.css
---

<div class="govuk-grid-row">
Expand Down
17 changes: 17 additions & 0 deletions src/styles/layout/desktop/index.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Desktop grid classes – Layout
layout: layout-example.njk
ignore_in_sitemap: true
stylesheets:
- ../grid-annotate.css
- ../grid-combinations-annotate.css
---

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop">
<p>govuk-grid-column-two-thirds-from-desktop</p>
</div>
<div class="govuk-grid-column-one-third-from-desktop">
<p>govuk-grid-column-one-third-from-desktop</p>
</div>
</div>
10 changes: 10 additions & 0 deletions src/styles/layout/index.md.njk
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ The available widths are:

{{ example({group: "styles", item: "layout", example: "combinations", html: true, open: true, size: "xl"}) }}

### Desktop specific grid classes

To specify a width at the desktop breakpoint you can use the desktop specific grid classes. For example `govuk-grid-column-two-thirds-from-desktop` will set your column width to be two-thirds width at the desktop breakpoint only.

{{ example({group: "styles", item: "layout", example: "desktop", html: true, open: true, size: "m"}) }}

The desktop specific classes also allow you to set the width of the tablet breakpoint by using them in combination with the standard grid classes. For example using `govuk-grid-column-one-half` and `govuk-grid-column-two-thirds-from-desktop` together will mean the column will be one-half at the tablet breakpoint and two-thirds width at desktop.

{{ example({group: "styles", item: "layout", example: "tablet-desktop", html: true, open: true, size: "m"}) }}

### Nested grids

{{ example({group: "styles", item: "layout", example: "nested", html: true, open: true, size: "m"}) }}
16 changes: 16 additions & 0 deletions src/styles/layout/tablet-desktop/index.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Desktop and tablet grid classes – Layout
layout: layout-example.njk
ignore_in_sitemap: true
stylesheets:
- ../grid-annotate.css
---

<div class="govuk-grid-row">
<div class="govuk-grid-column-one-half govuk-grid-column-two-thirds-from-desktop">
<p>govuk-grid-column-one-half<br><br>govuk-grid-column-two-thirds-from-desktop</p>
</div>
<div class="govuk-grid-column-one-half govuk-grid-column-one-third-from-desktop">
<p>govuk-grid-column-one-half<br><br>govuk-grid-column-one-third-from-desktop</p>
</div>
</div>

0 comments on commit 827270c

Please sign in to comment.