Skip to content

Latest commit

 

History

History
1612 lines (970 loc) · 71.1 KB

CHANGELOG.md

File metadata and controls

1612 lines (970 loc) · 71.1 KB

Changelog

Unreleased

13.16.2

Fixes

13.16.1

Fixes

13.16.0

New features

13.15.3

Fixes

13.15.2

Fixes

13.15.1

Fixes

13.15.0

New features

13.14.1

Fixes

13.14.0

New features

13.13.6

Fixes

13.13.5

Fixes

13.13.4

Fixes

13.13.3

Fixes

13.13.2

Fixes

13.13.1

Fixes

13.13.0

New features

13.12.2

Fixes

13.12.1

Fixes

13.12.0

New features

Fixes

13.11.0

New features

13.10.1

Fixes

13.10.0

New features

13.9.1

Fixes

13.9.0

New features

  • #2206: plugin validator tool - We've created a tool to help test plugins for the Prototype Kit. It's only for internal use at the moment, but we're planning to make it public soon.

13.8.1

Fixes

13.8.0

New features

Fixes

13.7.1

Fixes

13.7.0

New features

Fixes

13.6.2

Fixes

13.6.1

Fixes

13.6.0

New features

Fixes

13.5.0

New features

Fixes

13.4.0

New features

Fixes

13.3.0

New features

13.2.4

Fixes

13.2.3

Fixes

13.2.2

Fixes

13.2.1

Fixes

13.2.0

New features

Fixes

13.1.0

New features

Fixes

13.0.1

Fixes

13.0.0

In this release we’ve made some significant changes to how the GOV.UK Prototype Kit works.

These changes make the kit:

  • more secure
  • easier to use
  • easier to update in the future

If you have an existing prototype and want to make the changes in this release, we recommend using the migration script to help with any breaking changes.

Migrate an existing prototype to version 13

If you need help with the Prototype Kit, contact the GOV.UK Prototype team.

Breaking changes

The Prototype Kit is now an npm package

The 2 biggest breaking changes to the Prototype Kit are you can now create a prototype:

  • without downloading a zip file
  • by using an npm command in the terminal

To run the kit, use npm run dev (not npm start).

  • #1638: Make serve default command

To make the kit easier to update in the future, we have moved essential Prototype Kit files out of the users prototype folder and into the npm package.

  • #1617: Making most files optional

This is alongside other work we've been doing that allows users to delete files they're not using.

Using Node.js

The Prototype Kit no longer supports versions 12 or 14 of Node.js. We recommend you update to the latest LTS version Node.js 18

  • #1753: Drop support for Node.js 12 and 14

Creating routes, filters, templates and layouts

How you create routes, filters and templates has changed. There is also a new approach to layouts.

Create routes

Create pages from templates

How to use layouts

Default user template

The default user template for a new prototype has moved to app/views/layouts/main.html.

  • #1752

To help make these changes to an existing prototype, we have a migration script

How to migrate an existing prototype to version 13

Other breaking changes

You can no longer use the Prototype Kit with Internet Explorer 8

  • #1394: Remove Internet Explorer 8 support

The Prototype Kit no longer includes the step by step pattern by default

  • #1471: Update step by step and install it as an extension

The Prototype Kit no longer includes jQuery by default

  • #1478: Remove jQuery from default installation

You can no longer use v6 compatibility mode

  • #1432: Remove v6 backwards compatibility support

New features

Manage your Prototype

There is a new Manage your Prototype page in the kit. From this page you can:

  • add and change your service name

  • create new pages using templates

  • find and install plugins that work with the Prototype Kit

  • #1589: Create management pages

GOV.UK Frontend

When creating a new prototype, you will always have the latest version of GOV.UK Frontend.

The latest version of GOV.UK Frontend is version 4.4.0.

Read the release notes

Other changes

  • Guidance and documentation for the Prototype Kit is now at prototype-kit.service.gov.uk

  • There are 2 sets of guidance to support users:

    • Using version 13: prototype-kit.service.gov.uk/docs/
    • Using version 12 or before: prototype-kit.service.gov.uk/v12/docs/
  • You can no longer see the docs folder in your prototype

    • #866: Remove docs from the Prototype Kit

If you need help with the Prototype Kit, contact the GOV.UK Prototype team.

Pull requests

Breaking changes

New Features

Fixes

Other changes

12.3.0

New feature

Support for Node 18

The GOV.UK Prototype Kit now supports Node 18 LTS (long term support).

How to update to the latest version

This change was added in #1700: Allow Node 18 to be used.

12.2.0

This release updates the step by step pattern and ensures the GOV.UK Prototype Kit reflects the latest release of the GOV.UK Frontend, v4.3.1.

Breaking change

Update the step by step pattern

The step by step navigation pattern presents an end to end journey in logical steps, with links to content that helps users complete each step.

The changes to step by step bring the pattern in line with what is currently used on GOV.UK and make it into an extension.

If you are working on an old prototype and want to update the step by step pattern, update app/assets/sass/application.scss to remove the old step by step pattern imports.

How to update to the latest version

To continue using the old pattern

It can be hard to update step by step if you currently use an older version of the pattern in your prototype.

You can keep the older version by installing the step by step extension version 1. In terminal type:

npm install @govuk-prototype-kit/step-by-step@1.0.0

This change was added in #1471: Update step by step and install it as an extension.

New feature

Update to GOV.UK Frontend v4.3.1

The new release of the GOV.UK Frontend contains:

  • a new Pagination component, which can help users to navigate backwards and forwards through a series of pages
  • pass HTML directly into compatible components
  • improvements to the ‘Checkboxes’, ‘Radios’ and ‘Select’ components to let services select answers when the page loads by using the ‘values’ option.
  • several fixes: some of these are to address issues with the component ES module JavaScript (introduced in v4.3.0)

If you want to use the new Pagination component, you will also need to update the layout.html file in your prototype.

Check the GOV.UK Frontend release notes for changes you may need to make to ensure your prototype works.

These changes was added in:

12.1.1 (Fix release)

Fixes

12.1.0 (Feature release)

New features

12.0.4 (Fix release)

Fixes

12.0.3 (Fix release)

Fixes

12.0.2 (Fix release)

Fixes

12.0.1 (Fix release)

Recommended changes

The Design System team has made some changes to GOV.UK Frontend. While these are not breaking changes, implementing them will mean your prototype uses the latest components.

Read the release notes for GOV.UK Frontend v4.0.1.

Remove the tabindex attribute from the error summary component

If you're not using Nunjucks macros, remove the tabindex attribute from the error summary's HTML. The component JavaScript now adds and removes this attribute.

This change was introduced in pull request #2491: Prevent error summary from being refocused after it has been initially focused on page load.

If you need help with the Prototype Kit, contact the GOV.UK Prototype team.

12.0.0 (Breaking release)

Breaking changes

This release ensures the GOV.UK Prototype Kit reflects the latest release of the GOV.UK Frontend, v4.0.0.

Update to GOV.UK Frontend v4.0.0

The new release of GOV.UK Frontend contains:

  • an iteration to the accordion component
  • other ‘breaking’ changes you should make to improve your service

Check the GOV.UK Frontend release notes for changes you may need to make to ensure your prototype works.

This change was added in #1195: Update the GOV.UK Prototype Kit to use GOV.UK Frontend v4.0.0.

New features

Preserve query strings when redirecting POSTs to GETs

The GOV.UK Prototype Kit now preserves URL query strings when redirecting POST requests to GET requests.

This means if you have a query like /link/to/something?query=true&hello=world on your POST form action, and you submit the form, the URL query string will be present in the redirected URL.

This feature is useful when you:

  • use the query string to set flash messages or return paths
  • want to use the values in the query string for a specific page, rather than saved data

Thanks to @edwardhorsford for contributing this issue and its solution.

This was added in #1120: Preserve query string when redirecting POSTs to GETs.

Fixes

If you need help with the Prototype Kit, contact the GOV.UK Prototype team.

11.0.0 (Fix release)

Fixes

We’ve recently experienced 2 security incidents involving common NPM packages used by the Prototype Kit. We’re sorry for the inconvenience this has caused.

We’ve added new measures (a package-lock.json file) to help prevent this in the future.

To protect your service from any similar threats in future, please upgrade to this new version of the Kit.

Install the Prototype Kit

For any existing prototypes, follow the guide to update the kit.

Pull requests

Pull request #1143: Add a package-lock.json file.

10.0.0 (Breaking release)

Breaking changes

You must make the following changes if you’re running Node.js 10 and you update to this release, or your prototype may break.

Update from Node.js 10

You can no longer run the GOV.UK Prototype Kit on Node.js 10.

If you currently run Node.js 10, you'll need to upgrade to a newer version.

We recommend using version 16. You can find more information on the Prototype Kit requirements page.

Upgrade Notify client library from version 4.7.2 to 5.1.0

We have updated the Notify client library to version 5.1.0. This may break existing prototypes that are using the Notify client. Big thanks to David McDonald.

Breaking change pull requests

Fixes

9.15.0 (Feature release)

New features

Update to GOV.UK Frontend 3.14.0

Added in Pull request #1108: Update to GOV.UK Frontend v3.14.0

This release contains:

  • new override classes for text alignment
  • changes to the govuk-spacing function to allow negative spacing
  • a fix for an accessibility issue with the panel component

Replace back link placeholder URLs with JavaScript

We've added JavaScript to make the back link component take users to the previous page by default, rather than you having to update placeholder text.

If you want to use JavaScript in production, you must also use a non-JavaScript alternative, so you do not exclude any users. If you cannot use a non-JavaScript alternative, you should hide the back link when JavaScript is not available.

You can still override the href attribute if you need to provide a solution that works when JavaScript is disabled.

This was added in Pull request #1103: Replace back link placeholder URLs with JavaScript

Update Node.js to protect your code

If you use the GOV.UK Prototype Kit, we recommend you update to use the latest version of Node.js 14 Long Term Support (LTS). This is to make sure you're protected from a recent security vulnerability in the npm (Node Package Manager).

To make sure you're using Node.js version 14.17.6 or later, follow the install instructions on the Prototype Kit website.

If you're using Node Version Manager (nvm), you can instead run nvm install to install v14.17.6.

Fixes

9.14.2 (Fix release)

Fixes

9.14.1 (Patch release)

Fixes

9.14.0 (Feature release)

New features

9.13.0 (Feature release)

New features

Make Sass errors clearer to users

Previously, it was not obvious to users if Sass had stopped updating because of an error. An error would be printed to the command line, but nothing would happen in the browser. We know that this error was easy to miss, which could cause confusion.

Now, when there's a Sass error, the GOV.UK Prototype Kit creates a blank application.css file to make the site look broken to users.

If you fix the Sass error, the site will automatically reload.

We have also changed the Gulp log level to be less detailed, so that errors stand out.

This was added in Pull request #990: Make Sass errors clearer to the user.

Opt in to the new GOV.UK Frontend link styles

Links now have underlines that are consistently thinner and a bit further away from the link text.

Links also have a clearer hover state, where the underline gets thicker to make the link stand out to users.

The new link styles are opt-in because Chromium browsers have an issue with links inside a multi-column layout.

Read more about the new link styles in the GOV.UK Frontend release notes.

This was added in Pull request #1012: Implement the new link and hover styles in the Prototype Kit.

Update to GOV.UK Frontend

This was added in Pull request #1025: Update to GOV.UK Frontend v3.12.0

Fixes

9.12.1 (Patch release)

Fixes

9.12.0 (Feature release)

New features

Fixes

9.11.2 (Patch release)

Fixes

9.11.1 (Patch release)

Fixes

9.11.0 (Feature release)

New features

Fixes

9.10.1 (Patch release)

9.10.0 (Feature release)

New features

9.9.0 (Feature release)

New features

Fixes

9.8.0 (Feature release)

New features

Updated task list template

The task list pattern has been updated to make incomplete tasks clearer to users. This change has also been made to the pattern in the Design System.

If you're updating from an older version, in your app/assets/sass/patterns/task-list.scss file add the line .app-task-list__tag, before .app-task-list__task-completed {:

.app-task-list__tag,
.app-task-list__task-completed {

This was added in pull request #907: Update Task List template

9.7.0 (Feature release)

New features

9.6.1 (Patch release)

Fixes

9.6.0 (Feature release)

New features

9.5.0 (Feature release)

New features

Fixes

Use Prototype Kit-specific patterns in the unbranded template

You can now use patterns like step by step navigation and task lists in the unbranded template.

You do not need to do anything if you're installing this version for the first time.

If you're upgrading from an older version, make the following changes.

  1. In the app/assets/sass/unbranded.scss file, change @import "node_modules/govuk-frontend/govuk/all"; to @import "application";.
  2. In the app/views/layout_unbranded.html file, change {% extends "govuk/template.njk" %} to {% extends "layout.html" %}.

#842: Allow Kit specific patterns to be used with the unbranded template.

Other fixes

9.4.0 (Feature release)

New features

Fixes

9.3.0 (Feature release)

New features

9.2.0 (Feature release)

New features

9.1.0 (Feature release)

New features

Fixes

9.0.0 (Breaking release)

This release updates GOV.UK Prototype Kit to v3.0.0 of GOV.UK Frontend.

In v3.0.0 of GOV.UK Frontend, we’ve made some important changes to improve the accessibility of pages. This includes making sure that the styles, components and patterns in GOV.UK Frontend meet WCAG 2.1 level AA.

You must follow our guidance on updating your version of the Prototype Kit.

If you need help updating or installing the Prototype Kit, you can:

Breaking changes

You must make the following changes when you migrate to this release, or your prototype may break.

  1. Update files in the /app folder - unless you updated via the command line.
  2. Update HTML in GOV.UK Frontend components.

If you’ve created custom code or components, read the release notes for GOV.UK Frontend v3.0.0 for more changes you may need to make.

Update files in the app folder

To make sure GOV.UK Frontend's files do not conflict with your code, we've moved our package files into a directory called govuk.

If you downloaded this version of the Prototype Kit as a zip file, you must:

  • add an assets path in the Sass file
  • replace old colours
  • update asset paths
  • update the layout file
  • update the layout_unbranded file

Pull requests:

Add an assets path in the Sass file

In the app/assets/sass/application.scss file, add $govuk-assets-path: '/govuk/assets/'; at the top.

Replace old colours

In the app/assets/sass/patterns/_step-by-step-navigation.scss file, replace:

  • “grey-4” with "light-grey", $legacy: "grey-4"
  • “grey-3” with "light-grey", $legacy: "grey-3"

You must make this change even if you are not using the step by step navigation pattern in your prototype.

Read our blog post about why we changed the colour palette.

Update asset paths

In the app/assets/sass/unbranded.scss file, add govuk/ after govuk-frontend/ in the 3 @import paths. For example:

@import "node_modules/govuk-frontend/govuk/settings/colours-palette";

Update the layout file

  1. Go to the app/views/layout.html file.
  2. Add {%- set assetPath = '/govuk/assets' -%} at the top.
  3. Replace {% extends "template.njk" %} with {% extends "govuk/template.njk" %}.
  4. In each import line that starts {% from, add govuk/components/ to the start of the file path. For example:
{% from "govuk/components/accordion/macro.njk"        import govukAccordion %}
  1. Add {% set mainClasses = mainClasses | default("govuk-main-wrapper--auto-spacing") %} before {% if useAutoStoreData %}

Update the layout_unbranded file

In the app/views/layout_unbranded.html file:

  1. Add {%- set assetPath = '/govuk/assets' -%} at the top.
  2. Replace {% extends "template.njk" %} with {% extends "govuk/template.njk" %}.

Pull request #769: Update to GOV.UK Frontend 3.0.0.

Update HTML in GOV.UK Frontend components

Update and add data-module attributes

If you’re using HTML versions of GOV.UK Frontend components, add a govuk- prefix to data-module attribute values. For example:

<div class="govuk-accordion" data-module="govuk-accordion">
...
</div>

If you’re using HTML versions of the button or details component, add:

  • data-module="govuk-button" to each <button> HTML tag
  • data-module="govuk-details" to each <details> HTML tag

Pull request #1443: Ensure GOV.UK Frontend component selectors cannot conflict when initialised.

Update the character count CSS class name

If you're using the HTML version of the character count component, change js-character-count to govuk-js-character-count.

Pull request #1444: Renames js- css prefix to govuk-js-.

Update links from error summary components to radios and checkboxes

If you've linked from an error summary component to the first input in a radios or checkboxes component, the link will no longer work.

This is because the id of the first input no longer has the suffix -1.

If there are links back to radios or checkboxes components in your error summary component, remove -1 from the end of the href attribute.

Pull request #1426: Make radios and checkboxes components easier to link to from error summary.

Update markup if you’re using the tab component

If you’re using the HTML version of the tabs component, remove the govuk-tabs__tab--selected class from the first tab's link, then add the govuk-tabs__list-item--selected class to the link's parent list item.

For example:

<li class="govuk-tabs__list-item govuk-tabs__list-item--selected">
  <a class="govuk-tabs__tab" href="#tab1">
    Tab 1
  </a>
</li>

Pull request #1496: Update the focus state for tabs.

Update markup if you’re using the task list component

Update every item in your task list, removing the app-task-list__task-name class from the link and wrapping the link in a new <span class="app-task-list__task-name">.

For example:

<li class="app-task-list__item">
 <span class="app-task-list__task-name">
   <a href="#" aria-describedby="eligibility-completed">
     Check eligibility
   </a>
 </span>
</li>

Pull request #770: Update the task list focus state.

Update start button icon

Start buttons have a new icon. Your start buttons will lose their current icons unless you replace the old icon with the new one.

If you're using Nunjucks:

  • set the isStartButton option to true
  • remove the .govuk-button--start class

For example:

govukButton({
  text: "Start now",
  href: "#",
  isStartButton: true
})

If you're using HTML, add the SVG code from the start button example in the Design System.

Pull request #1341: Add new start button icon.

New features

Page wrappers now use auto spacing

The <main> element in layouts now has a .govuk-main-wrapper--auto-spacing class by default.

This will add the correct amount of padding above the content, depending on whether there are elements above the <main> element inside the govuk-width-container wrapper. Elements above the <main> element could include a back link or breadcrumb component.

If govuk-main-wrapper--auto-spacing does not work for your service, you can set the correct amount of padding by adding the .govuk-main-wrapper--l class to your page or layout by using:

{% set mainClasses = "govuk-main-wrapper--l" %}

You can also turn off the .govuk-main-wrapper--auto-spacing class by using:

{% set mainClasses = "" %}

Continue to use the old colours

If you want to continue using old colours in your prototype, you can turn on compatibility mode.

8.12.1

Fixes

8.12.0

New feature

Fixes

8.11.0

New feature

8.10.0

New feature

8.9.0

New feature

Fixes

8.8.0

New features

8.7.0

New features

8.6.0

New features

8.5.0

New features

Fixes

Internal

8.4.0

New features

Bug fixes

8.3.0

New features

8.2.0

New features

Also includes a new character-count component

Bug fixes

8.1.0

New features

8.0.0

Breaking change

New features

Bug fixes

7.1.0

New features

Bug fixes

7.0.0

This release adds backwards compatibility, so you can use old prototypes made in v6 of the Prototype Kit in v7.

Read the guidance on using backwards compatibility

New features

Bug fixes

7.0.0-beta.10

Breaking changes

You will need to:

  • update app/views/includes/scripts.html file and add the following line to include the JavaScript file
<script src="/node_modules/govuk-frontend/all.js"></script>
  • modify app/assets/javascripts/application.js file to initialise the JavaScript
$(document).ready(function () {
   window.GOVUKFrontend.initAll()
})

New features

Bug fixes

To see the previous private beta releases see the archived private beta repository.

6.3.0

New features

Bug fixes

6.2.0

New features

Bug fixes

6.1.0

New features

6.0.0

New features

Bug fixes

5.1.0

New features

Bug fixes

5.0.1

5.0.0

Breaking changes

Use Gulp.js rather than Grunt as a build tool. It is recommended to install Gulp globally, do so using:

npm install --global gulp-cli

All changes

The short version:

The extended version:

This release includes custom radio buttons and checkbox styles from govuk-elements-sass v2.2.0. The version of Node that the prototype kit uses has been updated, we recommend using LTS (version 6 or above). Travis will now run tests against each pull request to ensure that the app runs (by checking the server and build tasks). The latest-release branch can be used to update the prototype kit. Instructions for updating your version of the prototype kit via the latest-release branch can be found here.

4.0.0

Breaking changes

  • #244 Migrate documentation into a separate application

All changes

  • Bump all GOV.UK assets to their latest versions
  • Remove duplicate GOV.UK assets copied to the app
  • #241 Warn against using the prototype kit to build production services
  • #268 Automatically keep the latest release branch up to date. This can be used to update the kit
  • #270 Add a new stylesheet for the unbranded layout to fix font issues
  • #257 Make CSS output easier to debug (with sourcemaps)
  • #237 Make links with role="button" behave like buttons
  • #224 Lint the prototype kit’s codebase using Standard. This only applies to the kit’s codebase - there’s no requirement for your app to meet this
  • #197 Add the ability to store user data per session

3.0.0

BrowserSync support, so you don't need to refresh the browser to see your changes. Nunjucks filters file has been added, so you can add your own filters to your project, check the examples page in the kit for more details.

Breaking changes

  • #188 Force SSL on production

All changes

  • #213 Remove references to "latest version" of Node
  • #212 Remove the mustache version of govuk template
  • #211 Remove govuk_template.html copied in build task from the repository
  • #209 Use release 1.2.0 of the govuk-elements-sass package
  • #208 Remove govuk elements sass from the app folder
  • #207 Bump the govuk frontend toolkit to 4.12.0
  • #206 Bump the govuk template to 0.17.3
  • #200 Adds custom 'filters' to the nunjucks templating engine
  • #194 Windows heroku login instructions
  • #193 Adding browser-sync to the prototyping kit.
  • #192 Security guidance
  • #191 Edit sass docs for clarity
  • #188 Force SSL on production
  • #186 add guidance page for using verify prototype
  • #181 Add link to styleguide on writing commit messages
  • #180 Change smart quotes to straight quotes
  • #177 Add a link to install Git
  • #176 Bump govuk template to 0.17.0
  • #175 Bump govuk frontend toolkit to 4.10.0
  • #172 Fix closing element
  • #169 Fix broken url and typo
  • #166 Stop prototypes being indexed by search engines.
  • #165 Redirect .html and .htm if in url path
  • #164 Fix link to developer install instructions
  • #162 Have kit self-identify as being the GOV.UK Prototype kit
  • #161 always convert port to Number
  • #160 Minor documentation update
  • #159 Remove invalid ARIA role
  • #156 fix port restart issue
  • #155 Update the GOV.UK template and remove napa as a dependency
  • #154 Use TRAVIS_BRANCH when running in travis-ci
  • #152 Amend travis yml

2.1.0

New documentation to make it easier to install and run from scratch - tested with users and everything! The kit will now copy new files from assets to public (previously only updates to existing files were copied). It's easier to run multiple prototypes at once - the kit will automatically find a free port to run on.

  • Add default cookie message (#150)
  • New documentation (#145)
  • Add example pages for branching (#143)
  • Use grunt-sync for assets (#141)
  • Fix warning for npm engine (#140)
  • Add tmuxp config files to gitignore (#132)
  • Improve 'port in use' errors, find a new port (#130)

2.0.0

This release switches templating language from Mustache to Nunjucks.

Breaking change

To convert your old prototype pages for use with this version, follow this guide.

  • Bump the govuk frontend toolkit to 4.6.0 (#127)
  • Update govuk elements sass (#124)
  • Update the prototype kit to use Nunjucks for templating (#123)
  • Create config file that stores prototype configuration (#120)
  • Add phase banner includes (#118)
  • Use npm start as the standard way to run the app (#111)
  • Add warning if folder missing or module missing (#100)
  • Improve error handling around port in use, find new port (#95)
  • Add body-parser for parsing POSTs (#86)
  • Add question page (#72)
  • Add js for toggled content (#70)
  • Add Start Page (#45)
  • Add Check Your Answers page (#36)
  • Add confirmation page (#35)
  • Upgraded to Express 4 (#32)
  • Add jQuery to the kit, so it's available on all pages by default (#18)
  • Add page without header and footer (#12)

1.0.0

Initial release of prototype kit