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

Upgrade nhsuk frontend version to v9.0.1 #356

Merged
merged 15 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# NHS.UK prototype kit Changelog

## Unreleased

:new: **New features**

- Update to NHS.UK frontend v9.0.0 - see [version 9.0.0 release notes](https://github.com/nhsuk/nhsuk-frontend/releases/tag/v9.0.0) for details on the breaking changes
- Drop `outerContent` block and use `beforeContent` block for both breadcrumbs and back links

## 4.12.0 - 15 August 2024

:wrench:
Expand Down
4 changes: 3 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ app.use(cookieParser());
// Nunjucks configuration for application
const appViews = [
path.join(__dirname, 'app/views/'),
path.join(__dirname, 'node_modules/nhsuk-frontend/packages/components'),
path.join(__dirname, 'docs/views/'),
path.join(__dirname, 'lib/prototype-admin/'),
path.join(__dirname, 'node_modules/nhsuk-frontend/packages/components'),
path.join(__dirname, 'node_modules/nhsuk-frontend/packages/macros'),
];

const nunjucksConfig = {
Expand Down Expand Up @@ -179,6 +180,7 @@ if (useDocumentation || onlyDocumentation === 'true') {
const docViews = [
path.join(__dirname, 'docs/views/'),
path.join(__dirname, 'node_modules/nhsuk-frontend/packages/components'),
path.join(__dirname, 'node_modules/nhsuk-frontend/packages/macros')
];

nunjucksAppEnv = nunjucks.configure(docViews, {
Expand Down
8 changes: 2 additions & 6 deletions app/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@
NHS.UK prototype kit
{% endblock %}

<!-- For adding a breadcrumb -->
<!-- Code examples can be found at https://service-manual.nhs.uk/design-system/components/breadcrumbs -->
<!-- For adding a breadcrumb or back link -->
<!-- Code examples can be found at https://service-manual.nhs.uk/design-system/components/breadcrumbs and https://service-manual.nhs.uk/design-system/components/back-link -->
{% block beforeContent %}
{% endblock %}

<!-- For adding a back link -->
<!-- Code examples can be found at https://service-manual.nhs.uk/design-system/components/back-link -->
{% block outerContent %}
{% endblock %}

<!-- For adding page content -->
<!-- Page layout code can be found at https://service-manual.nhs.uk/design-system/styles/layout -->
Expand Down
9 changes: 2 additions & 7 deletions app/views/page-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,15 @@
Content page example - NHS.UK prototype kit
{% endblock %}

<!-- For adding a breadcrumb -->
<!-- Code examples can be found at https://service-manual.nhs.uk/design-system/components/breadcrumbs -->
<!-- For adding a breadcrumb or back link -->
<!-- Code examples can be found at https://service-manual.nhs.uk/design-system/components/breadcrumbs or https://service-manual.nhs.uk/design-system/components/back-link -->
{% block beforeContent %}
{{ breadcrumb({
href: "/",
text: "Home"
}) }}
{% endblock %}

<!-- For adding a back link -->
<!-- Code examples can be found at https://service-manual.nhs.uk/design-system/components/back-link -->
{% block outerContent %}
{% endblock %}

<!-- For adding page content -->
<!-- Page layout code can be found at https://service-manual.nhs.uk/design-system/styles/layout -->
{% block content %}
Expand Down
3 changes: 2 additions & 1 deletion docs/views/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends 'layout.html' %}

{% block beforeContent %}
{% block header %}
{{ header({}) }}
{{ hero({
"heading": "NHS.UK prototype kit",
"text": "Rapidly create HTML prototypes of NHS.UK services."
Expand Down
4 changes: 1 addition & 3 deletions docs/views/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,9 @@
{{ header({}) }}
{% endblock %}

{% block beforeContent %}{% endblock %}

{% block main %}
<div class="nhsuk-width-container {{ containerClasses }}">
{% block outerContent %}{% endblock %}
{% block beforeContent %}{% endblock %}
<main class="nhsuk-main-wrapper {{ mainClasses }}" id="maincontent" role="main">
{% block content %}{% endblock %}
</main>
Expand Down
6 changes: 1 addition & 5 deletions docs/views/templates/blank-transactional.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
{% endblock %}

{% block beforeContent %}
{% endblock %}

{% block outerContent %}
{{ backLink({
"href": "/templates/start-page",
"text": "Back",
"classes": "nhsuk-u-margin-top-4 nhsuk-u-margin-bottom-0"
"text": "Back"
}) }}
{% endblock %}

Expand Down
17 changes: 12 additions & 5 deletions docs/views/templates/check-your-answers.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@
Check your answers template - NHS.UK prototype kit
{% endblock %}

{% block beforeContent %}
{{ backLink({
"href": "/templates/start-page",
"text": "Back"
}) }}
{% endblock %}

{% block content %}
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">

<h1 class="nhsuk-u-margin-top-4">
<h1 class="nhsuk-heading-l">
Check your answers before sending your application
</h1>

<h2>
<h2 class="nhsuk-heading-m">
Personal details
</h2>

Expand Down Expand Up @@ -91,7 +98,7 @@ <h2>
]
}) }}

<h2>
<h2 class="nhsuk-heading-m">
Medical details
</h2>

Expand Down Expand Up @@ -134,8 +141,8 @@ <h2>
]
}) }}

<h2>
Now send you application
<h2 class="nhsuk-heading-m">
Now send your application
</h2>

<p>
Expand Down
5 changes: 2 additions & 3 deletions docs/views/templates/question-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
Question page
{% endblock %}

{% block outerContent %}
{% block beforeContent %}
{{ backLink({
"href": "/templates/start-page",
"text": "Back",
"classes": "nhsuk-u-margin-top-4 nhsuk-u-margin-bottom-0"
"text": "Back"
}) }}
{% endblock %}

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"gulp-rename": "^2.0.0",
"gulp-sass": "^5.1.0",
"lodash": "^4.17.21",
"nhsuk-frontend": "^8.3.0",
"nhsuk-frontend": "^9.0.0",
"nunjucks": "^3.2.4",
"path": "^0.12.7",
"sass": "^1.78.0"
Expand Down