Skip to content

Commit

Permalink
Release 0.5.1 for GOV.UK Frontend v5.1.0 and GOV.UK Frontend Jinja 3.…
Browse files Browse the repository at this point in the history
…0.0 (#39)

* Updates

* Bump version to 0.5.1

* Fix example project

---------

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 Jun 17, 2024
1 parent 862c39a commit e199a59
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 82 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Below is a list of the versions of this package and the versions of the GOV.UK F

| Package Version | GOV.UK Frontend Version |
| --------------- | ----------------------- |
| [0.5.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.5.0) - [0.5.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.5.0) | [v5.1.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.1.0) |
| [0.5.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.5.0) - [0.5.1](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.5.1) | [v5.1.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.1.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) |
| [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.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) |
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Below is a list of the versions of this package and the versions of the GOV.UK F

| Package Version | GOV.UK Frontend Version |
| --------------- | ----------------------- |
| [0.5.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.5.0) - [0.5.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.5.0) | [v5.1.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.1.0) |
| [0.5.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.5.0) - [0.5.1](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.5.1) | [v5.1.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.1.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) |
| [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.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) |
150 changes: 80 additions & 70 deletions example_project/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example_project/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
python = "^3.10"
Django = "^4.2.11"
govuk-frontend-django = { path = "../", develop = true }
govuk-frontend-jinja = "^2.5.0"
govuk-frontend-jinja = "^3.0.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
52 changes: 52 additions & 0 deletions govuk_frontend_django/components/task_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
from dataclasses import dataclass
from typing import Any, List, 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 TaskListItemsStatus:
tag: Optional[Any] = None
text: Optional[str] = None
html: Optional[str] = None
classes: Optional[str] = None


@dataclass(kw_only=True)
class TaskListItemsTitle:
text: Optional[str] = None
html: Optional[str] = None
classes: Optional[str] = None


@dataclass(kw_only=True)
class TaskListItems:
title: TaskListItemsTitle
hint: Optional[govuk_frontend_hint.GovUKHint] = None
status: TaskListItemsStatus
href: Optional[str] = None
classes: Optional[str] = None


@dataclass(kw_only=True)
class GovUKTaskList(govuk_frontend_base.GovUKComponent):
"""GOV.UK Task List
See: https://design-system.service.gov.uk/components/task-list/
"""

items: List[TaskListItems]
idPrefix: Optional[str] = None

_jinja2_template = "govuk_frontend_jinja/components/task-list/macro.html"
_macro_name = "govukTaskList"


COMPONENT = GovUKTaskList
14 changes: 7 additions & 7 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.5.0"
version = "0.5.1"
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.8.0"
govuk-frontend-jinja = "3.0.0"

[tool.poetry.group.testing]
optional = true
Expand Down

0 comments on commit e199a59

Please sign in to comment.