-
Notifications
You must be signed in to change notification settings - Fork 21
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 #445
Conversation
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
These are only needed to preview the guide until the task list is released and available in govuk-frontend. This commit can be dropped prior to merge.
✅ Deploy Preview for govuk-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Looking good! Left some initial comments.
app/components/govuk_component/task_list_component/status_component.rb
Outdated
Show resolved
Hide resolved
app/components/govuk_component/task_list_component/item_component.rb
Outdated
Show resolved
Hide resolved
app/components/govuk_component/task_list_component/title_component.rb
Outdated
Show resolved
Hide resolved
Statuses can now be provided as strings, hash or with a block, offering complete flexibility. Co-authored-by: Frankie Roberto <[email protected]>
Update the classes to match the new ones upstream alphagov/govuk-frontend#3952
5a51db9
to
9386dc7
Compare
Now when these things are missing the containing elements aren't rendered at all
I've added support for There are some slight complications:
|
As I understand it, |
This change brings the behaviour of the task list more in line with the Nunjucks component. Now when there's no id_prefix param the ids of the statuses and tags are just numbered sequentially. If there's going to be more than one task list on a page they can have their prefixes set seprately so there's no ID clashes on the final rendered page. Co-authored-by: Frankie Roberto <[email protected]>
@peteryates do we think there’s anything left to do on this or shall we merge it into the v5 branch? Do we still want to support an array of item objects as well as the block syntax, or is that an optional extra? |
I do plan on adding the array of items approach but I'm happy for that to follow as an enhancement, will get this merged later today. |
This PR adds the upcoming Task list component. 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.Final tasks