Skip to content

Commit

Permalink
Update design system to 72.1.0 (#34)
Browse files Browse the repository at this point in the history
* Update the design system version file

* Update padding and margin classes to nearest equivalents in new version of the design system

* Update font size utility classes

* Update naming for breakpoint utility classes where it was not already done as part of the padding and margin updates

* Update parameter variable names

* Fix to media query sizes, and additional update after recent PRs
  • Loading branch information
helenb authored Nov 25, 2024
1 parent 60961a5 commit 874571d
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .design-system-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
70.0.17
72.1.0
6 changes: 4 additions & 2 deletions cms/core/blocks/embeddable.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ def as_macro_data(self) -> dict[str, str | bool | dict]:
"""Return the value as a macro data dict."""
return {
"thumbnail": True,
"url": self["document"].url,
"title": self["title"] or self["document"].title,
"title": {
"text": self["title"] or self["document"].title,
"url": self["document"].url,
},
"description": self["description"],
"metadata": {
"file": {
Expand Down
12 changes: 8 additions & 4 deletions cms/core/tests/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ def test_document_block__block_value(self):
value.as_macro_data(),
{
"thumbnail": True,
"url": self.document.url,
"title": "The block document",
"title": {
"text": "The block document",
"url": self.document.url,
},
"description": RichText("Document description"),
"metadata": {
"file": {
Expand Down Expand Up @@ -69,8 +71,10 @@ def test_documents_block__get_context(self):
[
{
"thumbnail": True,
"url": self.document.url,
"title": "The block document",
"title": {
"text": "The block document",
"url": self.document.url,
},
"description": RichText("Document description"),
"metadata": {
"file": {
Expand Down
16 changes: 5 additions & 11 deletions cms/jinja2/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
{% set languages = languages | default([
{
"url": "#",
"ISOCode": "en",
"isoCode": "en",
"text": "English",
"current": true
},
{
"url": "#",
"ISOCode": "cy",
"isoCode": "cy",
"text": "Cymraeg",
"current": false
}
Expand Down Expand Up @@ -48,9 +48,9 @@
]
}
],
"OGLLink": {
"oglLink": {
"pre": 'All content is available under the',
"link": 'Open Government Licence v3.0',
"text": 'Open Government Licence v3.0',
"url": 'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/',
"post": ', except where otherwise stated'
}
Expand Down Expand Up @@ -106,18 +106,12 @@

{% block preHeader %}

{#
NOTE:
the "settingsLinkTextURL" setting currently doesn't match what's in the guidelines
that's because we're on version 70.0.17 and it has been renamed to "settingsLinkUrl" in 72.0.0
See: https://github.com/ONSdigital/design-system/pull/3300
#}
{# fmt:off #}
{{
onsCookiesBanner({
'lang': "cy" if LANGUAGE_CODE == "cy" else "en",
'serviceName': COOKIE_BANNER_SERVICE_NAME,
'settingsLinkTextURL': MANAGE_COOKIE_SETTINGS_URL,
'settingsLinkURL': MANAGE_COOKIE_SETTINGS_URL,
})
}}
{# fmt:on #}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="ons-u-mb-l national-statistics">
<div class="ons-u-mb-xl national-statistics">
<h2 class="ons-u-fs-m ons-u-flex-ai-c">
<span>{{ _("Accredited Official Statistics") }}</span>
{% include "templates/components/accredited/accredited-logo.html" %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="ons-u-mb-l census-2021">
<div class="ons-u-mb-xl census-2021">
{% include "templates/components/census/census-logo.html" %}
<p>{{ _("This release includes data from Census 2021.") }}</p>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<section id="{{ value.title|slugify() }}" class="ons-u-mb-l">
<section id="{{ value.title|slugify() }}" class="ons-u-mb-xl">
<h2>{{ value.title }}</h2>

<ul class="ons-list ons-list--bare">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ol class="ons-list ons-list--bare ons-u-bt ons-u-mb-l">
<ol class="ons-list ons-list--bare ons-u-bt ons-u-mb-xl">
{% for block in value %}
<li class="ons-list__item">
{% if block.value.link %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% endblock %}

{% block release_note %}
<div class="ons-u-pt-s ons-u-pb-m@m ons-u-pb-s@xxs@m">
<div class="ons-u-pt-s ons-u-pb-l@m ons-u-pb-s@2xs@m">
{% from "components/panel/_macro.njk" import onsPanel %}
{{ onsPanel({"body": page.notice }) }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% endblock %}

{% block release_note %}
<div class="ons-u-pt-s ons-u-pb-m@m ons-u-pb-s@xxs@m">
<div class="ons-u-pt-s ons-u-pb-l@m ons-u-pb-s@2xs@m">
{% from "components/panel/_macro.njk" import onsPanel %}
{% call onsPanel() %}
<p>{{ _("This release is not yet published") }}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% endblock %}

{% block release_note %}
<div class="ons-u-pt-s ons-u-pb-m@m ons-u-pb-s@xxs@m">
<div class="ons-u-pt-s ons-u-pb-l@m ons-u-pb-s@2xs@m">
{% from "components/panel/_macro.njk" import onsPanel %}
{% call onsPanel() %}
<p>{{ _("This release is not yet published") }}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
{% from "components/table-of-contents/_macro.njk" import onsTableOfContents %}

{% block main %}
<div class="ons-u-fs-m ons-u-mt-s ons-u-pb-xxs release__document-type">Release</div>
<h1 class="ons-u-fs-xxxl ons-u-mb-m">
<div class="ons-u-fs-m ons-u-mt-s ons-u-pb-3xs release__document-type">Release</div>
<h1 class="ons-u-fs-3xl ons-u-mb-l">
<span>{{ page.title }}</span>
{% if page.is_accredited %}
{% include "templates/components/accredited/accredited-logo.html" %}
Expand All @@ -23,7 +23,7 @@ <h1 class="ons-u-fs-xxxl ons-u-mb-m">
<span class="ons-u-nowrap">{{ page.release_date|date("DATETIME_FORMAT") or page.release_date_text }}</span>
</div>
{% if page.next_release_date or page.next_release_text %}
<div class="ons-grid__col ons-col-8@m ons-col-12@s ons-u-p-no@xxs@m">
<div class="ons-grid__col ons-col-8@m ons-col-12@s ons-u-p-no@2xs@m">
<span class="ons-u-fs-r--b">{{ _("Next release") }}:</span>
<span class="ons-u-nowrap">{{ page.next_release_date|date("DATETIME_FORMAT") or page.next_release_text }}</span>
</div>
Expand All @@ -47,7 +47,7 @@ <h1 class="ons-u-fs-xxxl ons-u-mb-m">
}}
{# fmt:on #}
</div>
<div class="ons-grid__col ons-col-8@m ons-col-12@s ons-u-p-no@xxs@m">
<div class="ons-grid__col ons-col-8@m ons-col-12@s ons-u-p-no@2xs@m">
{{ page.summary|richtext() }}

{% block release_content %}
Expand Down
2 changes: 1 addition & 1 deletion cms/jinja2/templates/pages/wagtail/password_required.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1>Password required</h1>
{{ form.password.errors }}

{% from "components/password/_macro.njk" import onsPassword %}
<div class="ons-question ons-u-mb-l">
<div class="ons-question ons-u-mb-xl">
{# fmt:off #}
{{
onsPassword({
Expand Down

0 comments on commit 874571d

Please sign in to comment.