-
Notifications
You must be signed in to change notification settings - Fork 335
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
Additional tests for task list Nunjucks macro, allow attributes on tags and tidy up #3951
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36degrees
force-pushed
the
task-list-tests
branch
from
July 11, 2023 17:14
41a57f9
to
056c98a
Compare
packages/govuk-frontend/src/govuk/components/task-list/task-list.yaml
Outdated
Show resolved
Hide resolved
packages/govuk-frontend/src/govuk/components/task-list/template.njk
Outdated
Show resolved
Hide resolved
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 brilliant. Every single commit
Mind if we update the PR title + description to say we've added fixes and features rather than just better test coverage?
There is no `govuk-tag--black` modifier class, and the status for this task doesn’t use the tag component, so it shouldn’t be using tag modifiers anyway.
This means that we’ll link to the guidance in the Design System for the tag component, rather than defining everything the tag component accepts in multiple places.
This matches what we do in other components that call each other – it means that importing task list brings in everything you need for the component, rather than having to remember to import tag separately.
Because we’re just passing the options defined by the user straight through to the tag component we can simplify the code and just pass the entire `item.status.tag` object rather than each option individually. Co-authored-by: Colin Rotherham <work@colinr.com>
36degrees
force-pushed
the
task-list-tests
branch
from
July 13, 2023 08:25
056c98a
to
f92aa5b
Compare
36degrees
changed the title
Add comprehensive tests for task list Nunjucks macro
Additional tests for task list Nunjucks macro, allow attributes on tags and tidy up
Jul 13, 2023
colinrotherham
approved these changes
Jul 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add additional template tests that cover the various options that can be passed to the macro.
See individual commits for details.
Closes #3828.