swarmcity / SwarmCityDapp

Swarm City dApp FrontEnd
MIT License
28 stars 10 forks source link

amount doesn't scale #710

Closed kikipluche closed 6 years ago

kikipluche commented 6 years ago

From @kikipluche on April 26, 2018 9:28

Location

my wallet

Expected behavior

The full amount is always visible on my screen, so when a lot of decimals, it scales

Actual behavior

when the amount has a lot of decimals, the numbers fall off the screen

Steps to reproduce the problem

have many decimals, and go to mywallet

screenshot/screencap

Screen Shot 2018-04-26 at 11.24.23.png

Operating system / hardware

on mobile it is more an issue than on desktop

Copied from original issue: swarmcity/SwarmCityPM#18

xardass commented 6 years ago

I think we need a styling advice from @faffydee

hershkoy commented 6 years ago

I think I found how I can do that. The thing is if they are too many digits, the font might scale to become too small. How many digits are suppose to be there? I can do this one, just need to know how to fix it. rounding to digits or auto-scaling or a combination of both.

image

xardass commented 6 years ago

Thank you hhezi, but as you say it's more a styling decision that we still need to make rather than a current issue - ideally we would just round the amount to x digits (toFixed(x))..

kikipluche commented 6 years ago

@faffydee we need an advice about the minimum fontsize, so we can round at that decimal. Hhezi is right, if we do 18 decimals, the font will be too small; same for the USD value (or maybe we want to round that amount anyway)

xardass commented 6 years ago

@kiki We also need to consider the animations & if scaling the amount will not break them (Since they are defined by px).

faffydee commented 6 years ago

to old to be relevant