Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Currency input #9

Open
simonwhatley opened this issue Nov 26, 2018 · 4 comments
Open

Currency input #9

simonwhatley opened this issue Nov 26, 2018 · 4 comments
Labels
component Goes in the 'Components' section of the Design System PUBLISHED The thing is published in the Design System

Comments

@simonwhatley
Copy link
Contributor

Service: Claim for Crown court defence
Phase: Live
Department: Legal Aid Agency

Currency notation on form fields

Help users to enter an amount of money in a specified currency.

currency-notation

Why

Anything else

@helena-moj
Copy link

Some related discussions on prefixes here: alphagov/govuk-design-system-backlog#134

@simonwhatley simonwhatley added the component Goes in the 'Components' section of the Design System label Apr 15, 2019
@simonwhatley simonwhatley moved this from Proposed to In progress in MOJ Design System Community Backlog Jun 19, 2019
@adamsilver
Copy link
Contributor

Done by @whatterz

@simonwhatley simonwhatley moved this from In progress to Done in MOJ Design System Community Backlog Jul 11, 2019
@simonwhatley simonwhatley added the PUBLISHED The thing is published in the Design System label Aug 13, 2019
@simonwhatley simonwhatley changed the title Currency notation Currency input Aug 13, 2019
@simonwhatley simonwhatley reopened this Aug 15, 2019
MOJ Design System Community Backlog automation moved this from Done to To do Aug 15, 2019
@gregtyler
Copy link
Contributor

We have a custom implementation of this component in my service in OPG, and I was looking at moving across to this version but found a bit of a blocker.

The component works great for prices:
image

But elsewhere in the service we're collecting email domains and the spacing doesn't quite line-up (the value is "julian-solicitors.co.uk"):
image

This is because the prefix has variable width (based on the text inside) but the padding on the text input is always 40px. I think either the prefix needs a max-width or it needs to sit in inline flow, rubbing shoulders with the input.

For what it's worth, I'm expecting to just drop to having a span sitting before the input. The width is flexible and removes the need for any CSS:
image

@adamsilver
Copy link
Contributor

Thanks @gregtyler for raising this. Just to say that the last option you mention might prove a problem because it will increase the total width of that field. I think the overall width of the field shouldn't change—the bigger the prefix, the smaller the input (should it ‘rub shoulders’ and not be absolutely positioned)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component Goes in the 'Components' section of the Design System PUBLISHED The thing is published in the Design System
Development

No branches or pull requests

4 participants