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

Simplify speed/size numbers in the UI #50

Closed
feross opened this issue Mar 6, 2016 · 7 comments
Closed

Simplify speed/size numbers in the UI #50

feross opened this issue Mar 6, 2016 · 7 comments

Comments

@feross
Copy link
Member

feross commented Mar 6, 2016

We want to be the simplest torrent client! 😄

No one cares if they're getting 850.62 KB/s or 850.91 KB/s as their download speed.

Let's round with Math.floor() in pretty-bytes, like we already do for the progress percentage.

screen shot 2016-03-06 at 1 16 34 am

@ungoldman
Copy link
Contributor

@feross that doesn't quite work for now:

<span>↓ ${prettyBytes(Math.floor(torrent.downloadSpeed || 0))}/s</span>
<span>↑ ${prettyBytes(Math.floor(torrent.uploadSpeed || 0))}/s</span>

pretty-bytes does the conversion to nB and places the decimal afterwards. We could go in and manipulate the string, or fork pretty-bytes. I agree decimals aren't necessary for upload/download speed, but I think it's still important for file size. Big difference between 1.01 GB and 1.91 GB.

@rom1504
Copy link
Member

rom1504 commented Mar 6, 2016

What about 1.01 MB/s and 1.92 MB/s

@rom1504
Copy link
Member

rom1504 commented Mar 6, 2016

The limit should probably be on the number of Significant figures.

@feross
Copy link
Member Author

feross commented Mar 8, 2016

@rom1504 Yeah, you make a good point. Reducing the max decimals to one digit could improve your example so:

1.01 MB/s -> 1.0 MB/s
1.92 MB/s -> 1.9 MB/s

And you're right that sig figs is closer to what we want.

@feross feross closed this as completed in #81 Mar 8, 2016
@feross feross changed the title Don't use decimal numbers anywhere in the UI Simplify speed/size numbers in the UI Mar 8, 2016
@feross feross reopened this Mar 8, 2016
@Flet
Copy link
Member

Flet commented Mar 8, 2016

Closed with #93?

@feross
Copy link
Member Author

feross commented Mar 8, 2016

@Flet Yes.

@feross feross closed this as completed Mar 8, 2016
@feross
Copy link
Member Author

feross commented Mar 8, 2016

Just sent a PR to clean up that module a lot: Flet/prettier-bytes#1

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants