Skip to content

Releases: nhsuk/nhsuk-prototype-kit

v5.2.0

13 Dec 15:46
d3cfbb2
Compare
Choose a tag to compare

This minor release moves the example page templates from /docs to /lib/example-templates, and moves the /middleware folder to /lib/middleware.

These changes will make future manual upgrades of the kit easier.

Service name

The kit is now set up to use the serviceName local variable, which is set in app/config.js, in the default templates.

  • Use serviceName local in start page template – #414 (thanks to @frankieroberto)
  • Use serviceName in header - #417
  • Update default service name to "Service name goes here" - #419

Maintenance

  • Import task list macro - #437 (thanks to @edwardhorsford)
  • Setup code style checks and tests - #404
  • Update default index page - #423
  • Change all references to 'NHS.UK prototype kit' - #425 (thanks to @vickytnz)
  • Add devcontainer.json for Codespaces and container use - #428 (thanks to @paulmsmith)
  • Add instructions if you run npm start - #411
  • Minor dependency updates

Full Changelog: v5.1.0...v5.2.0

v5.1.0

12 Nov 13:47
8589d1e
Compare
Choose a tag to compare

This minor release includes an update of NHS Frontend, and unbundles the guidance documentation.

📄 Guidance

There is now a separate website for the NHS.UK prototype kit which contains the installation guides, How-tos, and a new tutorial on building a basic prototype (thanks @vickytnz).

The guides are no longer bundled with the kit itself, so visit the website for the most up-to-date versions. Feedback is welcome.

The example templates are still included in the kit, with the exception of the Google search template which has been removed.

🔧 Maintenance

  • Updates NHS Frontend from 9.0.0 to 9.1.0 which adds a task list component - see version 9.1.0 release notes
  • Log errors when session data defaults crashes by @edwardhorsford in #402
  • Minor dependency updates: cookie-parser, express-session and eslint-plugin-import

Full Changelog: v5.0.0...v5.1.0

v5.0.0

15 Oct 15:11
ed14825
Compare
Choose a tag to compare

🆕 New features

  • Update to NHS.UK frontend v9.0.1 - see version 9.0.0 release notes for details on the breaking changes
  • Drop outerContent block and use beforeContent block for both breadcrumbs and back links

🔧 Fixes

  • Updates to dependencies

Breaking changes

This release contains breaking changes. You will most likely need to update your templates to accommodate these. You could look at this Prototype Kit PR that updated the kit itself to see what needs changing.

Updated back link and breadcrumbs (PR 1002)

The breadcrumbs component no longer contains its own <div class="nhsuk-width-container"> container.

Instead, you should move it inside the existing <div class="nhsuk-width-container"> container for your overall page, but before the <main> tag.

This means that instead of this:

<nav class="nhsuk-breadcrumb" aria-label="Breadcrumb">
  <div class="nhsuk-width-container">
    <ol class="nhsuk-breadcrumb__list">
      <li class="nhsuk-breadcrumb__item"><a class="nhsuk-breadcrumb__link" href="#">Home</a></li>
    </ol>
  </div>
</nav>
<div class="nhsuk-width-container">
  <main class="nhsuk-main-wrapper" id="maincontent" role="main">
    ...
  </main>
</div>

You should have this:

<div class="nhsuk-width-container">
  <nav class="nhsuk-breadcrumb" aria-label="Breadcrumb">
    <ol class="nhsuk-breadcrumb__list">
      <li class="nhsuk-breadcrumb__item"><a class="nhsuk-breadcrumb__link" href="#">Home</a></li>
    </ol>
  </nav>
  <main class="nhsuk-main-wrapper" id="maincontent" role="main">
    ...
  </main>
</div>

The back link should also be placed within the <div class="nhsuk-width-container"> container but before the <main> tag. Previous guidance suggested placing at the bottom of the page, but this has been updated to recommend placing it at the top.

The back link now contains some default margin above it, so you can remove any override classes you added previously, such as nhsuk-u-margin-top-4. However you can still include override classes if you want more or less spacing than the default.

Replaced font size class nhsuk-u-font-size-32 with nhsuk-u-font-size-36, based on the new type scale (PR 989)

If you use this font size modifier class, you'll need to update it.

This means that instead of this:

<p class="nhsuk-u-font-size-32">

You should have this:

<p class="nhsuk-u-font-size-36">

Updated default name attributes for Date input component (PR 994)

The default name attributes for the date input elements now use square brackets around the date part. For example: dob[day], dob[month], dob[year]. Previously they used hyphens (dob-day, dob-month, dob-year).

The square brackets mean that the date parts will be saved as an object when using the NHS prototype kit, like this:

{
  "dob": {
    "day": "13",
    "month": "12",
    "year": "1984"
  }
}

This means you can access the data in Nunjucks like this:

Your year of birth is {{ data.dob.year }}.

You can also now pass the object to the values key of the date input to set the values for the 3 inputs:

{{ dateInput({
  namePrefix: "dob",
  fieldset: {
    legend: {
      text: "What is your date of birth?"
    }
  },
  values: data.dob
}) }}

You can override this new default by setting the name attribute on the individual date parts within items:

{{ dateInput({
  fieldset: {
    legend: {
      text: "What is your date of birth?"
    }
  },
  items: [
    {
      name: "dob-day",
      label: "Day",
      classes: "nhsuk-input--width-2"
    },
    {
      name: "dob-month",
      label: "Month",
      classes: "nhsuk-input--width-2"
    },
    {
      name: "dob-year",
      label: "Year",
      classes: "nhsuk-input--width-4"
    }
  ]
}) }}

v4.12.0

15 Aug 09:35
b365b98
Compare
Choose a tag to compare

4.12.0 - 15 August 2024

🔧

  • Enable console logging for nodemon
  • Replace basic auth with a custom authentication process
  • Update NHS.UK frontend to v8.3.0

v4.11.0

27 Jun 08:11
5d3f569
Compare
Choose a tag to compare

4.11.0 - 27 June 2024

🔧 Fixes

  • Disable nunjucks caching so changes to templates show immediately
  • Stop watching .html and .scss files and restarting the server whenever they are changed
  • Ignore eslint warnings

✏️ Content

  • Update README with start script
  • Fix a typo in setup docs
  • Update NHS website page template to be closer to live
  • Remove Covid banner from 'Health A-Z', 'Live Well', 'Mental Health' and 'Pregnancy' templates

v4.10.0

22 Feb 12:19
f029232
Compare
Choose a tag to compare

4.10.0 - 22 February 2024

🔧 Fixes

  • Add aria-labels to coronavirus hub page and mental health page navigation links
  • Removed the duplicate selector in '_related-nav.scss'
  • Removed Covid banner from 'Social care and support guide' and 'NHS Services' templates
  • Use 'String#startsWith' method instead of getting the index of a substring in utils.js
  • Change unexpected var for const in gulpfile.js
  • Update 'Social care and support guide' template to use primary cards with chevrons
  • Upgrade node version to v20
  • Update NHS.UK frontend to v8.1.0, includes updates to header and footer components

v4.9.0

01 Jun 08:49
2028ab0
Compare
Choose a tag to compare

4.9.0 - 1 June 2023

✏️ Content

  • Fix styling on confirmation page
  • Add character count and tab components
  • Update guidance on setting a password in 'Publish your prototype online'
  • Change references to NHS Digital to NHS England
  • Enhance deployment instructions and test note in README
  • Fix link in README

🔧 Maintenance

  • Install NHS.UK frontend v7.0.0

v4.8.6

23 Jan 15:57
Compare
Choose a tag to compare

4.8.6 - 24 January 2023

✏️ Content

  • Add new 'Publish your prototype online' guidance
  • Replace Atom with Visual Studio Code on HTML text editor page

🔧 Maintenance

  • Install NHS.UK frontend v6.2.0

v4.8.5

12 Dec 15:51
Compare
Choose a tag to compare

4.8.5 - 12 December 2022

🔧 Fixes

  • Update package dependencies decode-uri-component and engine.io.

✏️ Content

  • Added deployment instructions and test note to readme.

v4.8.4

12 Oct 10:39
Compare
Choose a tag to compare

4.8.4 - 12 October 2022

✏️ Content

  • Fixed typo in readme