Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Change font size of amount to be send when over 9 digits are entered #308

Closed
ltfschoen opened this issue Dec 19, 2018 · 2 comments
Closed

Comments

@ltfschoen
Copy link
Contributor

I have an account with THIBCoin, and I've been asked to transfer all of it to another account to cover the cost of a ransom or face consequences.
In the UI I go to the "Send THIBCoin" page where it shows I only have a balance of 1,123.460,932.
I know this transaction has to be precise, but luckily I'm a long-term user so I know the values shown on this page in UI are rounded to 6 decimal places, so to make sure I enter the correct value I click the link provided by #98 (instead of having to use a search engine or bookmark to find the etherscan link where I get can the exact account balance that has been demanded (note that the value shown on Etherscan is the base units https://kovan.etherscan.io/token/0x4a6e6c3868a279e1d9047b42c3fb356ff4680003?a=0x005072Fb985cc64d8A1Ce00ECe26279f73c12F8a.
So I enter the exact account balance, which is actually 1,123.460,932,110 THIB.

screen shot 2018-12-19 at 6 17 22 pm

But it clips the value as shown above.

So propose to reduce the font-size when the value entered is >9 digits long. This involves changing
the CSS `input.form_field_amount[type='number'] from its existing font-size: 2.98598rem;

If we reduce it to font size of 2rem it fits 14 decimal places, or if we reduce it to 1.4rem it fits the smallest unit.

screen shot 2018-12-19 at 6 23 21 pm

Alternative is to permanently reduce the font size to some value.

@axelchalon
Copy link
Contributor

Sounds good, maybe a library like https://github.com/rikschennink/fitty could help, we could then make the text automatically shrink to fit its container without clipping

@Tbaut
Copy link
Collaborator

Tbaut commented Dec 19, 2018

Totally, I was thinking about it the other day. Doing it dynamically would be great. I guess it's fine to check for the amount of digits or catch the overflow event.

@Tbaut Tbaut added this to the 0.3-beta Mainnet milestone Dec 19, 2018
@ltfschoen ltfschoen self-assigned this Jan 7, 2019
amaury1093 added a commit that referenced this issue Jan 7, 2019
feat: Fixes #308. Change amount font size on Send page to fit in input field
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants