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

Update components' tables of arguments #769

Merged
merged 26 commits into from
Jun 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2aeec07
Update back-link component's table of arguments
Jun 6, 2018
3f0fcf8
Update breadcrumbs component's table of arguments
Jun 6, 2018
b3229f9
Update button component's table of arguments
Jun 6, 2018
41845d2
Update checkboxes component's table of arguments
Jun 6, 2018
9c6ccf4
Update details component's table of arguments
Jun 6, 2018
ffc023d
Update error-message component's table of arguments
Jun 7, 2018
0361990
Update fieldeset component's table or arguments
Jun 7, 2018
135eb36
Update footer component's table of arguments
Jun 8, 2018
139d47c
Update warning-text component's table of arguments
Jun 8, 2018
e010663
Update textarea component's table of arguments
Jun 8, 2018
d274ed3
Update tag component's table of arguments
Jun 8, 2018
72b4595
Update skip-link component's table of arguments
Jun 8, 2018
1021a9c
Update select component's table of arguments
Jun 11, 2018
e494fb8
Update phase-banner component's table of arguments
Jun 11, 2018
3c5a2b6
Update panel component's table of contents
Jun 11, 2018
9724914
Update inset text table of contents
Jun 11, 2018
f4bb24c
Update hint component's table of arguments
Jun 11, 2018
9cc2398
Update label component's table of contents
Jun 11, 2018
e05eea4
Update input component's table of arguments
Jun 11, 2018
6a90aa4
Update table component's table of arguments
Jun 11, 2018
50d95e2
Update file-upload component's table of arguments
Jun 12, 2018
344bf0f
Update error-summary component's table of arguments
Jun 12, 2018
f3e8920
Update radios component's table of contents
Jun 12, 2018
a065b91
Update date-input component's table of arguments
Jun 12, 2018
deb17e7
Update header component's table of arguments
Jun 12, 2018
6d2fc39
Document in changelog
Jun 12, 2018
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ Note: We're not following semantic versioning yet, we are going to talk about th
- Use the correct class name in bold label example
(govuk-label--s rather than govuk-label--bold)
([PR #784](https://github.com/alphagov/govuk-frontend/pull/784))

- Update table of arguments for each component to ensure they're accurate.
([PR #769](https://github.com/alphagov/govuk-frontend/pull/769))


🆕 New features:
Expand Down
28 changes: 8 additions & 20 deletions src/components/back-link/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,49 +69,37 @@ If you are using Nunjucks,then macros take the following arguments

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">classes</th>
<th class="govuk-table__header" scope="row">text (or) html</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">No</td>
<td class="govuk-table__cell ">Yes</td>

<td class="govuk-table__cell ">Optional additional classes for the back-link component.</td>
<td class="govuk-table__cell ">Text or HTML to use within the back link component. If `html` is provided, the `text` argument will be ignored.</td>

</tr>

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">text</th>
<th class="govuk-table__header" scope="row">href</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">No</td>
<td class="govuk-table__cell ">Yes</td>

<td class="govuk-table__cell ">Text to use within the back link component.</td>
<td class="govuk-table__cell ">The value of the link href attribute</td>

</tr>

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">html</th>
<th class="govuk-table__header" scope="row">classes</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">No</td>

<td class="govuk-table__cell ">HTML to use within the back link. If this is provided, the text argument will be ignored.</td>

</tr>

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">href</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">Yes</td>

<td class="govuk-table__cell ">The value of the link href attribute</td>
<td class="govuk-table__cell ">Optional additional classes to add to the anchor tag.</td>

</tr>

Expand Down
30 changes: 8 additions & 22 deletions src/components/back-link/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,35 @@ Link back component, to go back a page.
'rows' : [
[
{
text: 'classes'
text: 'text (or) html'
},
{
text: 'string'
},
{
text:'No'
text:'Yes'
},
{
text: 'Optional additional classes for the back-link component.'
text: 'Text or HTML to use within the back link component. If `html` is provided, the `text` argument will be ignored.'
}
],
[
{
text: 'text'
text: 'href'
},
{
text: 'string'
},
{
text:'No'
text:'Yes'
},
{
text: 'Text to use within the back link component.'
text: 'The value of the link href attribute'
}
],
[
{
text: 'html'
text: 'classes'
},
{
text: 'string'
Expand All @@ -76,21 +76,7 @@ Link back component, to go back a page.
text:'No'
},
{
text: 'HTML to use within the back link. If this is provided, the text argument will be ignored.'
}
],
[
{
text: 'href'
},
{
text: 'string'
},
{
text:'Yes'
},
{
text: 'The value of the link href attribute'
text: 'Optional additional classes to add to the anchor tag.'
}
],
[
Expand Down
32 changes: 10 additions & 22 deletions src/components/breadcrumbs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,61 +250,49 @@ If you are using Nunjucks,then macros take the following arguments

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">classes</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">No</td>

<td class="govuk-table__cell ">Optional additional classes</td>

</tr>

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">items</th>

<td class="govuk-table__cell ">array</td>

<td class="govuk-table__cell ">Yes</td>

<td class="govuk-table__cell ">Array of breadcrumbs items</td>
<td class="govuk-table__cell ">Array of breadcrumbs item objects.</td>

</tr>

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">text</th>
<th class="govuk-table__header" scope="row">items.{}.text (or) items.{}.html</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">No</td>
<td class="govuk-table__cell ">Yes</td>

<td class="govuk-table__cell ">Text to use within the breadcrumbs item</td>
<td class="govuk-table__cell ">Text or HTML to use within the breadcrumbs item. If `html` is provided, the `text` argument will be ignored.</td>

</tr>

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">html</th>
<th class="govuk-table__header" scope="row">items.{}.href</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">No</td>
<td class="govuk-table__cell ">no</td>

<td class="govuk-table__cell ">HTML to use within the breadcrumbs item. If this is provided, the text argument will be ignored.</td>
<td class="govuk-table__cell ">Link for the breadcrumbs item. If not specified, breadcrumbs item is a normal list item</td>

</tr>

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">href</th>
<th class="govuk-table__header" scope="row">classes</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">no</td>
<td class="govuk-table__cell ">No</td>

<td class="govuk-table__cell ">Link for the breadcrumbs item. If not specified, breadcrumbs item is a normal list item</td>
<td class="govuk-table__cell ">Optional additional classes to add to the breadcrumbs container.</td>

</tr>

Expand Down
34 changes: 10 additions & 24 deletions src/components/breadcrumbs/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,6 @@ The Breadcrumbs component helps users to understand where they are within a webs
}
],
'rows': [
[
{
text: 'classes'
},
{
text: 'string'
},
{
text: 'No'
},
{
text: 'Optional additional classes'
}
],
[
{
text: 'items'
Expand All @@ -60,49 +46,49 @@ The Breadcrumbs component helps users to understand where they are within a webs
text: 'Yes'
},
{
text: 'Array of breadcrumbs items'
text: 'Array of breadcrumbs item objects.'
}
],
[
{
text: 'text'
text: 'items.{}.text (or) items.{}.html'
},
{
text: 'string'
},
{
text: 'No'
text:'Yes'
},
{
text: 'Text to use within the breadcrumbs item'
text: 'Text or HTML to use within the breadcrumbs item. If `html` is provided, the `text` argument will be ignored.'
}
],
[
{
text: 'html'
text: 'items.{}.href'
},
{
text: 'string'
},
{
text: 'No'
text: 'no'
},
{
text: 'HTML to use within the breadcrumbs item. If this is provided, the text argument will be ignored.'
text: 'Link for the breadcrumbs item. If not specified, breadcrumbs item is a normal list item'
}
],
[
{
text: 'href'
text: 'classes'
},
{
text: 'string'
},
{
text: 'no'
text: 'No'
},
{
text: 'Link for the breadcrumbs item. If not specified, breadcrumbs item is a normal list item'
text: 'Optional additional classes to add to the breadcrumbs container.'
}
],
[
Expand Down
20 changes: 4 additions & 16 deletions src/components/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,33 +190,21 @@ If you are using Nunjucks,then macros take the following arguments

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">Yes</td>
<td class="govuk-table__cell ">No</td>

<td class="govuk-table__cell ">Whether to use an `input`, `button` or `a` element to create the button. In most cases you will not need to set this as it will be configured automatically if you use `href` or `html`.</td>

</tr>

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">text</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">Yes</td>

<td class="govuk-table__cell ">Text for the button</td>

</tr>

<tr class="govuk-table__row">

<th class="govuk-table__header" scope="row">html</th>
<th class="govuk-table__header" scope="row">text (or) html</th>

<td class="govuk-table__cell ">string</td>

<td class="govuk-table__cell ">Yes</td>

<td class="govuk-table__cell ">HTML for the button or link. If this is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`.</td>
<td class="govuk-table__cell ">Text or HTML for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`.</td>

</tr>

Expand Down Expand Up @@ -300,7 +288,7 @@ If you are using Nunjucks,then macros take the following arguments

<td class="govuk-table__cell ">No</td>

<td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the error message span tag</td>
<td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the button component.</td>

</tr>

Expand Down
24 changes: 5 additions & 19 deletions src/components/button/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -51,38 +51,24 @@ Buttons are configured to perform an action and they can have a different look.
text: 'string'
},
{
text: 'Yes'
text: 'No'
},
{
text: 'Whether to use an `input`, `button` or `a` element to create the button. In most cases you will not need to set this as it will be configured automatically if you use `href` or `html`.'
}
],
[
{
text: 'text'
text: 'text (or) html'
},
{
text: 'string'
},
{
text: 'Yes'
},
{
text: 'Text for the button'
}
],
[
{
text: 'html'
},
{
text: 'string'
},
{
text: 'Yes'
text:'Yes'
},
{
text: 'HTML for the button or link. If this is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`.'
text: 'Text or HTML for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`.'
}
],
[
Expand Down Expand Up @@ -180,7 +166,7 @@ Buttons are configured to perform an action and they can have a different look.
text: 'No'
},
{
text: 'Any extra HTML attributes (for example data attributes) to add to the error message span tag'
text: 'Any extra HTML attributes (for example data attributes) to add to the button component.'
}
]
]
Expand Down
Loading