-
Notifications
You must be signed in to change notification settings - Fork 339
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 thousands comma-seperation in character count messages #2568
Comments
Hi @dalepotter, Thanks for this! We recommend you use maximum word count for longer answers which might help here. We think it's a sensible change to consider, since there will be cases where somebody's copying and pasting, or there's just no other way to ask the question. But generally, if there's a situation where a user could enter that many characters/words over the limit, there's probably a different way to design the question. |
We intend to look at this when we pick up the other localisation issues for the character count component. |
Adds Intl.NumberFormat detection, using it for `count` values if supported by the browser. Addresses #2568.
Adds Intl.NumberFormat detection, using it for `count` values if supported by the browser. Addresses #2568.
@querkmachine can you write a summary of work done so far, then update the done whens on this to reflect what we'll need to do next when we pick the other internationalisation work, and move back into the backlog. Thanks! |
Another alternative (if there's nothing left to do on this other than release i18n) could be to attach this to a Github milestone and move the card to Ready To Release. I think it'll sit there for a while, but that might be ok? |
Formatting of the character count text has been included in the internationalisation PR as a progressive enhancement for browsers that support Intl.NumberFormat. |
Moving this back to blocked whilst we do internationalisation pre-release testing. |
In the spike we formatted the number only if it matched the key |
Related component
Character count
Context
The current GDS content style guide states:
...however the information/error message (when over 999 characters) does not include comma separation.
Example entering 1200 characters in the Design System documentation page:
The expected message in this case would be
You have 1,000 characters too many
Alternatives
None found yet, but we are considering adding some custom JS to our service. This would modify the comma-seperation message output for screens which use Character Count component.
Additional information (if applicable)
The text was updated successfully, but these errors were encountered: