Paratii-Video / paratii-portal

Component-based web-interface for uploading, browsing and organising content of Paratii's P2P network.
GNU General Public License v3.0
12 stars 5 forks source link

Better precision (for high values) in showing credits on current sidebar #764

Closed pedrocasa closed 5 years ago

pedrocasa commented 6 years ago

Current if we got a value higher than XXX the systen adds a "K" after it. We should be more precise and show as much as we can . In order to have more space let's remove the "PTI" that's writter side by the numbers.

image 1

The space of the boxes is not enough to fit any value (be it fractional or integer value). and probably when the users enter with ral high values these boxes will not be enough to see the complete balance.

screen shot 2018-07-04 at 5 14 25 pm

Showing the available PTI values and PTI staked one on top of the other could be an option but that would kill our percentage bar down

jellegerbrandy commented 6 years ago

Maybe we can do it like this: we define a maximum number of characters, say 10, and a precision, say 3 numbers behind the dot. And then we can do that if the number is more less than 10 chars, we print it completely, and if it is more, we use the abbreviation. So it would be something like this:

1 --> 1 1234567890 -> 1234567890 12345678901 -> 12345M 12.234 -> 12.234 12345678.901 -> 12M

(see what I mean?)

pedrocasa commented 6 years ago

Yes, Thnks a lot Jelle

bent0b0x commented 6 years ago

1234567890 -> 1234567890 12345678.901 -> 12M

The first number is bigger than the second and yet we show more precision for it. This doesn't really make sense to me.

How about we determine the precision by the number of digits before any decimals (i.e. max 10, any more we go to M for million, etc)

bent0b0x commented 6 years ago

@pedrocasa @jellegerbrandy actually, can we talk about this? I'm not sure I really understand what the problem is. We already are using a system where we show a certain number of digits and after a certain value we show abbreviations.

What problems is this causing on the pages where we already are already showing PTI?

jellegerbrandy commented 6 years ago

The problem with the current system is that 10.000 and 9.995 are both represented as "10K". That means that there is no place where you can see that you have paid 5 PTI.

so that is not good.

What I am proposing is that we show as much precision as the physical space allows. So if we have 10 chars, and the number is shorter or equal then 10 chars, we show the entire number, and if the string is longer 10 chars, we show the abbreviated value. This is still not perfect, but at least we show the precise number in all cases where we can (which is better then what we have now).

1234567890 -> 1234567890 12345678.901 -> 12M The first number is bigger than the second and yet we show more precision for it. This doesn't really make sense to me.

The first number is shorter than the second, though :-)

On Sun, Jul 8, 2018 at 6:48 PM Ben notifications@github.com wrote:

@pedrocasa https://github.com/pedrocasa @jellegerbrandy https://github.com/jellegerbrandy actually, can we talk about this? I'm not sure I really understand what the problem is. We already are using a system where we show a certain number of digits and after a certain value we show abbreviations.

What problems is this causing on the pages where we already are already showing PTI?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Paratii-Video/paratii-portal/issues/764#issuecomment-403300544, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPuPTA8v-Q8Yi7p6vIaZ2mSZS8r2w7Bks5uEjfpgaJpZM4VC_OB .

felipegaucho commented 5 years ago

Not valid anymore since this part of the UI got simplified :)