Badget icon indicating copy to clipboard operation
Badget copied to clipboard

Feature: Spacing between numbers in modal

Open Codehagen opened this issue 1 year ago • 9 comments

Feature Request

Type: 💡 Feature

Current Behavior: Currently, the modal does not format numbers correctly. When you enter a number like 123456789, it displays without any spaces. We need it to display as 123 456 789.

Steps to Reproduce:

  1. Go to /dashboard
  2. Click on Add Asset
  3. Click on Add Account
  4. Observe the number formatting issue as shown in the screenshot:

Screenshot 2024-05-14@2x

Suggested Solution: Modify the input fields for numbers to automatically insert spaces between every thousand. Ensure that these spaces are removed when the value is processed as a number.

Additional Context: No response

Codehagen avatar May 14 '24 12:05 Codehagen

.take

Amirthananth avatar May 14 '24 16:05 Amirthananth

Hi @Amirthananth - A person on discord is working on this. New person that wanted to try this one. Can fix a new issue.

Codehagen avatar May 14 '24 17:05 Codehagen

Hey @Codehagen that person is me :) the name is different on discord and GitHub that's why the confusion 😅

Amirthananth avatar May 14 '24 17:05 Amirthananth

Ahh! No worries. Then go for it 😁. The person who made this is going to review it after to see ⚡

Codehagen avatar May 14 '24 17:05 Codehagen

@Codehagen I was wondering if we should space as the separator or comma as a separator ?

Amirthananth avatar May 14 '24 20:05 Amirthananth

I think space is best. Since some countries have comma and some had dots. With spaceing they cant argue 😅

Codehagen avatar May 14 '24 20:05 Codehagen

That sounds fair. We should go for spaces if we want to keep it generic. If we want to be specific to a region then maybe we can go for https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString#

Amirthananth avatar May 15 '24 05:05 Amirthananth

Ahh! No worries. Then go for it 😁. The person who made this is going to review it after to see ⚡

@Codehagen For sure!

ousszizou avatar May 15 '24 05:05 ousszizou