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
File size display in file browser should use correct units #16205
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
Quick look: I think that the file manager in Then on frontend this is formatted here jupyterlab/packages/filebrowser/src/listing.ts Lines 2695 to 2700 in b3f0b44
Using this function: jupyterlab/packages/filebrowser/src/listing.ts Lines 3007 to 3027 in b3f0b44
|
Does it make more sense to show MiB vs MB? What do most file browsers show? Real-estate-wise MB is shorter. Should it be configurable? |
@krassowski thank you for your quick response! Based on this: jupyterlab/packages/filebrowser/src/listing.ts Lines 2695 to 2700 in b3f0b44
it looks to me that because of the value of jupyterlab/packages/filebrowser/src/listing.ts Line 3020 in b3f0b44
As for what units to display, that's a good question. Mac and Windows file browsers typically use MB. Some Linux file browsers let you change the units. Technically, MiB might be more accurate, but I don't think there is a established standard here. Perhaps making this configurable would be the best approach? |
Problem
We have noticed that the file size displayed in the Jupyterlab file browser appears to be using an incorrect unit. The file sizes are reported in MiB but the displayed units are MB,GB, and so on. This is confusing as the actual size is not accurately represented.
Proposed Solution
I would recommend updating the file browser to display the file sizes using the correct units (MiB) to match the actual file sizes reported by the OS.
In the screenshot above, the units displayed in the File Explorer should be MiB
Additional context
Has this issue been evaluated in the past and decided to report the file sizes in this way? If so, I'm curious to understand the reasoning behind that decision.
The text was updated successfully, but these errors were encountered: