Skip to content

Releases: nhsuk/nhsuk-frontend

v7.1.0

21 Aug 15:06
630540f
Compare
Choose a tag to compare

7.1.0 - 21 August 2023

🆕 New features

  • Added three new card variants, primary card(with chevron), secondary card and top task (PR 878)

🔧 Fixes

We removed the need to add the last breadcrumb outside of the 'Items' list, now simply include it in the list of items. This also fixes the issue (Issue 471 in the nhsuk Service Manual) with not being able to add attributes to the last breadcrumb. Instead of having this:

  {{ breadcrumb({
    items: [
      {
        href: "/level-one",
        text: "Level one"
      },
      {
        href: "/level-one/level-two",
        text: "Level two"
      }
    ],
    href: "/level-one/level-two/level-three",
    text: "Level three"
  }) }}

You will now only need this:

  {{ breadcrumb({
    items: [
      {
        href: "/level-one",
        text: "Level one",
      },
      {
        href: "/level-one/level-two",
        text: "Level two"
      },
      {
        href: "/level-one/level-two/level-three",
        text: "Level three"
      }
    ]
  }) }}

You can now add attributes to the last breadcrumb.

Note: For backwards compatibility, 'href' and 'text' parameters outside of the items list will still work and display as the last breadcrumb. These will be removed in a future release.

  • Redo fix of checkbox label being unintentionally full width of the screen due to ordering of css files (Issue 842).

v7.0.0

22 Mar 15:12
b64743d
Compare
Choose a tag to compare

7.0.0 - 22 March 2023

🆕 New features

  • Added Character Count component, ported from govuk-frontend (PR 811)
  • Added Tabs component, ported from govuk-frontend (PR 828)

💥 Breaking changes

  • Breadcrumb update

We iterated the breadcrumb, removing the white banner and bringing the breadcrumb link closer to the page heading, which it relates to, giving the heading context of where it sits within the site. Instead of having this:

  <p class="nhsuk-breadcrumb__back">
    <a class="nhsuk-breadcrumb__backlink" href="/level-one/level-two/level-three">
      Back to Level three
    </a>
  </p>

You will only now need this:

  <p class="nhsuk-breadcrumb__back">
    <a class="nhsuk-breadcrumb__backlink" href="/level-one/level-two/level-three">
      <span class="nhsuk-u-visually-hidden">Back to &nbsp;</span>
      Level three
    </a>
  </p>

♻️ Changes

  • Rework clickable cards using CSS invisible overlay rather than JS event handler to avoid problems with using Ctrl-click, middle click, right click to open new tabs (PR 762).
    This change removes the Card component's associated JavaScript. If you are bundling this yourself in your pipeline you will need to edit your JS entrypoint to remove the lines which read: import Card from '[wherever]'; and Card();
    You do not need to update your html as part of this change - this remains the same.

🔧 Maintenance

  • Removes support for LibSass and Ruby Sass in favour of Dart Sass
  • Upgrade all dependencies to their latest versions where possible
  • Updates code formatting conventions to fall mostly in line with Prettier's recommendations. Details of the implementation and how it effects ESlint can be found on the PR.

🔧 Fixes

  • Adds missing open and id parameters to details nunjucks component (Issue 856, PR 857)
    These were already documented in the service manual but not actually implemented.

v6.2.0

17 Jan 11:14
cf43748
Compare
Choose a tag to compare

6.2.0 - 17 January 2023

🆕 New features

  • Button improvements

    • Add role="button" attribute to links visually styled as buttons (<a class="nhsuk-button" role="button">) and bind a spacebar keydown listener to these elements so that they behave like buttons.
    • Add optional data-prevent-double-click="true" attribute to buttons to trigger simple "debounce" behaviour to buttons to catch double clicks and prevent double submissions.
    • Add data-module="nhsuk-button" to buttons in order to trigger the above JS behaviours (it is recommended that you do this)
  • Allow back-link component to be a button element (PR 838)

🔧 Fixes

  • Fix issue with VoiceOver on Safari (iOS and macOS) not announcing a list as a list. This affects some components that have a list with style list-style-type: none, ie those that have a class of nhsuk-list on the <ul>. This fixes the do/don't list and the error summary components. The contents list and pagination components don't seem to be affected.

  • Fix issue of checkbox label being unintentionally full width of the screen due to ordering of css files (Issue 842)

v6.1.2

08 Aug 20:23
8ca299a
Compare
Choose a tag to compare

6.1.2 - 8 August 2022

🔧 Fixes

  • Add missing nhsuk-list--border utility class
  • Reduce input and textarea error border widths to eliminate text movement / dimension changes when focusing and unfocusing a field with an error (Issue 825), (PR 826).

7.0.0-alpha.2

03 Aug 10:41
9fe8ab2
Compare
Choose a tag to compare
7.0.0-alpha.2 Pre-release
Pre-release

7.0.0.alpha.2 - 3 Aug 2022

🆕 New features

  • Added Character Count component, ported from govuk-frontend (PR 811)
  • Added Tabs component, ported from govuk-frontend (PR 828)

🔧 Maintenance

  • Removes support for LibSass and Ruby Sass in favour of Dart Sass
  • Upgrade all dependencies to their latest versions where possible
  • Pinned the Node version to the latest LTS version at the time of publishing (16.16.0). In environments where Volta is installed the appropriate version will be used
  • Updates code formatting conventions to fall mostly in line with Prettier's recommendations. Have an opinion? Share it! Details of the implementation and how it effects ESlint can be found on the PR.

v6.1.1

13 Jun 15:13
af013aa
Compare
Choose a tag to compare

v6.1.0

12 Jan 14:55
6a0997f
Compare
Choose a tag to compare

6.1.0 - 12 January 2022

🆕 New features

  • Added utility classes nhsuk-u-text-align-left, nhsuk-u-text-align-centre and nhsuk-u-text-align-right

🔧 Fixes

  • Updated dependancies in package.json & generated new package-lock.json
  • Changed spelling mistake charitiest to charities
  • Fixed card component example format

v6.0.1

29 Nov 15:53
632637c
Compare
Choose a tag to compare

6.0.1 - 29 November 2021

🔧 Fixes

  • Added missing utility classes nhsuk-u-display-block, nhsuk-u-display-inline-block, nhsuk-u-float-left and nhsuk-u-float-right

v6.0.0

29 Nov 12:16
526ff76
Compare
Choose a tag to compare

Please see the 6.0.0 CHANGELOG entry for more information about this release.

v5.2.1

28 Oct 14:00
16fa92a
Compare
Choose a tag to compare

5.2.1 - 28 October 2021

🔧 Fixes

  • Tidying and removing of duplicate styles in header SCSS (Issue 711), (PR 779).
  • Removal of unnecessary static aria-label="Open menu" on the header menu button. Included more descriptive aria-expanded="false" on page load.
  • Fixing misaligned search magnifiying glass in header on landscape iOS devices (Issue 781, PR 782)