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

Test that documented component options match the templates #1139

Open
36degrees opened this issue Jan 16, 2019 · 1 comment
Open

Test that documented component options match the templates #1139

36degrees opened this issue Jan 16, 2019 · 1 comment
Labels
feature request User requests a new feature nunjucks

Comments

@36degrees
Copy link
Contributor

What

Add tests that validate the documented options within our component YAML files (like the button YAML file) match the actual options used within the template / macro.

If the two do not match, the tests should fail.

There is as a 'work-in-progress' branch for this work which currently does this, but needs some refactoring / documentation before it can be merged.

Why

Currently we rely on human review to ensure that the documented options match reality. During a recent firebreak project, we explored whether we could do anything to catch these in our CI process.

The work found a number of inaccuracies in the documentation options:

  • attributes not documented on the breadcrumbs and select components
  • describedBy mistakenly documented on textarea and character count components
  • footer component YAML misformed using arguments instead of params, which means the meta object is not documented correctly in the Design System
  • items[].name mistakenly documented on radios – unlike checkboxes, this can only be set globally as having a set of radios with different names doesn't make any sense
  • title not documented on the tabs component

This highlights the need to automate these checks, so we can make sure our documentation is correct.

@kellylee-gds kellylee-gds changed the title Test that documented component options match the templates [TIMEBOX: 1 day] [PAIR] Test that documented component options match the templates Jan 30, 2019
@timpaul timpaul added Effort: days feature request User requests a new feature labels May 20, 2019
@36degrees 36degrees changed the title [TIMEBOX: 1 day] [PAIR] Test that documented component options match the templates Test that documented component options match the templates May 20, 2019
@colinrotherham colinrotherham self-assigned this Jun 12, 2023
@colinrotherham colinrotherham moved this from Backlog 🗄 to Sprint Backlog 🏃🏼‍♀️ in GOV.UK Design System cycle board Jun 12, 2023
@colinrotherham colinrotherham moved this from Sprint Backlog 🏃🏼‍♀️ to In progress 📝 in GOV.UK Design System cycle board Jun 27, 2023
@colinrotherham
Copy link
Contributor

colinrotherham commented Aug 24, 2023

Whilst not fully related, we've started seeing failures on our Design System v5 preview:
https://github.com/alphagov/govuk-design-system/actions/runs/5956674573/job/16157972971

Design System HTML generates duplicate slugs for nested option with the same name

E.g. Macro options for Summary list rows[].actions and card.actions are shared

@romaricpascal romaricpascal moved this from In progress 📝 to Backlog 🗄 in GOV.UK Design System cycle board Nov 2, 2023
@colinrotherham colinrotherham removed their assignment Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request User requests a new feature nunjucks
Projects
None yet
Development

No branches or pull requests

5 participants