Skip to content

Commit

Permalink
Merge pull request #87 from LandRegistry/govuk-frontend-55
Browse files Browse the repository at this point in the history
GOV.UK Frontend v5.5.0
  • Loading branch information
matthew-shaw authored Aug 28, 2024
2 parents 23e8eb3 + ecb9a39 commit 804ddc8
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 safety
python -m pip install flake8 pip-audit
pip install -r requirements-test-${{ matrix.python-version }}.txt
- name: Check dependencies for known security vulnerabilities
run: safety check -r requirements-test-${{ matrix.python-version }}.txt
run: pip-audit -r requirements-test-${{ matrix.python-version }}.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -46,5 +46,5 @@ jobs:
run: |
(cd tests/utils && nohup python -m flask run --port 3000 &)
wait-for-it localhost:3000
./govuk-frontend-diff http://localhost:3000 --govuk-frontend-version=v5.4.0 --exclude page-template --ci
./govuk-frontend-diff http://localhost:3000 --govuk-frontend-version=v5.5.0 --exclude page-template --ci
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/LandRegistry/govuk-frontend-jinja/compare/3.1.0...main)
## [Unreleased](https://github.com/LandRegistry/govuk-frontend-jinja/compare/3.2.0...main)

## [3.2.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.2.0) - 27/08/2024

### Added

- [GOV.UK Frontend v5.5.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.5.0) support

## [3.1.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.1.0) - 28/05/2024

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GOV.UK Frontend Jinja Macros

[![PyPI version](https://badge.fury.io/py/govuk-frontend-jinja.svg)](https://pypi.org/project/govuk-frontend-jinja/)
![govuk-frontend 5.4.0](https://img.shields.io/badge/govuk--frontend%20version-5.4.0-005EA5?logo=gov.uk&style=flat)
![govuk-frontend 5.5.0](https://img.shields.io/badge/govuk--frontend%20version-5.5.0-005EA5?logo=gov.uk&style=flat)
[![Python package](https://github.com/LandRegistry/govuk-frontend-jinja/actions/workflows/python-package.yml/badge.svg)](https://github.com/LandRegistry/govuk-frontend-jinja/actions/workflows/python-package.yml)

**GOV.UK Frontend Jinja is a [community tool](https://design-system.service.gov.uk/community/resources-and-tools/) of the [GOV.UK Design System](https://design-system.service.gov.uk/). The Design System team is not responsible for it and cannot support you with using it. Contact the [maintainers](#contributors) directly if you need [help](#support) or you want to request a feature.**
Expand All @@ -16,6 +16,7 @@ The following table shows the version of GOV.UK Frontend Jinja that you should u

| GOV.UK Frontend Jinja Version | Target GOV.UK Frontend Version |
| ----------------------------- | ------------------------------ |
| [3.2.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.2.0) | [5.5.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.5.0) |
| [3.1.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.1.0) | [5.4.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.4.0) |
| [3.0.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/3.0.0) | [5.1.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.1.0) |
| [2.8.0](https://github.com/LandRegistry/govuk-frontend-jinja/releases/tag/2.8.0) | [4.8.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.8.0) |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% macro govukBackLink(params) %}
{% from "govuk_frontend_jinja/macros/attributes.html" import govukAttributes -%}

<a href="{% if params.href %}{{ params.href }}{% else %}#{% endif %}" class="govuk-back-link {%- if params.classes %} {{ params.classes }}{% endif %}"
<a href="{{ params.href | default('#', true) }}" class="govuk-back-link {%- if params.classes %} {{ params.classes }}{% endif %}"
{{- govukAttributes(params.attributes) }}>
{{- params.html | safe if params.html else (params.text if params.text else "Back") -}}
{{- params.html | safe if params.html else (params.text | default("Back", true)) -}}
</a>
{% endmacro %}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{% set classNames = classNames ~ " govuk-breadcrumbs--collapse-on-mobile" %}
{% endif -%}

<div class="{{ classNames }}" {{- govukAttributes(params.attributes) }}>
<nav class="{{ classNames }}" {{- govukAttributes(params.attributes) }} aria-label="{{ params.labelText | default("Breadcrumb") }}">
<ol class="govuk-breadcrumbs__list">
{% for item in params['items'] %}
{% if item.href %}
Expand All @@ -28,5 +28,5 @@
{% endif %}
{% endfor %}
</ol>
</div>
</nav>
{% endmacro %}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<ul class="govuk-task-list {%- if params.classes %} {{ params.classes }}{% endif %}"
{{- govukAttributes(params.attributes) }}>
{% for item in params['items'] %}
{{- _taskListItem(params, item, loop.index) }}
{{- _taskListItem(params, item, loop.index) if item }}
{% endfor %}
</ul>
{% endmacro %}
6 changes: 3 additions & 3 deletions requirements-test-3.10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ blinker==1.8.2
# via flask
click==8.1.7
# via flask
flake8==7.0.0
flake8==7.1.1
# via -r requirements-test.in
flask==3.0.3
# via -r requirements-test.in
Expand All @@ -22,9 +22,9 @@ markupsafe==2.1.5
# werkzeug
mccabe==0.7.0
# via flake8
pycodestyle==2.11.1
pycodestyle==2.12.1
# via flake8
pyflakes==3.2.0
# via flake8
werkzeug==3.0.3
werkzeug==3.0.4
# via flask
6 changes: 3 additions & 3 deletions requirements-test-3.11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ blinker==1.8.2
# via flask
click==8.1.7
# via flask
flake8==7.0.0
flake8==7.1.1
# via -r requirements-test.in
flask==3.0.3
# via -r requirements-test.in
Expand All @@ -22,9 +22,9 @@ markupsafe==2.1.5
# werkzeug
mccabe==0.7.0
# via flake8
pycodestyle==2.11.1
pycodestyle==2.12.1
# via flake8
pyflakes==3.2.0
# via flake8
werkzeug==3.0.3
werkzeug==3.0.4
# via flask
6 changes: 3 additions & 3 deletions requirements-test-3.12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ blinker==1.8.2
# via flask
click==8.1.7
# via flask
flake8==7.0.0
flake8==7.1.1
# via -r requirements-test.in
flask==3.0.3
# via -r requirements-test.in
Expand All @@ -22,9 +22,9 @@ markupsafe==2.1.5
# werkzeug
mccabe==0.7.0
# via flake8
pycodestyle==2.11.1
pycodestyle==2.12.1
# via flake8
pyflakes==3.2.0
# via flake8
werkzeug==3.0.3
werkzeug==3.0.4
# via flask
10 changes: 5 additions & 5 deletions requirements-test-3.8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ blinker==1.8.2
# via flask
click==8.1.7
# via flask
flake8==7.0.0
flake8==7.1.1
# via -r requirements-test.in
flask==3.0.3
# via -r requirements-test.in
importlib-metadata==7.1.0
importlib-metadata==8.4.0
# via flask
itsdangerous==2.2.0
# via flask
Expand All @@ -24,11 +24,11 @@ markupsafe==2.1.5
# werkzeug
mccabe==0.7.0
# via flake8
pycodestyle==2.11.1
pycodestyle==2.12.1
# via flake8
pyflakes==3.2.0
# via flake8
werkzeug==3.0.3
werkzeug==3.0.4
# via flask
zipp==3.19.0
zipp==3.20.1
# via importlib-metadata
10 changes: 5 additions & 5 deletions requirements-test-3.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ blinker==1.8.2
# via flask
click==8.1.7
# via flask
flake8==7.0.0
flake8==7.1.1
# via -r requirements-test.in
flask==3.0.3
# via -r requirements-test.in
importlib-metadata==7.1.0
importlib-metadata==8.4.0
# via flask
itsdangerous==2.2.0
# via flask
Expand All @@ -24,11 +24,11 @@ markupsafe==2.1.5
# werkzeug
mccabe==0.7.0
# via flake8
pycodestyle==2.11.1
pycodestyle==2.12.1
# via flake8
pyflakes==3.2.0
# via flake8
werkzeug==3.0.3
werkzeug==3.0.4
# via flask
zipp==3.19.0
zipp==3.20.1
# via importlib-metadata
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setuptools.setup(
name="govuk-frontend-jinja",
version="3.1.0",
version="3.2.0",
author="Matt Shaw",
author_email="[email protected]",
description="GOV.UK Frontend Jinja Macros",
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -e
flake8 .
(cd tests/utils && nohup python -m flask run --port 3000 &)
wait-for-it localhost:3000
./govuk-frontend-diff http://localhost:3000 --govuk-frontend-version=v5.4.0 --exclude page-template --ci
./govuk-frontend-diff http://localhost:3000 --govuk-frontend-version=v5.5.0 --exclude page-template --ci

0 comments on commit 804ddc8

Please sign in to comment.