DevToys-app / DevToys

A Swiss Army knife for developers.
https://devtoys.app/
MIT License
27.55k stars 1.47k forks source link

Bytes Unit Converter #148

Open Silvenga opened 2 years ago

Silvenga commented 2 years ago

Is your feature request related to a problem? Please describe. I've commonly need to convert between MB to GB or MB to Bytes. For smaller numbers, Googling this conversion works. But for anything marginally large, Google quickly becomes useless.

image

image

Describe the solution you'd like

A converter for such thing, likely limited to the common units:

I'm unsure of the UX involved.

One on hand, the existing Hash Generator plugin is great. One input, multiple outputs.

Input:
Dropdown (Select the Unit e.g. TB)
Ratio Buttons (Select binary or decimal based conversions)

Output:
Text fields for each other unit (filtered by decimal vs binary).
e.g. GB, MB, etc.

On another hand, Google's UX might be simpler.

Input:
Dropdown (Select the input unit e.g. TB)
Textbox for number

Output:
Dropdown (Select the destination unit e.g. TB)

Although, data binding between the two is always a little annoying.

veler commented 2 years ago

Hello,

Thank you for your suggestion! I like this idea! I think it would make sense to have a similar approach to Hash Generator. :)

expikr commented 2 years ago

I think because the byte conversions are immutable universal truths with each other, and they are of fixed patterns, and the fact that they have only one degree of freedom, I think a simultaneous table of all the byte sizes in two columns is the best UI. Updating one field signals all other fields to be updated to match it.

image