-
Notifications
You must be signed in to change notification settings - Fork 235
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
Task list component guidance and updated pattern page #1994
Task list component guidance and updated pattern page #1994
Conversation
✅ You can preview this change here:Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
With regards to statuses and their relationship to the tags component, wondering if it might be desirable to have the implementation be a little more flexible, and also consistent with how other components allow for content to be provided as either {{ govukTaskList({
items: [{
title: {
text: "Company details"
},
href: "#",
status: {
text: "Completed"
}
}, {
title: {
text: "Project details"
},
href: "#",
status: {
html: govukTag({
text: "Incomplete",
classes: "govuk-tag--blue",
}),
}
}, {
title: {
text: "Fund applied to"
},
hint: {
text: "The funds will be announced on 1 April 2022"
},
status: {
text: "Cannot start yet",
classes: "govuk-!-secondary-text-colour"
}
}]
}) }} (Note: I have provided the secondary text colour in this example by using a new utility class, Allowing for any HTML be added may be too flexible, and contradict guidance which is trying to direct authors to use statuses in a restricted and predictable fashion. Also, while the above example of using a Nunjucks component as a value for a An alternative therefore might be to allow for either {{ govukTaskList({
items: [{
title: {
text: "Company details"
},
href: "#",
status: {
text: "Completed"
}
}, {
title: {
text: "Project details"
},
href: "#",
status: {
tag: {
text: "Incomplete",
classes: "govuk-tag--blue",
},
}
}, {
title: {
text: "Fund applied to"
},
hint: {
text: "The funds will be announced on 1 April 2022"
},
status: {
text: "Cannot start yet",
classes: "govuk-!-secondary-text-colour"
}
}]
}) }} The HTML for the above would be something like this: <ul class="govuk-task-list">
<li class="govuk-task-list__item govuk-task-list__item--with-link">
<span class="govuk-task-list__task-name-and-hint">
<a class="govuk-link govuk-task-list__link" href="#" aria-describedby="task-list-1-status">Company details</a>
</span>
<span class="govuk-task-list__status" id="task-list-1-status">
Completed
</span>
</li>
<li class="govuk-task-list__item govuk-task-list__item--with-link">
<span class="govuk-task-list__task-name-and-hint">
<a class="govuk-link govuk-task-list__link" href="#" aria-describedby="task-list-2-status">Project details</a>
</span>
<span class="govuk-task-list__status">
<strong class="govuk-tag govuk-tag--blue" id="task-list-2-status">
Incomplete
</strong>
</span>
</li>
<li class="govuk-task-list__item">
<span class="govuk-task-list__task-name-and-hint">
<div class="govuk-task-list__task-no-link">Fund applied to</div>
<div id="task-list-3-hint" class="govuk-task-list__task_hint">
The funds will be announced on 1 April 2022
</div>
</span>
<span class="govuk-task-list__status govuk-!-secondary-text-colour" id="task-list-3-status">
Cannot start yet
</span>
</li>
</ul> |
Sidenote: wondering about the usefulness of the secondary text colour as an option – does it add anything? Would most users notice the difference? |
@paulrobertlloyd all good questions! The original intention was that the task list component wouldn’t use the tag component (as the design was so different) and so we just had a “status” element within each row instead. The working group weren’t happy with the inconsistency this would introduce though, so we’ve started exploring how to update the tag component. We’ve not yet explored how with would affect the task list implementation, but I was presuming that it would directly use the updated tag component, in the same way that the Phase banner does - ie with a |
It’s intended only for use as “Cannot start yet”, where the whole row wouldn’t be clickable. See draft guidance: https://deploy-preview-1994--govuk-design-system-preview.netlify.app/components/task-list/ The grey is very close to the black though, admittedly! |
Oh, I get the intention. And the designer in me really likes it! Love a bit of grey text. I just wonder if in reality it really adds anything that the words don’t already convey. And yes, long history of grey text getting ever darker to meet accessibility standards, further suggesting this may be unwarranted, and a needless complexity in the grand scheme of things. |
4e35313
to
3d20819
Compare
|
Ooh, I’d not spotted this. @owenatgov shall we use that pattern in the task list params documentation too? I wonder whether it’s better to repeat the documentation for tag rather than to just link to it, but maybe it should be consistent?
This was fixed within We’ll do another updated pre-release soon I think, but it’s currently blocked by something. |
Hi @frankieroberto, would you mind rebasing this PR against In preparation for pre-releasing Thanks |
Minor update – that should now be |
ac59424
to
37abc6f
Compare
@colinrotherham @36degrees sorry for the delay (I was on holiday). This PR has now been rebased from the I think it’s now ready for a final review. There’s one TODO left in the content for a reference to when the component is released - I’m not sure what to do about that? I’m happy to rebase again and squash some of the minor comments when you’re ready for this to be merged. @colinrotherham also has push access to the forked repo if that’s quicker too. |
aca5326
to
db61eca
Compare
The task list component displays all the tasks a user needs to do, and allows users to easily identify which ones are done and which they still need to do. Refs: alphagov/govuk-design-system/pull/1994
358d0c3
to
8fdf688
Compare
Hello! I've committed a change to remove a reference to the date of release — I feel like the date itself isn't absolutely essential and we can add it back in when we know (when v5 is released). |
8fdf688
to
a55f44a
Compare
78482d3
to
84ec529
Compare
|
9dec1aa
to
34033af
Compare
Thought we'd already done this...
We didn't find any evidence of requiring this when reviewing the pattern, and most services using this pattern on live services do not include this.
This helps to distinguish it from the component page.
34033af
to
56fa1f2
Compare
Just made a few tidy up tweaks including:
Think we're ready to go 🙌 |
56fa1f2
to
9d51523
Compare
9d51523
to
9e7ed25
Compare
Task list component guidance and updated pattern page
Task list component guidance and updated pattern page
Task list component guidance and updated pattern page
Task list component guidance and updated pattern page
Task list component guidance and updated pattern page
Task list component guidance and updated pattern page
Task list component guidance and updated pattern page
Task list component guidance and updated pattern page
Task list component guidance and updated pattern page
This PR adds the upcoming [Task list component](/alphagov/govuk-design-system/pull/1994). It's built in a similar fashion to the summary list. Tags can be added within statuses by calling `govuk_tag` within the status, or plain text can be used.
Task list component guidance and updated pattern page
Task list component guidance and updated pattern page
Task list component guidance and updated pattern page
Task list component guidance and updated pattern page
Adds a new guidance page for the new Task List component.
It also updates the existing Task list page pattern, replacing the screenshot image with the new Task List component, and updating the guidance.
➡️ Preview