Skip to content
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

Format currency as currency in all components. #2286

Closed
zenweasel opened this issue May 16, 2017 · 3 comments · Fixed by #3645
Closed

Format currency as currency in all components. #2286

zenweasel opened this issue May 16, 2017 · 3 comments · Fixed by #3645
Assignees
Labels
bug For issues that describe a defect or regression in the released software
Milestone

Comments

@zenweasel
Copy link
Collaborator

Expected behavior

All currency amounts should be formatted as currency

Actual Behavior

For example here, "Price" is formatted as currency but MSRP is not. There may be others that I won't write separate issues for.
dumb_product

Steps to Reproduce the Behavior

  1. Create a product
  2. For a variant enter a price and an MSRP
  3. Observe the price is formatted as currency but the MSRP is not

Versions

Node: 7.10.0
NPM: 4.2.0
Meteor Node: 4.8.2
Meteor NPM: 4.5.0
Reaction CLI: 0.8.2
Reaction: 1.2.0
Reaction branch: release-1.2.0
Docker: 17.03.1-ce
@aaronjudd aaronjudd added UIX bug For issues that describe a defect or regression in the released software labels Feb 1, 2018
@aaronjudd aaronjudd changed the title Inconsistent formatting in PDP detail Format currency as currency in all components. Feb 1, 2018
@spencern spencern added this to the Bugfix Sprint 1 milestone Feb 9, 2018
@Akarshit
Copy link
Contributor

Akarshit commented Feb 9, 2018

This issue still exists in release-1.8.0 as can be seen in screenshot below(the "Price" field is not formatted).

screen shot 2018-02-09 at 1 19 19 pm

@Akarshit
Copy link
Contributor

@spencern
Making the TextInput currency formatted is not trivial. Basically the solution is that while displaying I have to format the props.value and while sending back the changed value, I have to deformat it. But it break when the user wants to enter something like 1.5, as soon as the user enters 1. because of the deformat and format cycle it changes to 1 so user is not able to enter values with decimal.
Apart from this the UX is not good when the input is formatted as currency. Also this is for the admin side and on that side we always assume that the admin is aware of the units that's why we don't display units of anything anywhere. To be in sync of this, I have made a PR to remove the currency formatting from the placeholder value.
Does this sound OK to you?

@spencern
Copy link
Contributor

I don't love this solution as the placeholder text is one of the better indications that the user is inputting a currency amount. I do acknowledge your concerns that it's a poor UX when the input is formatted as currency. I think the goal here is that when the user is inputting, it's a number and when they are done inputting, the display is shown as currency (text field?). I can think of several ways to accomplish this, so I'd prefer to keep the currency formatting in the placeholder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues that describe a defect or regression in the released software
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants