microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
107.02k stars 6.31k forks source link

PowerToys Run: Unit converter DATA UNITS - binary issue #33026

Open Raf-UJ opened 1 month ago

Raf-UJ commented 1 month ago

Microsoft PowerToys version

0.81.0

Installation method

Microsoft Store

Running as admin

Yes

Area(s) with issue?

PowerToys Run

Steps to reproduce

typing %% 5GB in MB in the panel

or any other data unit conversion

✔️ Expected Behavior

4768.4MB

Why would I even use the conversion when it's just decimal shift by the amount of zeros. I am aware that Microsoft is still using decimal for conversion but using "mebi" etc. is something I never knew until today. I looked it up not to look like an idiot while writing this. For most power-users that glanced it over ages ago it won't make sense.

Two possible solutions on this:

  1. Providing each results per environment with explanation to educate
  2. Give the user the ability to choose how to convert data units un default and move on.

While we're still in "transition period" for another few years (whilst being fed MB>KB decimal conversions daily) nobody would use conversion for that, you would just know or boot up a calc (or type = 5*1000)

Imagine that you do have this implementation and the output is:

5 GB = 5,000 MB  - Storage (SI System, 1960):
5 GiB = 5,120 MiB  - RAM (IEC System, 1998): 
5 GiB = 5,120 MiB  - VRAM (IEC System, 1998): 
Networking (ITU Standards, various dates): Data transfer rates typically use the decimal system (e.g., 1 Mbps = 1,000,000 bps).
Databases, Cloud Services,Software Development*: Generally follows the same SI and IEC standards as storage and RAM.
*depending on the platform and context.

❌ Actual Behavior

5000MB

writing MiB is resulting in the correct thing

Other Software

No response

github-actions[bot] commented 1 month ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

david-hankinson commented 1 week ago

Hello, it would be great to have a look at this for my first PR. Could you share with me where the file is to make this change?

28769

david-hankinson commented 1 week ago

I've narrowed it down to:

https://github.com/microsoft/PowerToys/tree/main/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter

htcfreek commented 1 week ago

@david-hankinson Your contribution is welcome and thank you for your work on this. Feel free to open a PR. If you have any further questions don't worry to ask them.

What is your exact plan? (Implement "MB" for 1000 and "MiB" for 1024? That is what would make most sense to me.)

david-hankinson commented 1 week ago

@htcfreek Thanks for the offer to ask questions, it makes working on this project seem like a good idea :)

I have created the following draft PR as a starting point.

33563