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

Read component data from built fixtures.json #4042

Merged
merged 4 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ params:

examples:
- name: default
data:
options:
Copy link
Member

Choose a reason for hiding this comment

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

Makes sense given we talk of macro "options" all around 🙌🏻

id: default-example
items:
- heading:
Expand All @@ -110,7 +110,7 @@ examples:
</ul>

- name: with additional descriptions
data:
options:
id: with-descriptions
items:
- heading:
Expand All @@ -136,7 +136,7 @@ examples:
</ul>

- name: with long content and description
data:
options:
id: with-long-content-and-description
items:
- heading:
Expand All @@ -159,7 +159,7 @@ examples:
</ul>

- name: with one section open
data:
options:
id: one-section-open-example
items:
- heading:
Expand All @@ -179,7 +179,7 @@ examples:
</ul>

- name: with all sections already open
data:
options:
id: all-sections-open-example
items:
- heading:
Expand All @@ -200,7 +200,7 @@ examples:
</ul>

- name: with focusable elements inside
data:
options:
id: with-focusable-elements
items:
- heading:
Expand All @@ -213,7 +213,7 @@ examples:
html: <a class="govuk-link" href="#">Link B</a>

- name: with translations
data:
options:
id: with-translations
hideAllSectionsText: Collapse all sections
showAllSectionsText: Expand all sections
Expand All @@ -237,7 +237,7 @@ examples:
# Hidden examples are not shown in the review app, but are used for tests and HTML fixtures
- name: classes
hidden: true
data:
options:
id: accordion-classes
classes: myClass
items:
Expand All @@ -247,7 +247,7 @@ examples:
text: Some content
- name: attributes
hidden: true
data:
options:
id: accordion-attributes
attributes:
data-attribute: value
Expand All @@ -258,7 +258,7 @@ examples:
text: Some content
- name: custom heading level
hidden: true
data:
options:
id: accordion-heading
headingLevel: 3
items:
Expand All @@ -268,7 +268,7 @@ examples:
text: Some content
- name: heading html
hidden: true
data:
options:
id: accordion-heading-html
items:
- heading:
Expand All @@ -277,7 +277,7 @@ examples:
text: Some content
- name: with falsey values
hidden: true
data:
options:
id: accordion-falsey
items:
- heading:
Expand All @@ -293,7 +293,7 @@ examples:
text: Some content
- name: with remember expanded off
hidden: true
data:
options:
id: accordion-remember-expanded-off
rememberExpanded: false
items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,38 @@ params:

examples:
- name: default
data:
options:
href: '#'
- name: with custom text
data:
options:
href: '#'
text: Back to home
- name: inverse
previewLayoutModifiers:
- inverse
data:
options:
classes: govuk-back-link--inverse
href: '#'

# Hidden examples are not shown in the review app, but are used for tests and HTML fixtures
- name: classes
hidden: true
data:
options:
classes: app-back-link--custom-class
href: '#'
- name: html as text
hidden: true
data:
options:
text: <b>Home</b>
href: '#'
- name: html
hidden: true
data:
options:
html: <b>Back</b>
href: '#'
- name: attributes
hidden: true
data:
options:
href: '#'
html: <b>Back to home</b>
attributes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ params:

examples:
- name: default
data:
options:
items:
- text: Section
href: '/section'
- text: Sub-section
href: '/section/sub-section'
- name: with one level
data:
options:
items:
- text: Section
href: '/section'
- name: with multiple levels
data:
options:
items:
- text: Home
href: '/'
Expand All @@ -58,22 +58,22 @@ examples:
- text: Sub Sub-section
href: '/section/sub-section/sub-sub-section'
- name: without the home section
data:
options:
items:
- text: Service Manual
href: '/service-manual'
- text: Agile Delivery
href: '/service-manual/agile-delivery'
- name: with last breadcrumb as current page
data:
options:
items:
- text: Home
href: '/'
- text: Passports, travel and living abroad
href: '/browse/abroad'
- text: Travel abroad
- name: with collapse on mobile
data:
options:
collapseOnMobile: true
items:
- text: Home
Expand All @@ -86,7 +86,7 @@ examples:
description: Breadcrumbs that appear on dark backgrounds
previewLayoutModifiers:
- inverse
data:
options:
classes: govuk-breadcrumbs--inverse
items:
- text: Home
Expand All @@ -98,21 +98,21 @@ examples:
# Hidden examples are not shown in the review app, but are used for tests and HTML fixtures
- name: classes
hidden: true
data:
options:
classes: app-breadcrumbs--custom-modifier
items:
- text: Home
- name: attributes
hidden: true
data:
options:
attributes:
id: my-navigation
role: navigation
items:
- text: Home
- name: item attributes
hidden: true
data:
options:
items:
- text: Section 1
href: /section
Expand All @@ -121,12 +121,12 @@ examples:
data-attribute-2: my-attribute-2
- name: html as text
hidden: true
data:
options:
items:
- text: <span>Section 1</span>
- name: html
hidden: true
data:
options:
items:
- html: <em>Section 1</em>
- html: <em>Section 2</em>
Expand Down
Loading