-
Notifications
You must be signed in to change notification settings - Fork 338
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 extra letter spacing modifier for inputs #2230
Conversation
Is this still planned to get merged at some point? |
Hi @frankieroberto! Yup, the plan is to try and get this revived, reviewed by designers and add some guidance so we can get it in eventually 😄 |
80e6bc4
to
d0b634e
Compare
d0b634e
to
39641a2
Compare
Added a changelog entry for the new class. Necessary, but also a way to get this merged and shipped without waiting to have more complete guidance in the Design System docs, which can come at a later stage (and be tracked in its own issue). @36degrees @claireashworth Two questions:
|
I initially agreed with this, but then I thought you might also use it when asking people to input an alphanumeric code (or purely alphabetic?) in which case it might be confusing? And perhaps the letter spacing is more significant and obvious than the tabular numerals? That said, I like the idea of having a more semantic name rather than one that just describes the styles applied (which might change). |
24c24f4
to
d382de3
Compare
Yeah, |
Of those options, I'd go for Hopefully, the folks using this may already be familiar with the idea that a character is just any one glyph—be it letter, digit, punctuation or whitespace—from the character count component. |
My thinking behind Language is hard though! Maybe |
I'm more inclined towards naming things after the purpose they serve, rather than what they are, but that isn't a hard and fast rule by any means. However, as this style change is not only applying additional letter-spacing, but is also explicitly enabling tabular number formatting, I think it should be named something akin to |
Suggestions: |
Suggestion: readable-spacing Or:
|
I think that's part of the contention, @calvin-lau-sig7 — it's both! |
Jumping in with the opinion that we should keep the name as simple as possible. I think At the end of the day though there is a ceiling to what value we can get out of picking the perfect word or phrase to explain what it's doing. I don't think we need to split hairs on precision of what we choose (appreciate I just contributed to this!). What it is now seems to do the job, in my opinion. |
Let's keep it |
Co-authored-by: CAAshworth <claire.ashworth@digital.cabinet-office.gov.uk>
d382de3
to
c8ae9f3
Compare
@querkmachine woohoo! 🙌 Can you add this modifier to confirm a phone number inputs? |
@frankieroberto I think this might warrant a bit more documentation outside of updating certain examples, so I've opened an issue for it here: alphagov/govuk-design-system#2665 |
When true, the extra_letter_spacing argument adds the class 'govuk-input--extra-letter-spacing' to the text input element. It is available for all text fields and defaults to false. alphagov/govuk-frontend#2230
When true, the extra_letter_spacing argument adds the class 'govuk-input--extra-letter-spacing' to the text input element. It is available for all text fields and defaults to false. alphagov/govuk-frontend#2230
Update GDS and MOJ design systems to their latest releases. Update form builder to latest version 4.0.0 This version finally incorporates the improvements to localisation in nested fields, so we can get rid of some superfluous code in the co-defendant and offence pages. x-govuk/govuk-form-builder#386 Also, a new `extra_letter_spacing` can be used in input texts like reference numbers, telephones, codes, etc. that makes it easier to read. I've added this flag where it makes sense in our service. alphagov/govuk-frontend#2230
Update design system and form builder Update GDS and MOJ design systems to their latest releases. Update form builder to latest version 4.0.0 This version finally incorporates the improvements to localisation in nested fields, so we can get rid of some superfluous code in the co-defendant and offence pages. x-govuk/govuk-form-builder#386 Also, a new `extra_letter_spacing` can be used in input texts like reference numbers, telephones, codes, etc. that makes it easier to read. I've added this flag where it makes sense in our service. alphagov/govuk-frontend#2230
This is a re-implementation of the changes in #1222.
Add an
--extra-letter-spacing
modifier for inputs which increases the spacing between letters and turns on tabular numbers.The idea is that this modifier would be used for inputs asking for things like security codes, reference or phone numbers, where the user would be checking back one character at a time.
This was inspired by alphagov/notifications-admin#1545
Without modifier
With modifier