Skip to content

Commit

Permalink
Updates for GOV.UK Frontend v4.7.0 and GOV.UK Frontend Jinja 2.7.0 (#25)
Browse files Browse the repository at this point in the history
* Updates

* Update GOVUK_FRONTEND_VERSION to v4.7.0

There's no govuk_frontend_jinja version yet

* Update govuk frontend jinja to support the FE changes

* Update version

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cameron Lamb <[email protected]>
  • Loading branch information
3 people authored Jul 27, 2023
1 parent b21e200 commit 6e790ec
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ Below is a list of the versions of this package and the versions of the GOV.UK F
| --------------- | ----------------------- |
| [0.2.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.2.0) - [0.2.3](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.2.3) | [v4.5.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.5.0) |
| [0.3.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.3.0) - [0.3.9](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.3.9) | [v4.6.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.6.0) |
| [0.4.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.4.0) - [0.4.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.4.0) | [v4.7.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.7.0) |
34 changes: 34 additions & 0 deletions govuk_frontend_django/components/exit_this_page.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from dataclasses import dataclass
from typing import Optional

from govuk_frontend_django.components import base as govuk_frontend_base
from govuk_frontend_django.components import (
error_message as govuk_frontend_error_message,
)
from govuk_frontend_django.components import fieldset as govuk_frontend_fieldset
from govuk_frontend_django.components import hint as govuk_frontend_hint
from govuk_frontend_django.components import label as govuk_frontend_label
from govuk_frontend_django.components import tag as govuk_frontend_tag


@dataclass(kw_only=True)
class GovUKExitThisPage(govuk_frontend_base.GovUKComponent):
"""GOV.UK Exit This Page
See: https://design-system.service.gov.uk/components/exit-this-page/
"""

text: Optional[str] = None
html: Optional[str] = None
redirectUrl: Optional[str] = None
id: Optional[str] = None
activatedText: Optional[str] = None
timedOutText: Optional[str] = None
pressTwoMoreTimesText: Optional[str] = None
pressOneMoreTimeText: Optional[str] = None

_jinja2_template = "govuk_frontend_jinja/components/exit-this-page/macro.html"
_macro_name = "govukExitThisPage"


COMPONENT = GovUKExitThisPage
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ serve-docs:
get-latest-release-tag:
@gh release list -R $(REPO) | grep "Latest" | awk -F '\t' '{for(i=2; i<=NF; i++) {if($$i~/v?[0-9]+\.[0-9]+\.[0-9]+/) {print $$i; exit}}}'

GOVUK_FRONTEND_VERSION = "v4.6.0"
GOVUK_FRONTEND_JINJA_VERSION = "2.6.0"
GOVUK_FRONTEND_VERSION = "v4.7.0"
GOVUK_FRONTEND_JINJA_VERSION = "2.7.0"

generate-components:
poetry run python scripts/generate_components.py $(GOVUK_FRONTEND_VERSION)
Expand Down
10 changes: 5 additions & 5 deletions poetry.lock

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

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "govuk-frontend-django"
version = "0.3.9"
version = "0.4.0"
description = "Django functionality to help when building a GOV.UK website."
authors = [
"DBT Live Service Team <[email protected]>",
Expand All @@ -25,7 +25,7 @@ packages = [
python = "^3.8"
Django = "^4.1.9"
jinja2 = "^3.1.2"
govuk-frontend-jinja = "2.6.0"
govuk-frontend-jinja = "2.7.0"

[tool.poetry.group.dev.dependencies]
black = "^23.3.0"
Expand Down

0 comments on commit 6e790ec

Please sign in to comment.