Storage size displayed with inappropriate unit

Problem description:

Expected behavior:
be normal :innocent:

Actual behavior:
i weigh 0.07 ton

Steps to reproduce:
just log in and go to the replit list

Bug appears at this link:
https://replit.com/@farteryhr

Browser/OS/Device:
ubuntu 18.04 firefox 113.0.2 64bit

yes, that is true, and I completely agree. As a temporary fix, you could use javascript or tampermonkey to temporarily mitigate this problem. I’ll attach a bookmarklet code snippet below later (paste into a bookmark as the URL, then click to activate it).
Also, this might be intentional, to make it seem like each repl is very small.

Here is the code:

javascript: (function(){ setInterval(function(){let convert = {"MiB": "KiB", "GiB": "MiB", "TiB": "GiB"}; document.querySelectorAll(".css-10z1dta").forEach(e => {if (e.innerHTML.startsWith("0.")){console.log(e.innerHTML); let x = e.innerHTML.split(" "); let num = parseFloat(x[0]) * 1024; let unit = convert[x[1]]; console.log(num, unit); e.innerHTML = num + " " + unit;}})}, 200); })();

1 Like

Hey @farteryhr!

I’m not sure I understand your report. Are you suggesting that we use sizes like “50.5 MB” instead of “0.0505 GB” (hopefully my math is correct on that)?

3 Likes

@farteryhr going off of what Shane said (this isn’t a bug but a current feature, if you want it changed change the topic to Feature Requests) are you asking to change the unit of sizes or change something else? If you don’t use much storage it will be at mebibytes(MiB) (a mebibyte is 48,576 bytes bigger than a megabyte) when it reaches a certain point it goes to gibibytes(GiB). Hope this answers your question.

2 Likes

That would seem to be their request here, yes. Those sizes would make more sense too.

3 Likes

Moving this to Feedback/General Problems! In the future, @farteryhr, please do your best to be clear and descriptive in your post. This will help us help you!

4 Likes

No, GiB is Gibibytes.

2 Likes

This may be helpful: ResearchDrive - Understanding Storage Units GB vs. GiB

Summary (TL;DR)
Storage is sold in GB (base-10), but file system sizes are reported in GiB (base-2). Those are not the same thing, and if you assume they are, any cost calculations you do will not be correct.

4 Likes

exactly, i hope the size display is gonna be clear and descriptive like at how most other websites/apps are, unlike what it looks like in my main post :innocent: maybe i should’ve written “i weigh 70kg” in the “expected behavior”.
i believe it’s a widespread (and unspoken) convention to have 1-3 significant digits before the decimal point here, i.e. 123KiB, 12.3KiB, 1.23KiB, and i’m afraid it’s some off-by-one bug on choosing the unit when displaying.
as for Kib or KB, i’m ok with either. maybe KiB is better.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.