nhsuk-frontend icon indicating copy to clipboard operation
nhsuk-frontend copied to clipboard

Do not quote nunjucks params in examples

Open fofr opened this issue 2 years ago • 1 comments

Nunjucks are unnecessarily quoted in the design system examples:

Screenshot 2023-02-09 at 08 04 07

This should be written as:

{{ errorSummary({
  titleText: "There is a problem",
  descriptionText: "Describe the errors and how to correct them",
  errorList: [
    {
      text: "Date of birth must be in the past",
      href: "#example-error-1"
    }
  ]
}) }}

This would be inline with the GOV.UK design system documentation: Screenshot 2023-02-09 at 08 04 00

I'm happy to raise a PR for this if we're happy to make this change.

fofr avatar Feb 09 '23 08:02 fofr

I don't mind too much either way, so I'd be happy enough for these to be unquoted personally. I see govuk did it here, and consistency with them is good:

https://github.com/alphagov/govuk-design-system/commit/73d7abc7562c50e2b456506274ca982fbfcf356f

If you wanted to open a PR, please branch off #831 (alpha-v7) and raise a pull request against that branch. That branch has introduced Prettier, so I'd rather we didn't make any widespread formatting changes to the main branch at the moment to avoid merge conflicts. Thanks!

andymantell avatar Feb 09 '23 08:02 andymantell