-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add task-list component macro #969
Conversation
This is great, thanks @edwardhorsford I agree that for this component, it'd be best to not have to redo tags (though I do like option 4). For now, my preference is Option 3, as it avoid redesigning tags, doesn't look broken like Option 1, and it improves readability / scanning by reducing the number of tag colours used. |
First revision after chatting with @frankieroberto and @anandamaryon1 Changes:
|
Is there any chance that we could test a version where the statuses are given as:
The addition of tags has always seemed like an unnecessary complication to me, and your discussion of the options for the text in them just seems to me to add even more complication. (Possibly related: I discovered today that the Probate Service is using a thing that looks rather like a task list, but where they have removed any option to view or start to complete sections in the order that the user prefers - which negates the entire purpose of the thing). |
We're hoping to release this initially without requiring changes to tags - primarily copying the GOV.UK task list component as reference - but intend to come back and look at tags in a follow-up bit of work. Assuming we don't want to use tags for 'completed' and 'cannot start yet', that leaves us with a choice: We can leave non-tag statuses as body text, but then they look visually inconsistent next to the tags; Or else we can give them styling to make them more consistent with tags, but they will be smaller. It sounds like your preference is to the former (option 1).
I'm not entirely sure what you're describing here - could you say more? Users can click the entirety of the task to open it. Clicking anywhere in the row or the link does the same thing (same as GOV.UK). |
Great, happy to hear that.
Yes.
I know that we know that users can click anywhere in the row, but it doesn't give much affordance for clicking. I do realise that there's a link on the left (in this example, 'Declaration') that goes to the same destination as the current tag/ suggested 'link' on the right (in this example, 'Incomplete') but we - and users - don't care that the whole panel is clickable but only the word 'Destination' looks like a link. It's very similar to the problem we had some time ago with the GDS elements that styled the clickable area around small-target radios / checkboxes with a grey background to try to tell users that it was clickable - but lots of them didn't realise (irrespective of web-savviness) so that's why I proposed having the large-target radios/checkboxes, Joe Lanman tried it in a service, and then loads of people had to work hard to make it happen (hooray). In the task list, I know there's the grey band that's meant to show the whole panel is clickable but I don't think it's enough. The tags are ambiguous - they look a bit buttony, so some folks may interpret them as buttons, but they don't look exactly like actual buttons so I think they are not buttony enough to appear reliably clickable. Whereas 'link' is a true Internet basic that pretty much everyone has to learn. |
Thanks @cjforms, interesting points. The main affordance that the task can be clicked is its title which is a standard link, the hover effect and the fact you can click the whole row just adds additional backup to this, in my view. I'm not convinced that replacing the tags with links would necessarily be an improvement. My main concerns with having two links would be:
|
Perhaps I wasn't entirely cleat that I'm requesting that my suggestions get tested? The underlying principle here is to see whether the more complex item (the task list) can work with the simplest possible building blogs - that is, no tags. I accept your point that in general we avoid having two links that go to the same place, but then in general we avoid introducing less familiar components. We would also be increasing the amount of tabbing when using the keyboard alone, but we are only using a task list in the context of a highly complex form where a bit of tabbing is going to be minor compared to the overall workload of understanding the task list and dealing with the many entries that it includes. That's why I'm suggesting testing the task list made from the simplest possible components. |
@edwardhorsford is this ready for review now, or still work in progress? |
Have updated the PR to add a minimal readme and update the changelog. |
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.
Looks good to me. Checked in browser at different mobile widths.
Co-authored-by: Frankie Roberto <frankie@frankieroberto.com>
Co-authored-by: Frankie Roberto <frankie@frankieroberto.com>
Co-authored-by: Frankie Roberto <frankie@frankieroberto.com>
Co-authored-by: Frankie Roberto <frankie@frankieroberto.com>
…tend into add-task-list-component * 'add-task-list-component' of github.com:nhsuk/nhsuk-frontend: (34 commits) Fix encoding issue introduce in gulp v5.0 (#1013) Make it easier to set date values (#994) Update app/components/task-list/multiple-sections.njk Update packages/components/task-list/_task-list.scss Update packages/components/task-list/_task-list.scss Update app/components/task-list/multiple-sections.njk Add summary list row classes (#1007) Add summary list row condition (#1008) changelog backstop refs backstop refs change margins to padding still trying to fix linting error backstop refs remove testing markup from component examples backstop refs updated Use page template in examples update reference images tweak main wrapper margin reduce the padding on main wrapper on mobile ...
@wellhairy Thanks for testing out those ideas. I agree that the tags wrapping is slightly ugly, but I'm not sure that your solution totally fixes it, I've given it a quick go and tested it with some ugly content: Perhaps it needs some kind of max-width as a percentage with On your other point, with the hint text wrapping beneath the tags, I feel this one will make the tags and word statuses harder to scan and result in a more messy/complex layout overall. |
Hi @anandamaryon1 thanks for looking at this. I'll mock something up later today while i'm prototyping but as a quick response: Tags could be wrapped and aligned left for smaller devices either above or below the heading. Aligning the content (tags, headings and hint text) left to right will give users a consistent starting point to read text from and this should improved scalability. Doing this should also be visually less cluttered UI what will allow the type to breath and should provide the content better clarity. I've discussed the use of A different way of doing this would be by setting a |
@edwardhorsford Just doing some testing on the task list in the Accessibility Lab today and found a potential improvement: on both mac voiceOver and windows NVDA, when focussing on a task link, the status is not announced (as it is on the GOV.UK version, which seems helpful). I'm pretty sure it's because the |
@anandamaryon1 good catch! I vaguely recall that This does mean that it doesn’t work with tasks that don't have links as they cant’t be started yet - the GOVUK one just doesn’t use We might also consider adding |
@anandamaryon1 good catch! I think this was an accident on my part - I didn't like that the statuses didn't read if there wasn't a link - it felt better that all tasks consistently have a status. I think this was my code testing this - but it wasn't intended to be included. I've updated to restore the |
Description
This PR adds the Task list component from the GOV.UK Design system. It's a WIP for discussion.
The template and sass are copied from GOV.UK's task list with minor changes:
Here's what it looks like:
Tags
The main thing to resolve is what to do about tags. On the GOV.UK task list, completed and cannot start yet statuses are not tags - they are plain text. The tags are the same size as body copy. On NHSUK, tag text is a smaller size.
We could:
I'm hesitant that adjusting tags might be a can of worms, and was one of the main reasons the GOV.UK component took so long to be released - so doing the minimal changes for this component would be preferred.
Checklist