From b65e7da1834317fd6e83d122f26ce4df53b2c076 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Wed, 5 Feb 2025 11:02:20 +0000 Subject: [PATCH 01/40] inital configuration --- docs/_includes/layouts/component.njk | 5 +++- docs/_includes/layouts/macros/tier.njk | 30 +++++++++++++++++++ docs/assets/stylesheets/application.scss | 1 + docs/assets/stylesheets/components/_tier.scss | 27 +++++++++++++++++ docs/components/add-another.md | 4 +++ 5 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 docs/_includes/layouts/macros/tier.njk create mode 100644 docs/assets/stylesheets/components/_tier.scss diff --git a/docs/_includes/layouts/component.njk b/docs/_includes/layouts/component.njk index de42d5893..735e2a2bf 100644 --- a/docs/_includes/layouts/component.njk +++ b/docs/_includes/layouts/component.njk @@ -1,12 +1,15 @@ {% extends "./base.njk" %} +{% import "./macros/tier.njk" as macros %} + + {% block content %} + {{ macros.tierLabel(tier, tierMessage, tierLink, tierUrl) }}

{% if not isIndex %}Components{% endif %} {{ title }}

- {{ content | safe }} {% include "./partials/get-help-and-contribute.njk" %} diff --git a/docs/_includes/layouts/macros/tier.njk b/docs/_includes/layouts/macros/tier.njk new file mode 100644 index 000000000..ac14b5b15 --- /dev/null +++ b/docs/_includes/layouts/macros/tier.njk @@ -0,0 +1,30 @@ +{% macro tierLabel(tier, tierMessage, tierUrl) %} + {% if tier %} + + {% set tierClass = "" %} + + {% if tier == "Reviewed" %} + {% set tierClass = "app-tier__content--reviewed" %} + {% elif tier == "Due for review" %} + {% set tierClass = "app-tier__content--due-for-review" %} + {% elif tier == "Community" %} + {% set tierClass = "app-tier__content--community" %} + {% elif tier == "Archived" %} + {% set tierClass = "app-tier__content--archived" %} + {% endif %} + +
+

+ + + {{ tierMessage }} + {% if tierUrl %} + {{ tierUrl }} + {% endif %} + +

+
+ {% endif %} +{% endmacro %} diff --git a/docs/assets/stylesheets/application.scss b/docs/assets/stylesheets/application.scss index e246e74d4..a19c74d0a 100755 --- a/docs/assets/stylesheets/application.scss +++ b/docs/assets/stylesheets/application.scss @@ -29,6 +29,7 @@ $govuk-assets-path: "../" !default; @import "./components/page"; @import "./components/menu-toggle"; @import "./components/app-card"; +@import "./components/tier"; @import "./components/documentation_tabs"; @view-transition { diff --git a/docs/assets/stylesheets/components/_tier.scss b/docs/assets/stylesheets/components/_tier.scss new file mode 100644 index 000000000..680488369 --- /dev/null +++ b/docs/assets/stylesheets/components/_tier.scss @@ -0,0 +1,27 @@ +.app-tier { + background-color: #fff; + padding: 10px 20px; + border-bottom: 1px solid #b1b4b6; + &__content { + &--reviewed { + background-color: rgba(204, 226, 216, 1); + color: rgba(0, 90, 48, 1); + } + &--due-for-review { + background-color: rgba(252, 214, 195, 1); + color: rgba(110, 54, 25, 1); + } + &--due-for-review { + background-color: rgba(252, 214, 195, 1); + color: rgba(110, 54, 25, 1); + } + &--community { + background-color: rgba(187, 212, 234, 1); + color: rgba(12, 45, 74, 1); + } + &--archived { + background-color: rgba(229, 230, 231, 1); + color: rgba(40, 45, 48, 1); + } + } +} diff --git a/docs/components/add-another.md b/docs/components/add-another.md index 4c486e31b..442b592af 100644 --- a/docs/components/add-another.md +++ b/docs/components/add-another.md @@ -1,6 +1,10 @@ --- layout: layouts/component.njk title: Add another +tier: "Archived" +tierMessage: "Created: Aug 2024" +tierLink: "Learn more about 'reviewed' components." +tierUrl: "#" type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/686 eleventyNavigation: From 61170b7ee7306c080a95350d9e2aab47f5d6a836 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Wed, 5 Feb 2025 11:52:20 +0000 Subject: [PATCH 02/40] updates to use phase tag --- docs/_includes/layouts/macros/tier.njk | 8 +++--- docs/assets/stylesheets/components/_tier.scss | 25 ++----------------- docs/components/badge.md | 4 +++ 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/docs/_includes/layouts/macros/tier.njk b/docs/_includes/layouts/macros/tier.njk index ac14b5b15..a67add743 100644 --- a/docs/_includes/layouts/macros/tier.njk +++ b/docs/_includes/layouts/macros/tier.njk @@ -4,13 +4,13 @@ {% set tierClass = "" %} {% if tier == "Reviewed" %} - {% set tierClass = "app-tier__content--reviewed" %} + {% set tierClass = "govuk-tag--green" %} {% elif tier == "Due for review" %} - {% set tierClass = "app-tier__content--due-for-review" %} + {% set tierClass = "govuk-tag--orange" %} {% elif tier == "Community" %} - {% set tierClass = "app-tier__content--community" %} + {% set tierClass = "govuk-tag--light-blue" %} {% elif tier == "Archived" %} - {% set tierClass = "app-tier__content--archived" %} + {% set tierClass = "govuk-tag--grey" %} {% endif %}
diff --git a/docs/assets/stylesheets/components/_tier.scss b/docs/assets/stylesheets/components/_tier.scss index 680488369..fdb24192d 100644 --- a/docs/assets/stylesheets/components/_tier.scss +++ b/docs/assets/stylesheets/components/_tier.scss @@ -1,27 +1,6 @@ + .app-tier { background-color: #fff; padding: 10px 20px; - border-bottom: 1px solid #b1b4b6; - &__content { - &--reviewed { - background-color: rgba(204, 226, 216, 1); - color: rgba(0, 90, 48, 1); - } - &--due-for-review { - background-color: rgba(252, 214, 195, 1); - color: rgba(110, 54, 25, 1); - } - &--due-for-review { - background-color: rgba(252, 214, 195, 1); - color: rgba(110, 54, 25, 1); - } - &--community { - background-color: rgba(187, 212, 234, 1); - color: rgba(12, 45, 74, 1); - } - &--archived { - background-color: rgba(229, 230, 231, 1); - color: rgba(40, 45, 48, 1); - } - } + border-bottom: 1px solid $govuk-border-colour; } diff --git a/docs/components/badge.md b/docs/components/badge.md index fa5b83e7a..ec30c932d 100644 --- a/docs/components/badge.md +++ b/docs/components/badge.md @@ -2,6 +2,10 @@ layout: layouts/component.njk title: Badge type: component +tier: "Reviewed" +tierMessage: "Created: Aug 2024" +tierLink: "Learn more about 'reviewed' components." +tierUrl: "#" githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/687 eleventyNavigation: parent: Components From a638e5be013b099d78edd01e7b1c088b7cd1a828 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Wed, 5 Feb 2025 19:28:00 +0000 Subject: [PATCH 03/40] updates to macro --- docs/_includes/layouts/macros/tier.njk | 37 ++++++++++++-------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/docs/_includes/layouts/macros/tier.njk b/docs/_includes/layouts/macros/tier.njk index a67add743..82a8e188e 100644 --- a/docs/_includes/layouts/macros/tier.njk +++ b/docs/_includes/layouts/macros/tier.njk @@ -1,29 +1,26 @@ -{% macro tierLabel(tier, tierMessage, tierUrl) %} +{% macro tierLabel(tier, tierMessage, tierLink, tierUrl) %} {% if tier %} - - {% set tierClass = "" %} - - {% if tier == "Reviewed" %} - {% set tierClass = "govuk-tag--green" %} - {% elif tier == "Due for review" %} - {% set tierClass = "govuk-tag--orange" %} - {% elif tier == "Community" %} - {% set tierClass = "govuk-tag--light-blue" %} - {% elif tier == "Archived" %} - {% set tierClass = "govuk-tag--grey" %} - {% endif %} + {% set tierClass = { + "Reviewed": "govuk-tag--green", + "Due for review": "govuk-tag--orange", + "Community": "govuk-tag--light-blue", + "Archived": "govuk-tag--grey" + }[tier] or "" %}

- - - {{ tierMessage }} - {% if tierUrl %} - {{ tierUrl }} - {% endif %} + + {% if tierMessage %} + + {{ tierMessage }} {{siteName}} + {% if tierLink %} + {{ tierLink }} + {% endif %} + + {% endif %}

{% endif %} From 2d8e8b3df7c5d16ed061b25f312270e19265bcfb Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Thu, 6 Feb 2025 10:18:42 +0000 Subject: [PATCH 04/40] sticky variation for demo --- docs/_includes/layouts/macros/tier.njk | 2 +- docs/assets/stylesheets/components/_tier.scss | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/_includes/layouts/macros/tier.njk b/docs/_includes/layouts/macros/tier.njk index 82a8e188e..d444c47d5 100644 --- a/docs/_includes/layouts/macros/tier.njk +++ b/docs/_includes/layouts/macros/tier.njk @@ -15,7 +15,7 @@ {% if tierMessage %} - {{ tierMessage }} {{siteName}} + {{ tierMessage }} {% if tierLink %} {{ tierLink }} {% endif %} diff --git a/docs/assets/stylesheets/components/_tier.scss b/docs/assets/stylesheets/components/_tier.scss index fdb24192d..9f392c8b6 100644 --- a/docs/assets/stylesheets/components/_tier.scss +++ b/docs/assets/stylesheets/components/_tier.scss @@ -1,6 +1,8 @@ - .app-tier { - background-color: #fff; - padding: 10px 20px; + background-color: govuk-colour("white"); + padding: govuk-spacing(2) govuk-spacing(4); border-bottom: 1px solid $govuk-border-colour; + position: sticky; + top: 0; + z-index: 1000; } From d49a703608aaca78b3a8e182426b8d9bddb07980 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Thu, 6 Feb 2025 10:34:05 +0000 Subject: [PATCH 05/40] fix font style app over rides --- docs/assets/stylesheets/components/_tier.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/assets/stylesheets/components/_tier.scss b/docs/assets/stylesheets/components/_tier.scss index 9f392c8b6..1f3a2d6e7 100644 --- a/docs/assets/stylesheets/components/_tier.scss +++ b/docs/assets/stylesheets/components/_tier.scss @@ -5,4 +5,13 @@ position: sticky; top: 0; z-index: 1000; + @include govuk-media-query($until: desktop) { + position: relative; + } + p { + @include govuk-font($size: 16, $line-height: 20px); + @include govuk-media-query($until: desktop) { + @include govuk-font($size: 14, $line-height: 16px); + } + } } From 07cef737e44c4337c680c14de56d7676a6bc72fb Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Thu, 6 Feb 2025 15:21:54 +0000 Subject: [PATCH 06/40] work to use included vars --- docs/_includes/layouts/macros/tier.njk | 17 +++++++++++++++-- docs/components/add-another.md | 5 ++--- docs/components/badge.md | 3 +-- docs/content/ArchivedLink.md | 1 + docs/content/ArchivedUrl.md | 0 docs/content/CommunityComponentLink.md | 1 + docs/content/CommunityComponentUrl.md | 1 + docs/content/DueForReviewUrl.md | 1 + docs/content/DueforReviewLink.md | 1 + docs/content/ReviewedLink.md | 1 + docs/content/ReviewedUrl.md | 1 + 11 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 docs/content/ArchivedLink.md create mode 100644 docs/content/ArchivedUrl.md create mode 100644 docs/content/CommunityComponentLink.md create mode 100644 docs/content/CommunityComponentUrl.md create mode 100644 docs/content/DueForReviewUrl.md create mode 100644 docs/content/DueforReviewLink.md create mode 100644 docs/content/ReviewedLink.md create mode 100644 docs/content/ReviewedUrl.md diff --git a/docs/_includes/layouts/macros/tier.njk b/docs/_includes/layouts/macros/tier.njk index d444c47d5..c218cb06f 100644 --- a/docs/_includes/layouts/macros/tier.njk +++ b/docs/_includes/layouts/macros/tier.njk @@ -3,10 +3,21 @@ {% set tierClass = { "Reviewed": "govuk-tag--green", "Due for review": "govuk-tag--orange", - "Community": "govuk-tag--light-blue", + "Community component": "govuk-tag--light-blue", "Archived": "govuk-tag--grey" }[tier] or "" %} + {% set tierLinkSet = { + "Reviewed": "Reviewed", + "Due for review": "DueForReview", + "Community component": "CommunityComponent", + "Archived": "Archived" + }[tier] or "default" %} + + {% set tierDefaultLink = "docs/content/" + tierLinkSet + "Link.md" %} + {% set tierDefaultUrl = "docs/content/" + tierLinkSet +"Url.md" %} + +

{% endif %} diff --git a/docs/content/ArchivedLink.md b/docs/content/ArchivedLink.md index 8cb7a97e2..cd2a8d02e 100644 --- a/docs/content/ArchivedLink.md +++ b/docs/content/ArchivedLink.md @@ -1 +1 @@ -Learn about archived components. \ No newline at end of file +Learn about archived components \ No newline at end of file diff --git a/docs/content/CommunityComponentLink.md b/docs/content/CommunityComponentLink.md index 647f04cd5..e69662868 100644 --- a/docs/content/CommunityComponentLink.md +++ b/docs/content/CommunityComponentLink.md @@ -1 +1 @@ -How to use a community component. \ No newline at end of file +How to use a community component \ No newline at end of file diff --git a/docs/content/DueforReviewLink.md b/docs/content/DueforReviewLink.md index 9fc63354b..f95c3bac7 100644 --- a/docs/content/DueforReviewLink.md +++ b/docs/content/DueforReviewLink.md @@ -1 +1 @@ -Learn more about 'due for review' components. \ No newline at end of file +Learn more about 'due for review' components \ No newline at end of file diff --git a/docs/content/ReviewedLink.md b/docs/content/ReviewedLink.md index b9e441e15..87cd20bce 100644 --- a/docs/content/ReviewedLink.md +++ b/docs/content/ReviewedLink.md @@ -1 +1 @@ -Learn more about 'reviewed' components. \ No newline at end of file +Learn more about 'reviewed' components \ No newline at end of file From 82f4ece580439190e03fd7cf780ea1e507bee30d Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Mon, 10 Feb 2025 10:45:35 +0000 Subject: [PATCH 09/40] format file --- docs/_includes/layouts/component.njk | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_includes/layouts/component.njk b/docs/_includes/layouts/component.njk index 735e2a2bf..adb0e5507 100644 --- a/docs/_includes/layouts/component.njk +++ b/docs/_includes/layouts/component.njk @@ -10,6 +10,7 @@ {% if not isIndex %}Components{% endif %} {{ title }} + {{ content | safe }} {% include "./partials/get-help-and-contribute.njk" %} From 7fdb4de83f1261839b57f6a07e5496a0892950b7 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Mon, 10 Feb 2025 11:04:57 +0000 Subject: [PATCH 10/40] temp update --- docs/content/{DueforReviewLink.md => DueForReviewLink-temp.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/content/{DueforReviewLink.md => DueForReviewLink-temp.md} (100%) diff --git a/docs/content/DueforReviewLink.md b/docs/content/DueForReviewLink-temp.md similarity index 100% rename from docs/content/DueforReviewLink.md rename to docs/content/DueForReviewLink-temp.md From 48130dbd26d7f3d95d724846a28936b6ad94234e Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Mon, 10 Feb 2025 11:05:30 +0000 Subject: [PATCH 11/40] updated file --- docs/content/{DueForReviewLink-temp.md => DueForReviewLink.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/content/{DueForReviewLink-temp.md => DueForReviewLink.md} (100%) diff --git a/docs/content/DueForReviewLink-temp.md b/docs/content/DueForReviewLink.md similarity index 100% rename from docs/content/DueForReviewLink-temp.md rename to docs/content/DueForReviewLink.md From a210ded689fe5c0d9dd3736b2ef1a3d5c92f9ce9 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Mon, 10 Feb 2025 18:52:32 +0000 Subject: [PATCH 12/40] updates following comments --- docs/_data/tierInfo.json | 18 ++++++++++ docs/_includes/layouts/component.njk | 2 +- docs/_includes/layouts/macros/tier.njk | 33 ++++++++----------- docs/assets/stylesheets/components/_tier.scss | 11 +++---- docs/components/add-another.md | 5 ++- docs/components/badge.md | 5 ++- docs/content/ArchivedLink.md | 1 - docs/content/ArchivedUrl.md | 0 docs/content/CommunityComponentLink.md | 1 - docs/content/CommunityComponentUrl.md | 1 - docs/content/DueForReviewLink.md | 1 - docs/content/DueForReviewUrl.md | 1 - docs/content/ReviewedLink.md | 1 - docs/content/ReviewedUrl.md | 1 - 14 files changed, 40 insertions(+), 41 deletions(-) create mode 100644 docs/_data/tierInfo.json delete mode 100644 docs/content/ArchivedLink.md delete mode 100644 docs/content/ArchivedUrl.md delete mode 100644 docs/content/CommunityComponentLink.md delete mode 100644 docs/content/CommunityComponentUrl.md delete mode 100644 docs/content/DueForReviewLink.md delete mode 100644 docs/content/DueForReviewUrl.md delete mode 100644 docs/content/ReviewedLink.md delete mode 100644 docs/content/ReviewedUrl.md diff --git a/docs/_data/tierInfo.json b/docs/_data/tierInfo.json new file mode 100644 index 000000000..b835e871b --- /dev/null +++ b/docs/_data/tierInfo.json @@ -0,0 +1,18 @@ +{ + "Reviewed": { + "link": "#", + "content": "Learn about reviewed components" + }, + "Due for review": { + "link": "#", + "content": "This component is due for review" + }, + "Community component": { + "link": "#", + "content": "This is a community component" + }, + "Archived": { + "link": "#", + "content": "Learn about archived components" + } +} diff --git a/docs/_includes/layouts/component.njk b/docs/_includes/layouts/component.njk index adb0e5507..b1ef33a92 100644 --- a/docs/_includes/layouts/component.njk +++ b/docs/_includes/layouts/component.njk @@ -4,7 +4,7 @@ {% block content %} - {{ macros.tierLabel(tier, tierMessage, tierLink, tierUrl) }} + {{ macros.tierLabel(tier, tierMessage, tierInfo) }}

{% if not isIndex %}Components{% endif %} diff --git a/docs/_includes/layouts/macros/tier.njk b/docs/_includes/layouts/macros/tier.njk index 788b08ace..e7c8a593f 100644 --- a/docs/_includes/layouts/macros/tier.njk +++ b/docs/_includes/layouts/macros/tier.njk @@ -1,5 +1,7 @@ -{% macro tierLabel(tier, tierMessage, tierLink) %} +{% macro tierLabel(tier, tierMessage, tierInfo) %} {% if tier %} + {% set tierData = tierInfo[tier] or {} %} + {% set tierClass = { "Reviewed": "govuk-tag--green", "Due for review": "govuk-tag--orange", @@ -7,35 +9,26 @@ "Archived": "govuk-tag--grey" }[tier] or "" %} - {% set tierLinkSet = { - "Reviewed": "Reviewed", - "Due for review": "DueForReview", - "Community component": "CommunityComponent", - "Archived": "Archived" - }[tier] or "default" %} - - {% set tierDefaultLink = "docs/content/" + tierLinkSet + "Link.md" %} - {% set tierDefaultUrl = "docs/content/" + tierLinkSet +"Url.md" %} - + {% set tierDefaultMessage = tierData.content or "" %} + {% set tierDefaultLink = tierData.link or "" %}

- - {% if tierMessage %} + + {% if tierInfo %} - {{ tierMessage }} - {% if tierLink %} - - {% include tierDefaultLink %} - - . + {{ tierMessage }} + {% if tierDefaultLink %} + + {{tierDefaultMessage}} + . {% endif %} {% endif %}

{% endif %} -{% endmacro %} +{% endmacro %} \ No newline at end of file diff --git a/docs/assets/stylesheets/components/_tier.scss b/docs/assets/stylesheets/components/_tier.scss index 1f3a2d6e7..681da9db2 100644 --- a/docs/assets/stylesheets/components/_tier.scss +++ b/docs/assets/stylesheets/components/_tier.scss @@ -5,13 +5,10 @@ position: sticky; top: 0; z-index: 1000; + p { + @include govuk-font(16); + } @include govuk-media-query($until: desktop) { position: relative; } - p { - @include govuk-font($size: 16, $line-height: 20px); - @include govuk-media-query($until: desktop) { - @include govuk-font($size: 14, $line-height: 16px); - } - } -} +} \ No newline at end of file diff --git a/docs/components/add-another.md b/docs/components/add-another.md index 35a902c29..ad9e5b332 100644 --- a/docs/components/add-another.md +++ b/docs/components/add-another.md @@ -1,9 +1,8 @@ --- layout: layouts/component.njk title: Add another -tier: "Due for review" -tierMessage: "Created: Aug 2024" -tierLink: true +tier: Due for review +tierMessage: October 2025 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/686 eleventyNavigation: diff --git a/docs/components/badge.md b/docs/components/badge.md index 3bcc9c3fd..f12c7a2d3 100644 --- a/docs/components/badge.md +++ b/docs/components/badge.md @@ -2,9 +2,8 @@ layout: layouts/component.njk title: Badge type: component -tier: "Reviewed" -tierMessage: "Created: Aug 2024" -tierLink: true +tier: Reviewed +tierMessage: Created Aug 2024 githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/687 eleventyNavigation: parent: Components diff --git a/docs/content/ArchivedLink.md b/docs/content/ArchivedLink.md deleted file mode 100644 index cd2a8d02e..000000000 --- a/docs/content/ArchivedLink.md +++ /dev/null @@ -1 +0,0 @@ -Learn about archived components \ No newline at end of file diff --git a/docs/content/ArchivedUrl.md b/docs/content/ArchivedUrl.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs/content/CommunityComponentLink.md b/docs/content/CommunityComponentLink.md deleted file mode 100644 index e69662868..000000000 --- a/docs/content/CommunityComponentLink.md +++ /dev/null @@ -1 +0,0 @@ -How to use a community component \ No newline at end of file diff --git a/docs/content/CommunityComponentUrl.md b/docs/content/CommunityComponentUrl.md deleted file mode 100644 index 4287ca861..000000000 --- a/docs/content/CommunityComponentUrl.md +++ /dev/null @@ -1 +0,0 @@ -# \ No newline at end of file diff --git a/docs/content/DueForReviewLink.md b/docs/content/DueForReviewLink.md deleted file mode 100644 index f95c3bac7..000000000 --- a/docs/content/DueForReviewLink.md +++ /dev/null @@ -1 +0,0 @@ -Learn more about 'due for review' components \ No newline at end of file diff --git a/docs/content/DueForReviewUrl.md b/docs/content/DueForReviewUrl.md deleted file mode 100644 index 4287ca861..000000000 --- a/docs/content/DueForReviewUrl.md +++ /dev/null @@ -1 +0,0 @@ -# \ No newline at end of file diff --git a/docs/content/ReviewedLink.md b/docs/content/ReviewedLink.md deleted file mode 100644 index 87cd20bce..000000000 --- a/docs/content/ReviewedLink.md +++ /dev/null @@ -1 +0,0 @@ -Learn more about 'reviewed' components \ No newline at end of file diff --git a/docs/content/ReviewedUrl.md b/docs/content/ReviewedUrl.md deleted file mode 100644 index 4287ca861..000000000 --- a/docs/content/ReviewedUrl.md +++ /dev/null @@ -1 +0,0 @@ -# \ No newline at end of file From 38aaae1168f475ef5c8619d7c782aefbedfe6609 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Tue, 11 Feb 2025 10:11:20 +0000 Subject: [PATCH 13/40] scroll padding applied for tier banner --- docs/assets/stylesheets/application.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/assets/stylesheets/application.scss b/docs/assets/stylesheets/application.scss index a19c74d0a..48e4191c9 100755 --- a/docs/assets/stylesheets/application.scss +++ b/docs/assets/stylesheets/application.scss @@ -35,3 +35,8 @@ $govuk-assets-path: "../" !default; @view-transition { navigation: auto; } + +// Apply scroll padding to ensure focus is visible when tier sticky banner is active +html:has(.app-tier) { + scroll-padding-top: govuk-spacing(8); +} From 0bfcc2a54293c0d0bd0343c5d3e7dcd04bb731a8 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Tue, 11 Feb 2025 10:44:10 +0000 Subject: [PATCH 14/40] updated to support overide values --- docs/_data/tierInfo.json | 8 +++--- docs/_includes/layouts/component.njk | 2 +- docs/_includes/layouts/macros/tier.njk | 34 ++++++++++++++------------ 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/docs/_data/tierInfo.json b/docs/_data/tierInfo.json index b835e871b..d38c91019 100644 --- a/docs/_data/tierInfo.json +++ b/docs/_data/tierInfo.json @@ -1,18 +1,18 @@ { "Reviewed": { "link": "#", - "content": "Learn about reviewed components" + "linkContent": "Learn about reviewed components" }, "Due for review": { "link": "#", - "content": "This component is due for review" + "linkContent": "This component is due for review" }, "Community component": { "link": "#", - "content": "This is a community component" + "linkContent": "This is a community component" }, "Archived": { "link": "#", - "content": "Learn about archived components" + "linkContent": "Learn about archived components" } } diff --git a/docs/_includes/layouts/component.njk b/docs/_includes/layouts/component.njk index b1ef33a92..f6fcd41f1 100644 --- a/docs/_includes/layouts/component.njk +++ b/docs/_includes/layouts/component.njk @@ -4,7 +4,7 @@ {% block content %} - {{ macros.tierLabel(tier, tierMessage, tierInfo) }} + {{ macros.tierLabel(tier, tierMessage, tierInfo, link, linkContent) }}

{% if not isIndex %}Components{% endif %} diff --git a/docs/_includes/layouts/macros/tier.njk b/docs/_includes/layouts/macros/tier.njk index e7c8a593f..92b71441c 100644 --- a/docs/_includes/layouts/macros/tier.njk +++ b/docs/_includes/layouts/macros/tier.njk @@ -1,6 +1,7 @@ -{% macro tierLabel(tier, tierMessage, tierInfo) %} +{% macro tierLabel(tier, tierMessage, tierInfo, link=none, linkContent=none) %} {% if tier %} - {% set tierData = tierInfo[tier] or {} %} + + {% set tierData = (tierInfo[tier] if tierInfo and tier in tierInfo else {}) %} {% set tierClass = { "Reviewed": "govuk-tag--green", @@ -9,26 +10,27 @@ "Archived": "govuk-tag--grey" }[tier] or "" %} - {% set tierDefaultMessage = tierData.content or "" %} - {% set tierDefaultLink = tierData.link or "" %} + {% set tierFinalContent = linkContent or tierData.linkContent or "" %} + {% set tierFinalLink = link or tierData.link or "" %}

- - {% if tierInfo %} - - {{ tierMessage }} - {% if tierDefaultLink %} - - {{tierDefaultMessage}} - . - {% endif %} - - {% endif %} + + + {{ tierMessage }} + + {% if tierFinalLink %} + + {{ tierFinalContent }} + . + {% elif tierFinalContent %} + {{ tierFinalContent }} + {% endif %} +

{% endif %} -{% endmacro %} \ No newline at end of file +{% endmacro %} From bf88890246a6f6a40ae2e5501c09e6d3a04ebd65 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Tue, 11 Feb 2025 11:20:35 +0000 Subject: [PATCH 15/40] updates --- docs/_includes/layouts/macros/tier.njk | 13 +++++-------- docs/components/add-another.md | 3 ++- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/_includes/layouts/macros/tier.njk b/docs/_includes/layouts/macros/tier.njk index 92b71441c..daee656a2 100644 --- a/docs/_includes/layouts/macros/tier.njk +++ b/docs/_includes/layouts/macros/tier.njk @@ -1,6 +1,5 @@ {% macro tierLabel(tier, tierMessage, tierInfo, link=none, linkContent=none) %} {% if tier %} - {% set tierData = (tierInfo[tier] if tierInfo and tier in tierInfo else {}) %} {% set tierClass = { @@ -10,8 +9,8 @@ "Archived": "govuk-tag--grey" }[tier] or "" %} - {% set tierFinalContent = linkContent or tierData.linkContent or "" %} - {% set tierFinalLink = link or tierData.link or "" %} + {% set tierLinkContent = linkContent or tierData.linkContent or "" %} + {% set tierLink = link or tierData.link or "" %}

@@ -22,12 +21,10 @@ {{ tierMessage }} - {% if tierFinalLink %} - - {{ tierFinalContent }} + {% if tierLink %} + + {{ tierLinkContent }} . - {% elif tierFinalContent %} - {{ tierFinalContent }} {% endif %}

diff --git a/docs/components/add-another.md b/docs/components/add-another.md index ad9e5b332..c4a7c2064 100644 --- a/docs/components/add-another.md +++ b/docs/components/add-another.md @@ -2,7 +2,8 @@ layout: layouts/component.njk title: Add another tier: Due for review -tierMessage: October 2025 + + type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/686 eleventyNavigation: From 8e00b56b8691c8f89cdf41a1623d1153fdb70502 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Tue, 11 Feb 2025 13:38:55 +0000 Subject: [PATCH 16/40] add condition to allow for null property to render no link --- docs/_includes/layouts/macros/tier.njk | 11 +++++++++-- docs/assets/stylesheets/components/_tier.scss | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/_includes/layouts/macros/tier.njk b/docs/_includes/layouts/macros/tier.njk index daee656a2..4f0aa6e61 100644 --- a/docs/_includes/layouts/macros/tier.njk +++ b/docs/_includes/layouts/macros/tier.njk @@ -9,7 +9,14 @@ "Archived": "govuk-tag--grey" }[tier] or "" %} - {% set tierLinkContent = linkContent or tierData.linkContent or "" %} + {% if linkContent is not defined %} + {% set tierLinkContent = tierData.linkContent or "" %} + {% elseif linkContent is not none %} + {% set tierLinkContent = linkContent %} + {% else %} + {% set tierLinkContent = "" %} + {% endif %} + {% set tierLink = link or tierData.link or "" %}
@@ -21,7 +28,7 @@ {{ tierMessage }} - {% if tierLink %} + {% if tierLinkContent %} {{ tierLinkContent }} . diff --git a/docs/assets/stylesheets/components/_tier.scss b/docs/assets/stylesheets/components/_tier.scss index 681da9db2..34eec0a3c 100644 --- a/docs/assets/stylesheets/components/_tier.scss +++ b/docs/assets/stylesheets/components/_tier.scss @@ -6,7 +6,7 @@ top: 0; z-index: 1000; p { - @include govuk-font(16); + @include govuk-font-size(16); } @include govuk-media-query($until: desktop) { position: relative; From 4f84a7c78060b571d5dd27005301a3a84fa42556 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Tue, 11 Feb 2025 13:51:59 +0000 Subject: [PATCH 17/40] updated zindex to follow system --- docs/assets/stylesheets/components/_tier.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assets/stylesheets/components/_tier.scss b/docs/assets/stylesheets/components/_tier.scss index 34eec0a3c..5cd49086d 100644 --- a/docs/assets/stylesheets/components/_tier.scss +++ b/docs/assets/stylesheets/components/_tier.scss @@ -4,7 +4,7 @@ border-bottom: 1px solid $govuk-border-colour; position: sticky; top: 0; - z-index: 1000; + z-index: 1; p { @include govuk-font-size(16); } From 865b2b0bd4b7f9060e8d61b59037578289117b59 Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Tue, 18 Feb 2025 10:30:20 +0000 Subject: [PATCH 18/40] docs: adding placeholder content --- docs/design-system-statuses.md | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 docs/design-system-statuses.md diff --git a/docs/design-system-statuses.md b/docs/design-system-statuses.md new file mode 100644 index 000000000..075e55247 --- /dev/null +++ b/docs/design-system-statuses.md @@ -0,0 +1,48 @@ +--- +layout: layouts/content.njk +title: Design System Statuses +eleventyNavigation: + key: Design System Statuses + parent: Using the design system + order: 0 + excerpt: "Design System Statuses." +--- + +Every building block on the MoJ Design System has been given 1 of 4 statuses. This is to help you know how to use them. Each status’ building blocks have been developed in a different way. + +The Design System team is working to bring them all to the ‘established’ status. Building blocks will move between other statuses when they’re developed. They can also be archived. + +Learn how you can [help develop design system building blocks](/get-involved/suggest-a-change/). + +## 1. ‘Experimental’ status (for all community components) + +Anyone can add a building block to the Design System. These are called community components and all start as ‘experimental’. They have no involvement from the MoJ DS team (apart from a brief sense check before being published). + +A community component can be anything from a screenshot to something more developed (with a Figma design and code). They’re a starting point, concept or idea. + +They’re early in development and may not have been considered (or accessibility tested) for use beyond a particular service. They’re not robust components and are only to be used in alpha and beta. + +The community section was created to enable people to share their design work and collaborate. + +## 2. ‘To be reviewed’ status + +These building blocks were added by the community for use by everyone at MoJ. They’re available in Figma and MoJ Frontend. + +The history for these components are not known, and they have not been reviewed recently. The work to review them is not known. They’ll be reviewed and then updated. + +## 3. ‘Official’ status (system building block) + +Follows a review process +Has had a full multi-disciplinary team review +Fully accessible with any mentions of considerations +Reusable In Figma and code +Will be long-term supported and maintained + +You can [view the building blocks which have been developed in this way, and which are planned in the roadmap]. + +## 4. ‘Archived’ status + +Is in archived section of documentation site. +Still exists in front end and Figma + +How we release and version From c51f5dc7fba05691bcfdb836b01e8b9ba0e2b0c3 Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Tue, 18 Feb 2025 10:35:43 +0000 Subject: [PATCH 19/40] docs: update nav order --- docs/design-system-statuses.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/design-system-statuses.md b/docs/design-system-statuses.md index 075e55247..e8d0cc590 100644 --- a/docs/design-system-statuses.md +++ b/docs/design-system-statuses.md @@ -4,7 +4,7 @@ title: Design System Statuses eleventyNavigation: key: Design System Statuses parent: Using the design system - order: 0 + order: 5 excerpt: "Design System Statuses." --- From 8bde44082a0bee29671e4a55aa4746ad7ecaaa91 Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Tue, 18 Feb 2025 16:27:08 +0000 Subject: [PATCH 20/40] docs: Updating content --- docs/design-system-statuses.md | 52 ++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/docs/design-system-statuses.md b/docs/design-system-statuses.md index e8d0cc590..d2fc3bdd7 100644 --- a/docs/design-system-statuses.md +++ b/docs/design-system-statuses.md @@ -1,48 +1,52 @@ --- layout: layouts/content.njk -title: Design System Statuses +title: Design system statuses eleventyNavigation: - key: Design System Statuses + key: Design system statuses parent: Using the design system order: 5 - excerpt: "Design System Statuses." + excerpt: "Design system statuses." --- -Every building block on the MoJ Design System has been given 1 of 4 statuses. This is to help you know how to use them. Each status’ building blocks have been developed in a different way. +Every building block on the MoJ Design System has 1 of 4 statuses. This is to help you know how to use them. The statuses are: -The Design System team is working to bring them all to the ‘established’ status. Building blocks will move between other statuses when they’re developed. They can also be archived. +- Experimental +- To be reviewed +- Official +- Archived + +The Design System team is working to bring everything to the ‘official’ status. Building blocks will move between other statuses when the team develops them. They can also be archived. Learn how you can [help develop design system building blocks](/get-involved/suggest-a-change/). -## 1. ‘Experimental’ status (for all community components) +## ‘Experimental’ status (for all community components) Experimental + +
+ The experimental status will be launched later in 2025. +
-Anyone can add a building block to the Design System. These are called community components and all start as ‘experimental’. They have no involvement from the MoJ DS team (apart from a brief sense check before being published). +When the experimental status launches, anyone will be able to add a building block to the Design System. All of these community components will start as ‘experimental’. They’ll have had a brief sense check from the MoJ Design System team, and then no more involvement. -A community component can be anything from a screenshot to something more developed (with a Figma design and code). They’re a starting point, concept or idea. +An experimental building block can be anything from a screenshot with very brief documentation, to something more developed (with code and a Figma design). They can be used as a starting point, concept or idea. -They’re early in development and may not have been considered (or accessibility tested) for use beyond a particular service. They’re not robust components and are only to be used in alpha and beta. +They’ll be early in development and may not have been considered (or accessibility tested) for use beyond a particular service. They’re only to be used in alpha and beta phases. -The community section was created to enable people to share their design work and collaborate. +This user-led involvement in developing building blocks enables people to share their designs, collaborate and work in the open. -## 2. ‘To be reviewed’ status +## ‘To be reviewed’ status To be reviewed -These building blocks were added by the community for use by everyone at MoJ. They’re available in Figma and MoJ Frontend. +Building blocks with a ‘to be reviewed’ status were added for use by everyone at MoJ, possibly a long time ago. -The history for these components are not known, and they have not been reviewed recently. The work to review them is not known. They’ll be reviewed and then updated. +They have not been reviewed recently and the work to develop them is not known. -## 3. ‘Official’ status (system building block) +## ‘Official’ status Official -Follows a review process -Has had a full multi-disciplinary team review -Fully accessible with any mentions of considerations -Reusable In Figma and code -Will be long-term supported and maintained +When an ‘experimental’ or ‘to be reviewed’ building block gets a full review by the Design System team it becomes ‘official’. -You can [view the building blocks which have been developed in this way, and which are planned in the roadmap]. +This review includes an organisation-wide discovery and multi-disciplinary team input (including accessibility testing). Usage is thoroughly documented. -## 4. ‘Archived’ status +‘Official’ status building blocks can be used in every product phase. They’ll be supported and maintained in the long-term. -Is in archived section of documentation site. -Still exists in front end and Figma +## ‘Archived’ status Archived -How we release and version +Sometimes a building block is no longer needed. This is usually because the need has been met by the [GOV.UK Design System](https://design-system.service.gov.uk/) (which we do not want to duplicate). From d964dc1d16efa9a629c925390b765793614cc3f1 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Wed, 19 Feb 2025 11:47:46 +0000 Subject: [PATCH 21/40] new status banner applied --- docs/_data/statusInfo.json | 18 +++++++++ docs/_data/tierInfo.json | 18 --------- docs/_includes/layouts/archive.njk | 5 ++- docs/_includes/layouts/component.njk | 8 ++-- docs/_includes/layouts/macros/status.njk | 38 ++++++++++++++++++ docs/_includes/layouts/macros/tier.njk | 40 ------------------- docs/_includes/layouts/pages.njk | 5 ++- docs/_includes/layouts/patterns.njk | 5 ++- docs/assets/stylesheets/application.scss | 2 +- .../stylesheets/components/_status.scss | 12 ++++++ docs/assets/stylesheets/components/_tier.scss | 14 ------- docs/components/add-another.md | 5 +-- docs/components/badge.md | 4 +- 13 files changed, 88 insertions(+), 86 deletions(-) create mode 100644 docs/_data/statusInfo.json delete mode 100644 docs/_data/tierInfo.json create mode 100644 docs/_includes/layouts/macros/status.njk delete mode 100644 docs/_includes/layouts/macros/tier.njk create mode 100644 docs/assets/stylesheets/components/_status.scss delete mode 100644 docs/assets/stylesheets/components/_tier.scss diff --git a/docs/_data/statusInfo.json b/docs/_data/statusInfo.json new file mode 100644 index 000000000..df413162d --- /dev/null +++ b/docs/_data/statusInfo.json @@ -0,0 +1,18 @@ +{ + "Official": { + "link": "How ‘official’ components work", + "linkContent": "Components with an ‘official’ status have had a full, multi-disciplinary team review." + }, + "To be reviewed": { + "link": "How ‘to be reviewed’ components work", + "linkContent": "Components with a ‘to be reviewed’ status have been added for use by everyone, but have not been checked or improved recently." + }, + "Experimental": { + "link": "How ‘experimental’ components work", + "linkContent": "Anyone can add an ‘experimental’ status component to the MoJ Design System. They’re early in development and can be used as a starting point." + }, + "Archived": { + "link": "How ‘archived’ components work", + "linkContent": "‘Archived’ components are no longer being supported and should not be used." + } +} diff --git a/docs/_data/tierInfo.json b/docs/_data/tierInfo.json deleted file mode 100644 index d38c91019..000000000 --- a/docs/_data/tierInfo.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "Reviewed": { - "link": "#", - "linkContent": "Learn about reviewed components" - }, - "Due for review": { - "link": "#", - "linkContent": "This component is due for review" - }, - "Community component": { - "link": "#", - "linkContent": "This is a community component" - }, - "Archived": { - "link": "#", - "linkContent": "Learn about archived components" - } -} diff --git a/docs/_includes/layouts/archive.njk b/docs/_includes/layouts/archive.njk index 2ccaa15eb..390800283 100644 --- a/docs/_includes/layouts/archive.njk +++ b/docs/_includes/layouts/archive.njk @@ -1,11 +1,14 @@ {% extends "./base.njk" %} +{% import "./macros/status.njk" as macros %} + {% block content %}
-

+

{% if not isIndex %}Archive{% endif %} {{ title }}

+ {{ macros.statusLabel(status, statusMessage, statusInfo) }} {{ content | safe }}
diff --git a/docs/_includes/layouts/component.njk b/docs/_includes/layouts/component.njk index f6fcd41f1..1279a500f 100644 --- a/docs/_includes/layouts/component.njk +++ b/docs/_includes/layouts/component.njk @@ -1,19 +1,17 @@ {% extends "./base.njk" %} -{% import "./macros/tier.njk" as macros %} +{% import "./macros/status.njk" as macros %} {% block content %} - {{ macros.tierLabel(tier, tierMessage, tierInfo, link, linkContent) }}
-

+

{% if not isIndex %}Components{% endif %} {{ title }}

- + {{ macros.statusLabel(status, statusMessage, statusInfo) }} {{ content | safe }} {% include "./partials/get-help-and-contribute.njk" %} -
{% endblock %} diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk new file mode 100644 index 000000000..8c4bbe114 --- /dev/null +++ b/docs/_includes/layouts/macros/status.njk @@ -0,0 +1,38 @@ +{% from "govuk/components/details/macro.njk" import govukDetails %} + + +{% macro statusLabel(status, statusMessage, statusInfo) %} + {% if status %} + + {% set statusData = (statusInfo[status] if statusInfo and status in statusInfo else {}) %} + + {% set statusClass = { + "Official": "govuk-tag--green", + "To be reviewed": "govuk-tag--orange", + "Experimental": "govuk-tag", + "Archived": "govuk-tag--grey" + }[status] or "" %} + + + Component status: {{ status }} + + +{% if statusMessage %} +

+ {{ statusMessage }} +

+{% endif %} + +
+ + + {{ statusData.link }} + + +
+ {{ statusData.linkContent }} Read about all the Design System statuses. +
+
+ + {% endif %} +{% endmacro %} diff --git a/docs/_includes/layouts/macros/tier.njk b/docs/_includes/layouts/macros/tier.njk deleted file mode 100644 index 4f0aa6e61..000000000 --- a/docs/_includes/layouts/macros/tier.njk +++ /dev/null @@ -1,40 +0,0 @@ -{% macro tierLabel(tier, tierMessage, tierInfo, link=none, linkContent=none) %} - {% if tier %} - {% set tierData = (tierInfo[tier] if tierInfo and tier in tierInfo else {}) %} - - {% set tierClass = { - "Reviewed": "govuk-tag--green", - "Due for review": "govuk-tag--orange", - "Community component": "govuk-tag--light-blue", - "Archived": "govuk-tag--grey" - }[tier] or "" %} - - {% if linkContent is not defined %} - {% set tierLinkContent = tierData.linkContent or "" %} - {% elseif linkContent is not none %} - {% set tierLinkContent = linkContent %} - {% else %} - {% set tierLinkContent = "" %} - {% endif %} - - {% set tierLink = link or tierData.link or "" %} - -
-

- - - - {{ tierMessage }} - - {% if tierLinkContent %} - - {{ tierLinkContent }} - . - {% endif %} - -

-
- {% endif %} -{% endmacro %} diff --git a/docs/_includes/layouts/pages.njk b/docs/_includes/layouts/pages.njk index c6bfca32c..2d6c0ca9a 100644 --- a/docs/_includes/layouts/pages.njk +++ b/docs/_includes/layouts/pages.njk @@ -1,11 +1,14 @@ {% extends "./base.njk" %} +{% import "./macros/status.njk" as macros %} + {% block content %}
-

+

{% if not isIndex %}Pages{% endif %} {{ title }}

+ {{ macros.statusLabel(status, statusMessage, statusInfo) }} {{ content | safe }} {% if isIndex or isArchive %} diff --git a/docs/_includes/layouts/patterns.njk b/docs/_includes/layouts/patterns.njk index 4189a9815..84388cf01 100644 --- a/docs/_includes/layouts/patterns.njk +++ b/docs/_includes/layouts/patterns.njk @@ -1,11 +1,14 @@ {% extends "./base.njk" %} +{% import "./macros/status.njk" as macros %} + {% block content %}
-

+

{% if not isIndex %}Patterns{% endif %} {{ title }}

+ {{ macros.statusLabel(status, statusMessage, statusInfo) }} {{ content | safe }} {% if isIndex or isArchive %} diff --git a/docs/assets/stylesheets/application.scss b/docs/assets/stylesheets/application.scss index 48e4191c9..e182f5374 100755 --- a/docs/assets/stylesheets/application.scss +++ b/docs/assets/stylesheets/application.scss @@ -29,7 +29,7 @@ $govuk-assets-path: "../" !default; @import "./components/page"; @import "./components/menu-toggle"; @import "./components/app-card"; -@import "./components/tier"; +@import "./components/status"; @import "./components/documentation_tabs"; @view-transition { diff --git a/docs/assets/stylesheets/components/_status.scss b/docs/assets/stylesheets/components/_status.scss new file mode 100644 index 000000000..3240ef111 --- /dev/null +++ b/docs/assets/stylesheets/components/_status.scss @@ -0,0 +1,12 @@ +.status-tag { + display: inline-block; + @include govuk-font(16); + box-sizing: border-box; + padding: 7px 10px; + vertical-align: super; + margin-left: 5px; +} + +p.status-message { + color: $govuk-secondary-text-colour; +} diff --git a/docs/assets/stylesheets/components/_tier.scss b/docs/assets/stylesheets/components/_tier.scss deleted file mode 100644 index 5cd49086d..000000000 --- a/docs/assets/stylesheets/components/_tier.scss +++ /dev/null @@ -1,14 +0,0 @@ -.app-tier { - background-color: govuk-colour("white"); - padding: govuk-spacing(2) govuk-spacing(4); - border-bottom: 1px solid $govuk-border-colour; - position: sticky; - top: 0; - z-index: 1; - p { - @include govuk-font-size(16); - } - @include govuk-media-query($until: desktop) { - position: relative; - } -} \ No newline at end of file diff --git a/docs/components/add-another.md b/docs/components/add-another.md index c4a7c2064..6f0d58df4 100644 --- a/docs/components/add-another.md +++ b/docs/components/add-another.md @@ -1,9 +1,8 @@ --- layout: layouts/component.njk title: Add another -tier: Due for review - - +status: To be reviewed +statusMessage: Created by Alic Winters in May 2025. type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/686 eleventyNavigation: diff --git a/docs/components/badge.md b/docs/components/badge.md index f12c7a2d3..560dccbb9 100644 --- a/docs/components/badge.md +++ b/docs/components/badge.md @@ -2,8 +2,8 @@ layout: layouts/component.njk title: Badge type: component -tier: Reviewed -tierMessage: Created Aug 2024 +status: Experimental +statusMessage: Created Aug 2024. githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/687 eleventyNavigation: parent: Components From c3acb357cac36eb5017229dbf97a42d77b25de03 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Wed, 19 Feb 2025 12:40:07 +0000 Subject: [PATCH 22/40] updates to structure --- docs/_includes/layouts/archive.njk | 2 +- docs/_includes/layouts/component.njk | 6 +++--- docs/_includes/layouts/pages.njk | 2 +- docs/_includes/layouts/patterns.njk | 2 +- docs/assets/stylesheets/components/_status.scss | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/_includes/layouts/archive.njk b/docs/_includes/layouts/archive.njk index 390800283..3c1651ea6 100644 --- a/docs/_includes/layouts/archive.njk +++ b/docs/_includes/layouts/archive.njk @@ -4,8 +4,8 @@ {% block content %}
+ {% if not isIndex %}Archive{% endif %}

- {% if not isIndex %}Archive{% endif %} {{ title }}

{{ macros.statusLabel(status, statusMessage, statusInfo) }} diff --git a/docs/_includes/layouts/component.njk b/docs/_includes/layouts/component.njk index 1279a500f..28ecbf073 100644 --- a/docs/_includes/layouts/component.njk +++ b/docs/_includes/layouts/component.njk @@ -2,16 +2,16 @@ {% import "./macros/status.njk" as macros %} - -{% block content %} +{% block content %}
+ {% if not isIndex %}Components{% endif %}

- {% if not isIndex %}Components{% endif %} {{ title }}

{{ macros.statusLabel(status, statusMessage, statusInfo) }} {{ content | safe }} {% include "./partials/get-help-and-contribute.njk" %} +
{% endblock %} diff --git a/docs/_includes/layouts/pages.njk b/docs/_includes/layouts/pages.njk index 2d6c0ca9a..7beea845d 100644 --- a/docs/_includes/layouts/pages.njk +++ b/docs/_includes/layouts/pages.njk @@ -4,8 +4,8 @@ {% block content %}
+ {% if not isIndex %}Pages{% endif %}

- {% if not isIndex %}Pages{% endif %} {{ title }}

{{ macros.statusLabel(status, statusMessage, statusInfo) }} diff --git a/docs/_includes/layouts/patterns.njk b/docs/_includes/layouts/patterns.njk index 84388cf01..036248aba 100644 --- a/docs/_includes/layouts/patterns.njk +++ b/docs/_includes/layouts/patterns.njk @@ -4,8 +4,8 @@ {% block content %}
+ {% if not isIndex %}Patterns{% endif %}

- {% if not isIndex %}Patterns{% endif %} {{ title }}

{{ macros.statusLabel(status, statusMessage, statusInfo) }} diff --git a/docs/assets/stylesheets/components/_status.scss b/docs/assets/stylesheets/components/_status.scss index 3240ef111..69f4e4935 100644 --- a/docs/assets/stylesheets/components/_status.scss +++ b/docs/assets/stylesheets/components/_status.scss @@ -1,10 +1,10 @@ .status-tag { display: inline-block; - @include govuk-font(16); + @include govuk-font(19); box-sizing: border-box; padding: 7px 10px; vertical-align: super; - margin-left: 5px; + margin-left: govuk-spacing(2); } p.status-message { From 2bd009f9f75341582a5c87c6703308db0b1ba36f Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Wed, 19 Feb 2025 12:43:57 +0000 Subject: [PATCH 23/40] updated messaging --- docs/_includes/layouts/macros/status.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk index 8c4bbe114..284758138 100644 --- a/docs/_includes/layouts/macros/status.njk +++ b/docs/_includes/layouts/macros/status.njk @@ -14,7 +14,7 @@ }[status] or "" %} - Component status: {{ status }} + Status: {{ status }} {% if statusMessage %} From ad306ac2001e3cc349b6f2562381bbe58795fd05 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Wed, 19 Feb 2025 16:39:48 +0000 Subject: [PATCH 24/40] removed style --- docs/assets/stylesheets/application.scss | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/assets/stylesheets/application.scss b/docs/assets/stylesheets/application.scss index e182f5374..81316fd07 100755 --- a/docs/assets/stylesheets/application.scss +++ b/docs/assets/stylesheets/application.scss @@ -35,8 +35,3 @@ $govuk-assets-path: "../" !default; @view-transition { navigation: auto; } - -// Apply scroll padding to ensure focus is visible when tier sticky banner is active -html:has(.app-tier) { - scroll-padding-top: govuk-spacing(8); -} From 739e5673ab0cac5ff037e86f315a89c9e3420b1c Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Wed, 19 Feb 2025 16:50:43 +0000 Subject: [PATCH 25/40] applied updates for link and styles --- docs/_includes/layouts/macros/status.njk | 4 ++-- docs/assets/stylesheets/components/_status.scss | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk index 284758138..d248097ff 100644 --- a/docs/_includes/layouts/macros/status.njk +++ b/docs/_includes/layouts/macros/status.njk @@ -13,7 +13,7 @@ "Archived": "govuk-tag--grey" }[status] or "" %} - + Status: {{ status }} @@ -30,7 +30,7 @@
- {{ statusData.linkContent }} Read about all the Design System statuses. + {{ statusData.linkContent }} Read about all the Design System statuses.
diff --git a/docs/assets/stylesheets/components/_status.scss b/docs/assets/stylesheets/components/_status.scss index 69f4e4935..78283ec24 100644 --- a/docs/assets/stylesheets/components/_status.scss +++ b/docs/assets/stylesheets/components/_status.scss @@ -1,8 +1,5 @@ .status-tag { display: inline-block; - @include govuk-font(19); - box-sizing: border-box; - padding: 7px 10px; vertical-align: super; margin-left: govuk-spacing(2); } From 523895373e0905d4ba484dba8c52bb6ef787a5a0 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Thu, 20 Feb 2025 09:29:10 +0000 Subject: [PATCH 26/40] added margin on details --- docs/_includes/layouts/macros/status.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk index d248097ff..e8caf19f1 100644 --- a/docs/_includes/layouts/macros/status.njk +++ b/docs/_includes/layouts/macros/status.njk @@ -23,7 +23,7 @@

{% endif %} -
+
{{ statusData.link }} From 870868415033a60faf74a17cb2fe2ed6e4abe38e Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Thu, 20 Feb 2025 14:06:11 +0000 Subject: [PATCH 27/40] docs: update status props --- docs/_data/statusInfo.json | 12 ++++--- docs/_includes/layouts/component.njk | 2 +- docs/_includes/layouts/macros/status.njk | 40 +++++++++++++++--------- docs/components/add-another.md | 6 ++-- docs/components/badge.md | 2 +- 5 files changed, 39 insertions(+), 23 deletions(-) diff --git a/docs/_data/statusInfo.json b/docs/_data/statusInfo.json index df413162d..ec040e679 100644 --- a/docs/_data/statusInfo.json +++ b/docs/_data/statusInfo.json @@ -1,18 +1,22 @@ { "Official": { "link": "How ‘official’ components work", - "linkContent": "Components with an ‘official’ status have had a full, multi-disciplinary team review." + "linkContent": "Components with an ‘official’ status have had a full, multi-disciplinary team review.", + "statusMessage": "Updated by the MoJ Design System team in " }, "To be reviewed": { "link": "How ‘to be reviewed’ components work", - "linkContent": "Components with a ‘to be reviewed’ status have been added for use by everyone, but have not been checked or improved recently." + "linkContent": "Components with a ‘to be reviewed’ status have been added for use by everyone, but have not been checked or improved recently.", + "statusMessage": "Created in " }, "Experimental": { "link": "How ‘experimental’ components work", - "linkContent": "Anyone can add an ‘experimental’ status component to the MoJ Design System. They’re early in development and can be used as a starting point." + "linkContent": "Anyone can add an ‘experimental’ status component to the MoJ Design System. They’re early in development and can be used as a starting point.", + "statusMessage": "Created " }, "Archived": { "link": "How ‘archived’ components work", - "linkContent": "‘Archived’ components are no longer being supported and should not be used." + "linkContent": "‘Archived’ components are no longer being supported and should not be used.", + "statusMessage": "Archived in " } } diff --git a/docs/_includes/layouts/component.njk b/docs/_includes/layouts/component.njk index 28ecbf073..b09f7b1aa 100644 --- a/docs/_includes/layouts/component.njk +++ b/docs/_includes/layouts/component.njk @@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(status, statusMessage, statusInfo) }} + {{ macros.statusLabel(status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }} {% include "./partials/get-help-and-contribute.njk" %} diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk index e8caf19f1..eadcfb0a7 100644 --- a/docs/_includes/layouts/macros/status.njk +++ b/docs/_includes/layouts/macros/status.njk @@ -1,7 +1,7 @@ {% from "govuk/components/details/macro.njk" import govukDetails %} -{% macro statusLabel(status, statusMessage, statusInfo) %} +{% macro statusLabel(status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) %} {% if status %} {% set statusData = (statusInfo[status] if statusInfo and status in statusInfo else {}) %} @@ -17,22 +17,32 @@ Status: {{ status }}
-{% if statusMessage %}

- {{ statusMessage }} + {% if status == 'Experimental' %} + {% if creatorName and creatorTeam %} + {{ statusData.statusMessage }} by {{ creatorName }} in {{ creatorTeam }} in {{ statusDate }}. + {% elif creatorTeam %} + {{ statusData.statusMessage }} by someone in {{ creatorTeam }} in {{ statusDate }}. + {% elif creatorName %} + {{ statusData.statusMessage }} by {{ creatorName }} in {{ statusDate }}. + {% else %} + {{ statusData.statusMessage }} by someone in the community in {{ statusDate }}. + {% endif %} + {% else %} + {{ statusData.statusMessage }} {{ statusDate }}. + {% endif %}

-{% endif %} - -
- - - {{ statusData.link }} - - -
- {{ statusData.linkContent }} Read about all the Design System statuses. -
-
+ +
+ + + {{ statusData.link }} + + +
+ {{ statusData.linkContent }} Read about all the Design System statuses. +
+
{% endif %} {% endmacro %} diff --git a/docs/components/add-another.md b/docs/components/add-another.md index 6f0d58df4..316fbfa78 100644 --- a/docs/components/add-another.md +++ b/docs/components/add-another.md @@ -1,8 +1,10 @@ --- layout: layouts/component.njk title: Add another -status: To be reviewed -statusMessage: Created by Alic Winters in May 2025. +status: Experimental +creatorName: Alice Winters +creatorTeam: Probation Digital +statusDate: August 2024 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/686 eleventyNavigation: diff --git a/docs/components/badge.md b/docs/components/badge.md index 560dccbb9..3b8ddddc7 100644 --- a/docs/components/badge.md +++ b/docs/components/badge.md @@ -3,7 +3,7 @@ layout: layouts/component.njk title: Badge type: component status: Experimental -statusMessage: Created Aug 2024. +statusDate: August 2024 githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/687 eleventyNavigation: parent: Components From 7a2f52eee0351a2b0a24010bbfe4632489abf2d9 Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Thu, 20 Feb 2025 14:44:56 +0000 Subject: [PATCH 28/40] docs: add status options to other templates --- docs/_includes/layouts/archive.njk | 2 +- docs/_includes/layouts/pages.njk | 2 +- docs/_includes/layouts/patterns.njk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_includes/layouts/archive.njk b/docs/_includes/layouts/archive.njk index 3c1651ea6..f87b217ab 100644 --- a/docs/_includes/layouts/archive.njk +++ b/docs/_includes/layouts/archive.njk @@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(status, statusMessage, statusInfo) }} + {{ macros.statusLabel(status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }}
diff --git a/docs/_includes/layouts/pages.njk b/docs/_includes/layouts/pages.njk index 7beea845d..b61fe6a0b 100644 --- a/docs/_includes/layouts/pages.njk +++ b/docs/_includes/layouts/pages.njk @@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(status, statusMessage, statusInfo) }} + {{ macros.statusLabel(status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }} {% if isIndex or isArchive %} diff --git a/docs/_includes/layouts/patterns.njk b/docs/_includes/layouts/patterns.njk index 036248aba..4666172d5 100644 --- a/docs/_includes/layouts/patterns.njk +++ b/docs/_includes/layouts/patterns.njk @@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(status, statusMessage, statusInfo) }} + {{ macros.statusLabel(status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }} {% if isIndex or isArchive %} From 2972bc4be0a936b7ac5d9719ded1cdd88f65a1e1 Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Thu, 20 Feb 2025 15:16:10 +0000 Subject: [PATCH 29/40] docs: apply statuses to building blocks Apply to components, patterns, pages and archived. --- docs/archive/currency-input.md | 2 ++ docs/archive/form-validator.md | 2 ++ docs/archive/password-reveal.md | 2 ++ docs/archive/question-pages.md | 2 ++ docs/archive/rich-text-editor.md | 2 ++ docs/archive/tag.md | 2 ++ docs/archive/task-list.md | 2 ++ docs/components/add-another.md | 6 ++---- docs/components/badge.md | 4 ++-- docs/components/banner.md | 2 ++ docs/components/button-menu.md | 2 ++ docs/components/date-picker.md | 2 ++ docs/components/filter.md | 2 ++ docs/components/header.md | 2 ++ docs/components/identity-bar.md | 2 ++ docs/components/interruption-card.md | 2 ++ docs/components/messages.md | 2 ++ docs/components/multi-file-upload.md | 2 ++ docs/components/multi-select.md | 2 ++ docs/components/notification-badge.md | 2 ++ docs/components/organisation-switcher.md | 2 ++ docs/components/page-header-actions.md | 2 ++ docs/components/pagination.md | 2 ++ docs/components/primary-navigation.md | 2 ++ docs/components/scrollable-pane.md | 2 ++ docs/components/search.md | 2 ++ docs/components/side-navigation.md | 2 ++ docs/components/sortable-table.md | 2 ++ docs/components/sub-navigation.md | 2 ++ docs/components/ticket-panel.md | 2 ++ docs/components/timeline.md | 2 ++ docs/pages/case-list.md | 2 ++ docs/patterns/add-to-a-list.md | 2 ++ docs/patterns/filter-a-list.md | 2 ++ docs/patterns/get-help.md | 2 ++ docs/patterns/upload-files.md | 2 ++ 36 files changed, 72 insertions(+), 6 deletions(-) diff --git a/docs/archive/currency-input.md b/docs/archive/currency-input.md index a13dfc223..860aba4ed 100644 --- a/docs/archive/currency-input.md +++ b/docs/archive/currency-input.md @@ -1,6 +1,8 @@ --- layout: layouts/archive.njk title: Currency input +status: Archived +statusDate: June 2021 type: component redirect_from: /components/currency-input eleventyNavigation: diff --git a/docs/archive/form-validator.md b/docs/archive/form-validator.md index e31b6e904..369c77d79 100644 --- a/docs/archive/form-validator.md +++ b/docs/archive/form-validator.md @@ -1,6 +1,8 @@ --- layout: layouts/archive.njk title: Form validator +status: Archived +statusDate: April 2022 redirect_from: /components/form-validator eleventyNavigation: key: Form validator diff --git a/docs/archive/password-reveal.md b/docs/archive/password-reveal.md index e84ea0155..ad7f75fcd 100644 --- a/docs/archive/password-reveal.md +++ b/docs/archive/password-reveal.md @@ -1,6 +1,8 @@ --- layout: layouts/archive.njk title: Password reveal +status: Archived +statusDate: November 2024 type: component redirect_from: /components/password-reveal githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/709 diff --git a/docs/archive/question-pages.md b/docs/archive/question-pages.md index 9c701feee..d0a61eb56 100644 --- a/docs/archive/question-pages.md +++ b/docs/archive/question-pages.md @@ -1,6 +1,8 @@ --- layout: layouts/archive.njk title: Question pages +status: Archived +statusDate: December 2023 redirect_from: [docs/patterns/question-pages.md, /pages/question-pages] eleventyNavigation: key: Question page diff --git a/docs/archive/rich-text-editor.md b/docs/archive/rich-text-editor.md index 12839ec65..939a65c9d 100644 --- a/docs/archive/rich-text-editor.md +++ b/docs/archive/rich-text-editor.md @@ -1,6 +1,8 @@ --- layout: layouts/archive.njk title: Rich text editor +status: Archived +statusDate: April 2022 redirect_from: /components/rich-text-editor eleventyNavigation: key: Rich text editor diff --git a/docs/archive/tag.md b/docs/archive/tag.md index fb876c17b..d0f64b568 100644 --- a/docs/archive/tag.md +++ b/docs/archive/tag.md @@ -1,6 +1,8 @@ --- layout: layouts/archive.njk title: Tag +status: Archived +statusDate: June 2021 redirect_from: /components/tag eleventyNavigation: key: Tag diff --git a/docs/archive/task-list.md b/docs/archive/task-list.md index 72af654cd..65c137f0b 100644 --- a/docs/archive/task-list.md +++ b/docs/archive/task-list.md @@ -1,6 +1,8 @@ --- layout: layouts/archive.njk title: Task list pages +status: Archived +statusDate: December 2023 redirect_from: [docs/patterns/task-list.md, /pages/task-list] eleventyNavigation: key: Task list page diff --git a/docs/components/add-another.md b/docs/components/add-another.md index 316fbfa78..851a6481e 100644 --- a/docs/components/add-another.md +++ b/docs/components/add-another.md @@ -1,10 +1,8 @@ --- layout: layouts/component.njk title: Add another -status: Experimental -creatorName: Alice Winters -creatorTeam: Probation Digital -statusDate: August 2024 +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/686 eleventyNavigation: diff --git a/docs/components/badge.md b/docs/components/badge.md index 3b8ddddc7..00dce99dd 100644 --- a/docs/components/badge.md +++ b/docs/components/badge.md @@ -2,8 +2,8 @@ layout: layouts/component.njk title: Badge type: component -status: Experimental -statusDate: August 2024 +status: To be reviewed +statusDate: June 2021 githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/687 eleventyNavigation: parent: Components diff --git a/docs/components/banner.md b/docs/components/banner.md index 3a37f3c76..cca72a1fd 100644 --- a/docs/components/banner.md +++ b/docs/components/banner.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Banner +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/835 eleventyNavigation: diff --git a/docs/components/button-menu.md b/docs/components/button-menu.md index 1f3f0d4ee..7e71f76cb 100644 --- a/docs/components/button-menu.md +++ b/docs/components/button-menu.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Button menu +status: Official +statusDate: October 2024 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/685 eleventyNavigation: diff --git a/docs/components/date-picker.md b/docs/components/date-picker.md index bc12c96a7..97448f220 100644 --- a/docs/components/date-picker.md +++ b/docs/components/date-picker.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Date picker +status: Official +statusDate: July 2024 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/703 eleventyNavigation: diff --git a/docs/components/filter.md b/docs/components/filter.md index 3bdaaf5cb..77eed4709 100644 --- a/docs/components/filter.md +++ b/docs/components/filter.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Filter +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/197 eleventyNavigation: diff --git a/docs/components/header.md b/docs/components/header.md index d07d4035a..606ef315c 100644 --- a/docs/components/header.md +++ b/docs/components/header.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Header +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/246 eleventyNavigation: diff --git a/docs/components/identity-bar.md b/docs/components/identity-bar.md index 49814b670..2d89e1858 100644 --- a/docs/components/identity-bar.md +++ b/docs/components/identity-bar.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Identity bar +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/704 eleventyNavigation: diff --git a/docs/components/interruption-card.md b/docs/components/interruption-card.md index 600acd649..683122395 100644 --- a/docs/components/interruption-card.md +++ b/docs/components/interruption-card.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Interruption card +status: Official +statusDate: December 2024 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/421 eleventyNavigation: diff --git a/docs/components/messages.md b/docs/components/messages.md index 9444accae..3a9b62050 100644 --- a/docs/components/messages.md +++ b/docs/components/messages.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Messages +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/705 eleventyNavigation: diff --git a/docs/components/multi-file-upload.md b/docs/components/multi-file-upload.md index 2d436b129..7b7d37bb6 100644 --- a/docs/components/multi-file-upload.md +++ b/docs/components/multi-file-upload.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Multi file upload +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/264 eleventyNavigation: diff --git a/docs/components/multi-select.md b/docs/components/multi-select.md index ba4c1eb3f..b6d6d0d1c 100644 --- a/docs/components/multi-select.md +++ b/docs/components/multi-select.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Multi select +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/206 eleventyNavigation: diff --git a/docs/components/notification-badge.md b/docs/components/notification-badge.md index 1fefcb255..697343174 100644 --- a/docs/components/notification-badge.md +++ b/docs/components/notification-badge.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Notification badge +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/706 eleventyNavigation: diff --git a/docs/components/organisation-switcher.md b/docs/components/organisation-switcher.md index 2c3aa2fc1..4a705b3aa 100644 --- a/docs/components/organisation-switcher.md +++ b/docs/components/organisation-switcher.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Organisation switcher +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/239 eleventyNavigation: diff --git a/docs/components/page-header-actions.md b/docs/components/page-header-actions.md index a88b3629c..f13acff64 100644 --- a/docs/components/page-header-actions.md +++ b/docs/components/page-header-actions.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Page header actions +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/707 eleventyNavigation: diff --git a/docs/components/pagination.md b/docs/components/pagination.md index aab0a20c1..45e074d88 100644 --- a/docs/components/pagination.md +++ b/docs/components/pagination.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Pagination +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/708 eleventyNavigation: diff --git a/docs/components/primary-navigation.md b/docs/components/primary-navigation.md index e8dcb7fc5..8a04dc493 100644 --- a/docs/components/primary-navigation.md +++ b/docs/components/primary-navigation.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Primary navigation +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/710 eleventyNavigation: diff --git a/docs/components/scrollable-pane.md b/docs/components/scrollable-pane.md index 82f18b74c..eb45f7b31 100644 --- a/docs/components/scrollable-pane.md +++ b/docs/components/scrollable-pane.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Scrollable pane +status: To be reviewed +statusDate: November 2022 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/711 eleventyNavigation: diff --git a/docs/components/search.md b/docs/components/search.md index 6c1a7e285..2c9b0131e 100644 --- a/docs/components/search.md +++ b/docs/components/search.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Search +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/712 eleventyNavigation: diff --git a/docs/components/side-navigation.md b/docs/components/side-navigation.md index 5798899a3..9787688dd 100644 --- a/docs/components/side-navigation.md +++ b/docs/components/side-navigation.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Side navigation +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/713 eleventyNavigation: diff --git a/docs/components/sortable-table.md b/docs/components/sortable-table.md index 56df75d82..11b5b1862 100644 --- a/docs/components/sortable-table.md +++ b/docs/components/sortable-table.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Sortable table +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/269 eleventyNavigation: diff --git a/docs/components/sub-navigation.md b/docs/components/sub-navigation.md index 18d64e5f1..6a7892fb1 100644 --- a/docs/components/sub-navigation.md +++ b/docs/components/sub-navigation.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Sub navigation +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/714 eleventyNavigation: diff --git a/docs/components/ticket-panel.md b/docs/components/ticket-panel.md index df2ee6c88..3b42bc34d 100644 --- a/docs/components/ticket-panel.md +++ b/docs/components/ticket-panel.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Ticket Panel +status: To be reviewed +statusDate: July 2022 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/715 eleventyNavigation: diff --git a/docs/components/timeline.md b/docs/components/timeline.md index a4cce8b43..3a0325694 100644 --- a/docs/components/timeline.md +++ b/docs/components/timeline.md @@ -1,6 +1,8 @@ --- layout: layouts/component.njk title: Timeline +status: To be reviewed +statusDate: June 2021 type: component githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/716 eleventyNavigation: diff --git a/docs/pages/case-list.md b/docs/pages/case-list.md index 9dcce09a4..eea98e5d0 100644 --- a/docs/pages/case-list.md +++ b/docs/pages/case-list.md @@ -1,6 +1,8 @@ --- layout: layouts/pages.njk title: Case list pages +status: To be reviewed +statusDate: September 2021 type: page redirect_from: docs/patterns/case-list.md githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/242 diff --git a/docs/patterns/add-to-a-list.md b/docs/patterns/add-to-a-list.md index 5da4f6c21..636bb4888 100644 --- a/docs/patterns/add-to-a-list.md +++ b/docs/patterns/add-to-a-list.md @@ -1,6 +1,8 @@ --- layout: layouts/patterns.njk title: Add to a list +status: To be reviewed +statusDate: July 2021 type: pattern githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/203 eleventyNavigation: diff --git a/docs/patterns/filter-a-list.md b/docs/patterns/filter-a-list.md index d5988bc5d..bfcbd152d 100644 --- a/docs/patterns/filter-a-list.md +++ b/docs/patterns/filter-a-list.md @@ -1,6 +1,8 @@ --- layout: layouts/patterns.njk title: Filter a list +status: To be reviewed +statusDate: June 2021 type: pattern githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/717 eleventyNavigation: diff --git a/docs/patterns/get-help.md b/docs/patterns/get-help.md index 8719fd2c5..c9da4dc34 100644 --- a/docs/patterns/get-help.md +++ b/docs/patterns/get-help.md @@ -1,6 +1,8 @@ --- layout: layouts/patterns.njk title: Get help +status: To be reviewed +statusDate: June 2021 type: pattern githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/718 eleventyNavigation: diff --git a/docs/patterns/upload-files.md b/docs/patterns/upload-files.md index f9c4891ee..cd0c0028f 100644 --- a/docs/patterns/upload-files.md +++ b/docs/patterns/upload-files.md @@ -1,6 +1,8 @@ --- layout: layouts/patterns.njk title: Upload files +status: To be reviewed +statusDate: June 2021 type: pattern githuburl: https://github.com/ministryofjustice/moj-frontend/discussions/719 eleventyNavigation: From 3634215e6d3c3d4bb94ba8df6cabf24ceaa3030f Mon Sep 17 00:00:00 2001 From: Murray Lippiatt Date: Thu, 20 Feb 2025 15:26:32 +0000 Subject: [PATCH 30/40] docs: add aria-hidden to decorative tags --- docs/design-system-statuses.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/design-system-statuses.md b/docs/design-system-statuses.md index d2fc3bdd7..22a30de18 100644 --- a/docs/design-system-statuses.md +++ b/docs/design-system-statuses.md @@ -19,7 +19,7 @@ The Design System team is working to bring everything to the ‘official’ stat Learn how you can [help develop design system building blocks](/get-involved/suggest-a-change/). -## ‘Experimental’ status (for all community components) Experimental +## ‘Experimental’ status (for all community components)
The experimental status will be launched later in 2025. @@ -33,13 +33,13 @@ They’ll be early in development and may not have been considered (or accessibi This user-led involvement in developing building blocks enables people to share their designs, collaborate and work in the open. -## ‘To be reviewed’ status To be reviewed +## ‘To be reviewed’ status Building blocks with a ‘to be reviewed’ status were added for use by everyone at MoJ, possibly a long time ago. They have not been reviewed recently and the work to develop them is not known. -## ‘Official’ status Official +## ‘Official’ status When an ‘experimental’ or ‘to be reviewed’ building block gets a full review by the Design System team it becomes ‘official’. @@ -47,6 +47,6 @@ This review includes an organisation-wide discovery and multi-disciplinary team ‘Official’ status building blocks can be used in every product phase. They’ll be supported and maintained in the long-term. -## ‘Archived’ status Archived +## ‘Archived’ status Sometimes a building block is no longer needed. This is usually because the need has been met by the [GOV.UK Design System](https://design-system.service.gov.uk/) (which we do not want to duplicate). From 474e6c9930a6545d3095d61c71c7e64ea55e5ccb Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Thu, 20 Feb 2025 17:21:03 +0000 Subject: [PATCH 31/40] updated logic for display of status and type --- docs/_data/statusInfo.json | 16 ++++++++-------- docs/_includes/layouts/archive.njk | 2 +- docs/_includes/layouts/component.njk | 2 +- docs/_includes/layouts/macros/status.njk | 22 ++++++++++++++++++---- docs/_includes/layouts/pages.njk | 2 +- docs/_includes/layouts/patterns.njk | 2 +- docs/archive/form-validator.md | 1 + docs/archive/question-pages.md | 1 + docs/archive/rich-text-editor.md | 1 + docs/archive/tag.md | 1 + docs/archive/task-list.md | 1 + 11 files changed, 35 insertions(+), 16 deletions(-) diff --git a/docs/_data/statusInfo.json b/docs/_data/statusInfo.json index ec040e679..369554bdc 100644 --- a/docs/_data/statusInfo.json +++ b/docs/_data/statusInfo.json @@ -1,22 +1,22 @@ { "Official": { - "link": "How ‘official’ components work", - "linkContent": "Components with an ‘official’ status have had a full, multi-disciplinary team review.", + "link": "How ‘official’ types work", + "linkContent": "Types with an ‘official’ status have had a full, multi-disciplinary team review.", "statusMessage": "Updated by the MoJ Design System team in " }, "To be reviewed": { - "link": "How ‘to be reviewed’ components work", - "linkContent": "Components with a ‘to be reviewed’ status have been added for use by everyone, but have not been checked or improved recently.", + "link": "How ‘to be reviewed’ types work", + "linkContent": "Types with a ‘to be reviewed’ status have been added for use by everyone, but have not been checked or improved recently.", "statusMessage": "Created in " }, "Experimental": { - "link": "How ‘experimental’ components work", - "linkContent": "Anyone can add an ‘experimental’ status component to the MoJ Design System. They’re early in development and can be used as a starting point.", + "link": "How ‘experimental’ types work", + "linkContent": "Anyone can add an ‘experimental’ status type to the MoJ Design System. They’re early in development and can be used as a starting point.", "statusMessage": "Created " }, "Archived": { - "link": "How ‘archived’ components work", - "linkContent": "‘Archived’ components are no longer being supported and should not be used.", + "link": "How ‘archived’ types work", + "linkContent": "‘Archived’ types are no longer being supported and should not be used.", "statusMessage": "Archived in " } } diff --git a/docs/_includes/layouts/archive.njk b/docs/_includes/layouts/archive.njk index f87b217ab..1ef91a94b 100644 --- a/docs/_includes/layouts/archive.njk +++ b/docs/_includes/layouts/archive.njk @@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} + {{ macros.statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }}
diff --git a/docs/_includes/layouts/component.njk b/docs/_includes/layouts/component.njk index b09f7b1aa..bb340738a 100644 --- a/docs/_includes/layouts/component.njk +++ b/docs/_includes/layouts/component.njk @@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} + {{ macros.statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }} {% include "./partials/get-help-and-contribute.njk" %} diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk index eadcfb0a7..5d11500ce 100644 --- a/docs/_includes/layouts/macros/status.njk +++ b/docs/_includes/layouts/macros/status.njk @@ -1,9 +1,11 @@ {% from "govuk/components/details/macro.njk" import govukDetails %} -{% macro statusLabel(status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) %} +{% macro statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) %} {% if status %} + + {% set statusData = (statusInfo[status] if statusInfo and status in statusInfo else {}) %} {% set statusClass = { @@ -12,7 +14,8 @@ "Experimental": "govuk-tag", "Archived": "govuk-tag--grey" }[status] or "" %} - + + Status: {{ status }} @@ -36,11 +39,22 @@
- {{ statusData.link }} + {{ statusInfo[status].link + | replace('Types', type | capitalize + 's') + | replace('types', type | lower + 's') + | replace('Type', type | capitalize) + | replace('type', type | lower) + }}
- {{ statusData.linkContent }} Read about all the Design System statuses. + {{ statusInfo[status].linkContent + | replace('Types', type | capitalize + 's') + | replace('types', type | lower + 's') + | replace('Type', type | capitalize) + | replace('type', type | lower) + }} + Read about all the Design System statuses.
diff --git a/docs/_includes/layouts/pages.njk b/docs/_includes/layouts/pages.njk index b61fe6a0b..ddc25e6dd 100644 --- a/docs/_includes/layouts/pages.njk +++ b/docs/_includes/layouts/pages.njk @@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} + {{ macros.statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }} {% if isIndex or isArchive %} diff --git a/docs/_includes/layouts/patterns.njk b/docs/_includes/layouts/patterns.njk index 4666172d5..8db25c986 100644 --- a/docs/_includes/layouts/patterns.njk +++ b/docs/_includes/layouts/patterns.njk @@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} + {{ macros.statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }} {% if isIndex or isArchive %} diff --git a/docs/archive/form-validator.md b/docs/archive/form-validator.md index 369c77d79..3f2f4f6d7 100644 --- a/docs/archive/form-validator.md +++ b/docs/archive/form-validator.md @@ -2,6 +2,7 @@ layout: layouts/archive.njk title: Form validator status: Archived +type: component statusDate: April 2022 redirect_from: /components/form-validator eleventyNavigation: diff --git a/docs/archive/question-pages.md b/docs/archive/question-pages.md index d0a61eb56..771c8df80 100644 --- a/docs/archive/question-pages.md +++ b/docs/archive/question-pages.md @@ -2,6 +2,7 @@ layout: layouts/archive.njk title: Question pages status: Archived +type: page statusDate: December 2023 redirect_from: [docs/patterns/question-pages.md, /pages/question-pages] eleventyNavigation: diff --git a/docs/archive/rich-text-editor.md b/docs/archive/rich-text-editor.md index 939a65c9d..5650169dc 100644 --- a/docs/archive/rich-text-editor.md +++ b/docs/archive/rich-text-editor.md @@ -2,6 +2,7 @@ layout: layouts/archive.njk title: Rich text editor status: Archived +type: component statusDate: April 2022 redirect_from: /components/rich-text-editor eleventyNavigation: diff --git a/docs/archive/tag.md b/docs/archive/tag.md index d0f64b568..8f931b7e7 100644 --- a/docs/archive/tag.md +++ b/docs/archive/tag.md @@ -2,6 +2,7 @@ layout: layouts/archive.njk title: Tag status: Archived +type: component statusDate: June 2021 redirect_from: /components/tag eleventyNavigation: diff --git a/docs/archive/task-list.md b/docs/archive/task-list.md index 65c137f0b..0c19f93af 100644 --- a/docs/archive/task-list.md +++ b/docs/archive/task-list.md @@ -1,6 +1,7 @@ --- layout: layouts/archive.njk title: Task list pages +type: page status: Archived statusDate: December 2023 redirect_from: [docs/patterns/task-list.md, /pages/task-list] From 69023993663f1d725f3bcde93f18c71c066a1ac1 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Fri, 21 Feb 2025 09:05:06 +0000 Subject: [PATCH 32/40] updates to logic --- docs/_data/statusInfo.json | 16 ++++----- docs/_includes/layouts/macros/status.njk | 43 ++++++++++++------------ 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/docs/_data/statusInfo.json b/docs/_data/statusInfo.json index 369554bdc..ec040e679 100644 --- a/docs/_data/statusInfo.json +++ b/docs/_data/statusInfo.json @@ -1,22 +1,22 @@ { "Official": { - "link": "How ‘official’ types work", - "linkContent": "Types with an ‘official’ status have had a full, multi-disciplinary team review.", + "link": "How ‘official’ components work", + "linkContent": "Components with an ‘official’ status have had a full, multi-disciplinary team review.", "statusMessage": "Updated by the MoJ Design System team in " }, "To be reviewed": { - "link": "How ‘to be reviewed’ types work", - "linkContent": "Types with a ‘to be reviewed’ status have been added for use by everyone, but have not been checked or improved recently.", + "link": "How ‘to be reviewed’ components work", + "linkContent": "Components with a ‘to be reviewed’ status have been added for use by everyone, but have not been checked or improved recently.", "statusMessage": "Created in " }, "Experimental": { - "link": "How ‘experimental’ types work", - "linkContent": "Anyone can add an ‘experimental’ status type to the MoJ Design System. They’re early in development and can be used as a starting point.", + "link": "How ‘experimental’ components work", + "linkContent": "Anyone can add an ‘experimental’ status component to the MoJ Design System. They’re early in development and can be used as a starting point.", "statusMessage": "Created " }, "Archived": { - "link": "How ‘archived’ types work", - "linkContent": "‘Archived’ types are no longer being supported and should not be used.", + "link": "How ‘archived’ components work", + "linkContent": "‘Archived’ components are no longer being supported and should not be used.", "statusMessage": "Archived in " } } diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk index 5d11500ce..18c3c4e20 100644 --- a/docs/_includes/layouts/macros/status.njk +++ b/docs/_includes/layouts/macros/status.njk @@ -20,39 +20,40 @@ Status: {{ status }} -

+

+ {{ statusData.statusMessage }} {% if status == 'Experimental' %} - {% if creatorName and creatorTeam %} - {{ statusData.statusMessage }} by {{ creatorName }} in {{ creatorTeam }} in {{ statusDate }}. - {% elif creatorTeam %} - {{ statusData.statusMessage }} by someone in {{ creatorTeam }} in {{ statusDate }}. - {% elif creatorName %} - {{ statusData.statusMessage }} by {{ creatorName }} in {{ statusDate }}. - {% else %} - {{ statusData.statusMessage }} by someone in the community in {{ statusDate }}. - {% endif %} - {% else %} - {{ statusData.statusMessage }} {{ statusDate }}. + by + {% if creatorName and creatorTeam %} + {{ creatorName }} in {{ creatorTeam }} + {% elif creatorName %} + {{ creatorName }} + {% elif creatorTeam %} + someone in {{ creatorTeam }} + {% else %} + someone in the community + {% endif %} {% endif %} -

+ {% if statusDate %} in {{ statusDate }}{% endif %}. +

{{ statusInfo[status].link - | replace('Types', type | capitalize + 's') - | replace('types', type | lower + 's') - | replace('Type', type | capitalize) - | replace('type', type | lower) + | replace('Components', type | capitalize + 's') + | replace('components', type | lower + 's') + | replace('Component', type | capitalize) + | replace('component', type | lower) }}
{{ statusInfo[status].linkContent - | replace('Types', type | capitalize + 's') - | replace('types', type | lower + 's') - | replace('Type', type | capitalize) - | replace('type', type | lower) + | replace('Components', type | capitalize + 's') + | replace('components', type | lower + 's') + | replace('Component', type | capitalize) + | replace('component', type | lower) }} Read about all the Design System statuses.
From 1d1a05ea49d52f47065e52a724ba4de291f4fed7 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Fri, 21 Feb 2025 10:01:51 +0000 Subject: [PATCH 33/40] updates --- docs/_includes/layouts/macros/status.njk | 25 ++++++++++-------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk index 18c3c4e20..27955147d 100644 --- a/docs/_includes/layouts/macros/status.njk +++ b/docs/_includes/layouts/macros/status.njk @@ -20,21 +20,16 @@ Status: {{ status }} -

- {{ statusData.statusMessage }} - {% if status == 'Experimental' %} - by - {% if creatorName and creatorTeam %} - {{ creatorName }} in {{ creatorTeam }} - {% elif creatorName %} - {{ creatorName }} - {% elif creatorTeam %} - someone in {{ creatorTeam }} - {% else %} - someone in the community - {% endif %} - {% endif %} - {% if statusDate %} in {{ statusDate }}{% endif %}. +

+ {{ statusData.statusMessage }}{% if status == 'Experimental' %} by{%- if creatorName and creatorTeam %} + {{ creatorName }} in {{ creatorTeam }} + {%- elif creatorName %} + {{ creatorName }} + {%- elif creatorTeam %} + someone in {{ creatorTeam }} + {%- else %} + someone in the community + {%- endif %}{% endif %}{% if statusDate %} in {{ statusDate }}{% endif %}.

From 4a3bb28dd4b9adde6e511a450a159c2be7026221 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Fri, 21 Feb 2025 10:12:15 +0000 Subject: [PATCH 34/40] updated data feed --- docs/_data/statusInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/statusInfo.json b/docs/_data/statusInfo.json index ec040e679..37c11ad09 100644 --- a/docs/_data/statusInfo.json +++ b/docs/_data/statusInfo.json @@ -7,7 +7,7 @@ "To be reviewed": { "link": "How ‘to be reviewed’ components work", "linkContent": "Components with a ‘to be reviewed’ status have been added for use by everyone, but have not been checked or improved recently.", - "statusMessage": "Created in " + "statusMessage": "Created " }, "Experimental": { "link": "How ‘experimental’ components work", @@ -17,6 +17,6 @@ "Archived": { "link": "How ‘archived’ components work", "linkContent": "‘Archived’ components are no longer being supported and should not be used.", - "statusMessage": "Archived in " + "statusMessage": "Archived " } } From 52d3716d27d8157efcb1a57a900ae1ee40ea303e Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Fri, 21 Feb 2025 10:34:56 +0000 Subject: [PATCH 35/40] further logic updates --- docs/_data/statusInfo.json | 2 +- docs/_includes/layouts/macros/status.njk | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/_data/statusInfo.json b/docs/_data/statusInfo.json index 37c11ad09..501a6f6af 100644 --- a/docs/_data/statusInfo.json +++ b/docs/_data/statusInfo.json @@ -2,7 +2,7 @@ "Official": { "link": "How ‘official’ components work", "linkContent": "Components with an ‘official’ status have had a full, multi-disciplinary team review.", - "statusMessage": "Updated by the MoJ Design System team in " + "statusMessage": "Updated by the MoJ Design System team" }, "To be reviewed": { "link": "How ‘to be reviewed’ components work", diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk index 27955147d..b9cc33c1d 100644 --- a/docs/_includes/layouts/macros/status.njk +++ b/docs/_includes/layouts/macros/status.njk @@ -20,7 +20,8 @@ Status: {{ status }} -

+ {% if status == 'Experimental' or statusDate %} +

{{ statusData.statusMessage }}{% if status == 'Experimental' %} by{%- if creatorName and creatorTeam %} {{ creatorName }} in {{ creatorTeam }} {%- elif creatorName %} @@ -29,8 +30,9 @@ someone in {{ creatorTeam }} {%- else %} someone in the community - {%- endif %}{% endif %}{% if statusDate %} in {{ statusDate }}{% endif %}. + {%- endif %}{% if statusDate %} in {{ statusDate }}{% endif %}.{% else %} in {{ statusDate }}.{% endif %}

+{% endif %}
From b039d4bf5f0675c1007fbbdf4d3353243fb21b09 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Fri, 21 Feb 2025 13:43:00 +0000 Subject: [PATCH 36/40] updates to text --- docs/_data/statusInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/statusInfo.json b/docs/_data/statusInfo.json index 501a6f6af..159459040 100644 --- a/docs/_data/statusInfo.json +++ b/docs/_data/statusInfo.json @@ -2,7 +2,7 @@ "Official": { "link": "How ‘official’ components work", "linkContent": "Components with an ‘official’ status have had a full, multi-disciplinary team review.", - "statusMessage": "Updated by the MoJ Design System team" + "statusMessage": "Updated " }, "To be reviewed": { "link": "How ‘to be reviewed’ components work", @@ -16,7 +16,7 @@ }, "Archived": { "link": "How ‘archived’ components work", - "linkContent": "‘Archived’ components are no longer being supported and should not be used.", + "linkContent": "This component is no longer being supported and should not be used.", "statusMessage": "Archived " } } From b7d95c05405efb9314a1dc88573b577373ae15cc Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Fri, 21 Feb 2025 14:30:31 +0000 Subject: [PATCH 37/40] updates following comments --- docs/_includes/layouts/archive.njk | 4 ++-- docs/_includes/layouts/component.njk | 4 ++-- docs/_includes/layouts/macros/status.njk | 17 +++++++++++------ docs/_includes/layouts/pages.njk | 4 ++-- docs/_includes/layouts/patterns.njk | 4 ++-- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/docs/_includes/layouts/archive.njk b/docs/_includes/layouts/archive.njk index 1ef91a94b..245f57f03 100644 --- a/docs/_includes/layouts/archive.njk +++ b/docs/_includes/layouts/archive.njk @@ -1,6 +1,6 @@ {% extends "./base.njk" %} -{% import "./macros/status.njk" as macros %} +{% from "./macros/status.njk" import statusLabel %} {% block content %}
@@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} + {{ statusLabel(type, status, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }}
diff --git a/docs/_includes/layouts/component.njk b/docs/_includes/layouts/component.njk index bb340738a..87a944d49 100644 --- a/docs/_includes/layouts/component.njk +++ b/docs/_includes/layouts/component.njk @@ -1,6 +1,6 @@ {% extends "./base.njk" %} -{% import "./macros/status.njk" as macros %} +{% from "./macros/status.njk" import statusLabel %} {% block content %}
@@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} + {{ statusLabel(type, status, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }} {% include "./partials/get-help-and-contribute.njk" %} diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk index b9cc33c1d..8ab9c2d5d 100644 --- a/docs/_includes/layouts/macros/status.njk +++ b/docs/_includes/layouts/macros/status.njk @@ -1,13 +1,19 @@ {% from "govuk/components/details/macro.njk" import govukDetails %} + -{% macro statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) %} +{% macro statusLabel(type, status, statusInfo, creatorName, creatorTeam, statusDate) %} {% if status %} - - - {% set statusData = (statusInfo[status] if statusInfo and status in statusInfo else {}) %} - + {% set statusClass = { "Official": "govuk-tag--green", "To be reviewed": "govuk-tag--orange", @@ -15,7 +21,6 @@ "Archived": "govuk-tag--grey" }[status] or "" %} - Status: {{ status }} diff --git a/docs/_includes/layouts/pages.njk b/docs/_includes/layouts/pages.njk index ddc25e6dd..b0bb456c5 100644 --- a/docs/_includes/layouts/pages.njk +++ b/docs/_includes/layouts/pages.njk @@ -1,6 +1,6 @@ {% extends "./base.njk" %} -{% import "./macros/status.njk" as macros %} +{% from "./macros/status.njk" import statusLabel %} {% block content %}
@@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} + {{ statusLabel(type, status, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }} {% if isIndex or isArchive %} diff --git a/docs/_includes/layouts/patterns.njk b/docs/_includes/layouts/patterns.njk index 8db25c986..b57d805f0 100644 --- a/docs/_includes/layouts/patterns.njk +++ b/docs/_includes/layouts/patterns.njk @@ -1,6 +1,6 @@ {% extends "./base.njk" %} -{% import "./macros/status.njk" as macros %} +{% from "./macros/status.njk" import statusLabel %} {% block content %}
@@ -8,7 +8,7 @@

{{ title }}

- {{ macros.statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} + {{ statusLabel(type, status, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }} {% if isIndex or isArchive %} From 32656b384b0779b4c1013a7ed3c8ea0f39510600 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Fri, 21 Feb 2025 15:29:30 +0000 Subject: [PATCH 38/40] update css class --- docs/_includes/layouts/macros/status.njk | 4 ++-- docs/assets/stylesheets/components/_status.scss | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk index 8ab9c2d5d..31576f1ee 100644 --- a/docs/_includes/layouts/macros/status.njk +++ b/docs/_includes/layouts/macros/status.njk @@ -21,12 +21,12 @@ Arguments to be passed: "Archived": "govuk-tag--grey" }[status] or "" %} - + Status: {{ status }} {% if status == 'Experimental' or statusDate %} -

+

{{ statusData.statusMessage }}{% if status == 'Experimental' %} by{%- if creatorName and creatorTeam %} {{ creatorName }} in {{ creatorTeam }} {%- elif creatorName %} diff --git a/docs/assets/stylesheets/components/_status.scss b/docs/assets/stylesheets/components/_status.scss index 78283ec24..138474fb7 100644 --- a/docs/assets/stylesheets/components/_status.scss +++ b/docs/assets/stylesheets/components/_status.scss @@ -1,9 +1,9 @@ -.status-tag { +.app-status-tag { display: inline-block; vertical-align: super; margin-left: govuk-spacing(2); } -p.status-message { +p.app-status-message { color: $govuk-secondary-text-colour; } From 242f6cb9cd8563e30e294576a99f1b314513db09 Mon Sep 17 00:00:00 2001 From: ehtabrizi Date: Fri, 21 Feb 2025 17:13:49 +0000 Subject: [PATCH 39/40] updates following comments --- docs/_includes/layouts/archive.njk | 5 ++-- docs/_includes/layouts/component.njk | 6 ++-- docs/_includes/layouts/macros/heading.njk | 5 ++++ docs/_includes/layouts/macros/status.njk | 35 +++++++++++++---------- docs/_includes/layouts/pages.njk | 5 ++-- docs/_includes/layouts/patterns.njk | 7 ++--- 6 files changed, 34 insertions(+), 29 deletions(-) create mode 100644 docs/_includes/layouts/macros/heading.njk diff --git a/docs/_includes/layouts/archive.njk b/docs/_includes/layouts/archive.njk index 245f57f03..bc8a4a164 100644 --- a/docs/_includes/layouts/archive.njk +++ b/docs/_includes/layouts/archive.njk @@ -1,13 +1,12 @@ {% extends "./base.njk" %} {% from "./macros/status.njk" import statusLabel %} +{% from "./macros/heading.njk" import heading %} {% block content %}

{% if not isIndex %}Archive{% endif %} -

- {{ title }} -

+ {{ heading(1, title, status) }} {{ statusLabel(type, status, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }}
diff --git a/docs/_includes/layouts/component.njk b/docs/_includes/layouts/component.njk index 87a944d49..d368651f1 100644 --- a/docs/_includes/layouts/component.njk +++ b/docs/_includes/layouts/component.njk @@ -1,13 +1,11 @@ {% extends "./base.njk" %} - {% from "./macros/status.njk" import statusLabel %} +{% from "./macros/heading.njk" import heading %} {% block content %}
{% if not isIndex %}Components{% endif %} -

- {{ title }} -

+ {{ heading(1, title, status) }} {{ statusLabel(type, status, statusInfo, creatorName, creatorTeam, statusDate) }} {{ content | safe }} diff --git a/docs/_includes/layouts/macros/heading.njk b/docs/_includes/layouts/macros/heading.njk new file mode 100644 index 000000000..688ffdd3f --- /dev/null +++ b/docs/_includes/layouts/macros/heading.njk @@ -0,0 +1,5 @@ +{% macro heading(level, title, status) %} + + {{ title }} + +{% endmacro %} \ No newline at end of file diff --git a/docs/_includes/layouts/macros/status.njk b/docs/_includes/layouts/macros/status.njk index 31576f1ee..0b0629aa7 100644 --- a/docs/_includes/layouts/macros/status.njk +++ b/docs/_includes/layouts/macros/status.njk @@ -1,5 +1,7 @@ {% from "govuk/components/details/macro.njk" import govukDetails %} +{% from "govuk/components/tag/macro.njk" import govukTag %} +