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

Commas every 3 digits to the left #1

Open
fallerOfFalls opened this issue Nov 2, 2021 · 4 comments
Open

Commas every 3 digits to the left #1

fallerOfFalls opened this issue Nov 2, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@fallerOfFalls
Copy link

fallerOfFalls commented Nov 2, 2021

It's going to be hard to read big numbers and easy to make order-of-magnitude mistakes. Can commas be added? More on this concept.

A concern is that it might interfere with copying and pasting.

@fallerOfFalls fallerOfFalls added the enhancement New feature or request label Nov 2, 2021
@qwahzi
Copy link
Contributor

qwahzi commented Nov 2, 2021

Perhaps we should use JavaScript's .toLocaleString() to return language-sensitive number representations in the UI?

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString

@qwahzi
Copy link
Contributor

qwahzi commented Nov 5, 2021

This has been added to my PR here, but copy/pasting still needs to be more thoroughly tested. In my own testing (Windows Chrome), the sending amount field already strips pasted commas, but I'm not sure what the behavior is across different locales (e.g. EU where commas and decimals are flipped)

image

#2

JeanOUINA pushed a commit that referenced this issue Nov 5, 2021
@fallerOfFalls
Copy link
Author

Ah that's much better, thanks.

Pasting into Natrium results in "," being replaced with "." Should that be considered a Natrium problem?

@qwahzi
Copy link
Contributor

qwahzi commented Nov 14, 2021

In Natrium, commas are stripped while decimals are supported, while in NyanoWallet both commas and decimals are stripped (to focus on sending "whole Nyano")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants