-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: 1126 build status design #1154
Conversation
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
position: relative; | ||
} | ||
p { | ||
@include govuk-font($size: 16, $line-height: 20px); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using govuk-font()
will already output the media queries for you
Probably meant to use govuk-font-size()
here?
But watch out, scale point 14 is deprecated:
https://design-system.service.gov.uk/get-started/new-type-scale/
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
docs/_includes/layouts/component.njk
Outdated
{% if not isIndex %}<span class="govuk-caption-xl">Components</span>{% endif %} | ||
<h1 class="govuk-heading-xl{% if status %} govuk-!-display-inline-block govuk-!-margin-bottom-2{% endif %}"> | ||
{{ title }} | ||
</h1> | ||
|
||
{{ macros.statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker for release, but could this be a pageTitle partial/macro? As its repeated several times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Chris, noted for later iteration.
docs/_includes/layouts/component.njk
Outdated
@@ -1,12 +1,14 @@ | |||
{% extends "./base.njk" %} | |||
|
|||
{% block content %} | |||
{% import "./macros/status.njk" as macros %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As there's only one macro in the file, would this be better as:
{% from "./macros/status.njk" import statusLabel %}
{% from "govuk/components/details/macro.njk" import govukDetails %} | ||
|
||
|
||
{% macro statusLabel(type, status, statusMessage, statusInfo, creatorName, creatorTeam, statusDate) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth a little bit of inline documentation of these args?
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
|
||
Learn how you can [help develop design system building blocks](/get-involved/suggest-a-change/). | ||
|
||
## ‘Experimental’ status (for all community components) <span class="govuk-tag govuk-tag--blue" style="vertical-align:middle;" aria-hidden="true">Experimental</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker, but shall we set a task to review this HTML?
We can probably extend Markdown to render the tag via the Nunjucks macro:
{{ govukTag({
text: "completed",
classes: "govuk-tag--blue",
attributes: { style: "vertical-align: middle" }
}) }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Colin, noted for later iteration.
"Archived": "govuk-tag--grey" | ||
}[status] or "" %} | ||
|
||
<span class="govuk-tag status-tag {{ statusClass }}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to trim the empty spaces off when statusClass
isn't set?
Or follow the coding standards and use .app-status
or .moj-status
for our extended styles?
<span class="govuk-tag status-tag {{ statusClass }}"> | |
<span class="govuk-tag app-tag--status{%- if statusClass %} {{ statusClass }}{% endif %}"> |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
<span class="govuk-tag app-status-tag{%- if statusClass %} {{ statusClass }}{% endif %}"> | ||
<span class="govuk-visually-hidden">Status:</span> {{ status }} | ||
</span> | ||
|
||
{% if status == 'Experimental' or statusDate %} | ||
<p class="app-status-message govuk-!-margin-bottom-2"> | ||
{{ 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 %}{% if statusDate %} in {{ statusDate }}{% endif %}.{% else %} in {{ statusDate }}.{% endif %} | ||
</p> | ||
{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about simplifying the logic here?
I've split out statusHtml
and statusAttribution
and used govukTag()
via the macro:
{% from "govuk/components/tag/macro.njk" import govukTag %}
<span class="govuk-tag app-status-tag{%- if statusClass %} {{ statusClass }}{% endif %}"> | |
<span class="govuk-visually-hidden">Status:</span> {{ status }} | |
</span> | |
{% if status == 'Experimental' or statusDate %} | |
<p class="app-status-message govuk-!-margin-bottom-2"> | |
{{ 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 %}{% if statusDate %} in {{ statusDate }}{% endif %}.{% else %} in {{ statusDate }}.{% endif %} | |
</p> | |
{% endif %} | |
{% set statusHtml -%} | |
<span class="govuk-visually-hidden">Status:</span> {{ status }} | |
{%- endset %} | |
{% set statusAttribution -%} | |
{%- if status == "Experimental" %} | |
by {{ creatorName | default("someone") }} in {{ creatorTeam | default("the community") }} | |
{%- endif %} | |
{%- if statusDate %} | |
in {{ statusDate }} | |
{% endif %}. | |
{%- endset %} | |
{{ govukTag({ | |
html: statusHtml, | |
classes: "govuk-!-font-weight-regular app-status-tag" ~ statusClass | |
}) }} | |
<p class="app-status-message govuk-!-margin-bottom-2"> | |
{{ statusData.statusMessage }} {{ statusAttribution }} | |
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added govuk-!-font-weight-regular
to fix the bold weight coming from .app-prose
But might be better moving this into app-status-tag
to fix it everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Colin, noted for later iteration.
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: Username: |
🎉 This PR is included in version 3.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Issue or RFC endorsed by the maintainers
Build tier design
#1126
Description of the change
FrontMatter paramaters:
status: "Archived" | Experimental" | "To be reviewed" | "Official"
statusMessage: "For example (Created: Feb 2025)"
Alternative designs
No alternative designs
Possible drawbacks
None suggested
Verification process
Tested via chrome, Safari & responsive view
Release notes
Added new tier macro to follow design