-
Notifications
You must be signed in to change notification settings - Fork 328
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
Investigate long tags in task lists #3923
Comments
Today (06/09/2023) we looked at the effects of long content in the tag component and task items within the new task list component. Answers to questionsHow large a tag can the task list handle before it "breaks"? Should we update the guidance to address use of long tags? First experimentAdd longer than normal text to the tag component, observing how it wraps on desktop and mobile resolutions. Although a bit clunky visually, it did not 'break' anything else within the page. Real service tag examples
(36 characters) this tag has only been used in a table view and not a task list. Second experimentAdd longer than normal words to the tag component, observing what happens on desktop and mobile resolutions. In this experiment the column container width became larger than expected. Although on desktop words of this length probably don't exist to cause distortion, on mobile (320px resolution) long words used in both the task and the tag may cause issue. SuggestionsTake an approach seen in earlier versions of a task list and move the tag onto a new line on smaller width resolutions. |
Just to summarise the conversation I had with @CharlotteDowns here... when designing the task list I think we deliberately decided not to stack the status labels beneath the task names on narrower screens, as it can make them harder to scan and if the tasks and labels don't contain long words, then they can fit quite happily side-by-side even on very narrow screens. However clearly there’s a limit to this, if the screen is narrow and some of the words are very long! Another option we discussed is forcing the browser to break the tag mid-word using something like |
Thanks @CharlotteDowns for getting this evidence together and thanks @frankieroberto for the context. It sounds like from a design perspective, we're ok with tags getting squashed but less ok with them flowing off screen ala experiment 2. Re: word breaking, it looks like support is fairly sound. This is amplified by the fact we'll be dropping IE11 support. I think we should do this regardless of what solution we take forward to reduce the risk of the tag going off-screen. I wonder if this is the only thing we need to do for the component itself? Also I'll callout Char's suggestion above to update the guidance if it's not already on the cards. |
I've done a quick test and I think breaking words is doable, with some light amendments to the solution. Both
If we apply both these rules to Char's second experiment above where the tag overflows, the outcome is identical: Whilst we won't need to explicitly support IE from 5.0, I would still recommend using What do we think? |
Uh oh! @owenatgov, the image you shared is missing helpful alt text. Check #3923 (comment). Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
@CharlotteDowns to review what @owenatgov's done. |
@owenatgov I'm happy with the tag overflow solution being |
We have a PR: #4259 The next thing to do here is update the tag guidance to suggest avoiding long tags if you're able to. Looking at the guidance at the moment, I'm wondering if there's value in having a section on writing status messages as I can't think of another obvious place to put this. However, we have a section in the task list pattern guidance on what the statuses should be, maybe that's enough? What do we think? |
Nice!
It’s also mentioned briefly in the component guidance (https://deploy-preview-1994--govuk-design-system-preview.netlify.app/components/task-list/ ):
Is that enough or should it be stronger? |
@frankieroberto That feels plenty to me. I'm happy for #4259 to therefore close this and us to commit to handling the documentation portion of the work in alphagov/govuk-design-system#1994. |
@frankieroberto I think that's pretty clear. Might we be able to remove one of the 'creating your own statuses' from the first sentence so it reads a little clearer? |
Well spotted - I totally missed that. 🤦 Left a proposed edit here but let me know what you think: https://github.com/alphagov/govuk-design-system/pull/1994/files#r1340332277 |
With the PR merged, I'm going to close this issue and propose we move any further guidance chat to alphagov/govuk-design-system#1994. Thanks both! |
What
Investigate the impact of long tags in task list components and apply affordances we feel are useful or necessary.
Why
During the audit of our components against the new typography scale (alphagov/govuk-design-system#2299) we noticed that larger tags start to look a little squashed with the larger font sizes on smaller screens. It was unclear what the impact of very large tags would be on the task list and if we should force them to not break eg: using
nowrap
.Timebox
half a sprint ie: 1 week
Who is working on this?
Developers, designers
Spike lead:
TBD
Spike buddy:
TBD
Questions to answer
Done when
The text was updated successfully, but these errors were encountered: