Nextcloud version:
13.0.4
The Quota can break out of the intended bounds. This breaks the style.
I propose to cut off sub-zero decimal places to gather more space if the used and or available exceeds a given size.

I could open a pull request for the changes if nessessary.
GitMate.io thinks possibly related issues are https://github.com/nextcloud/server/issues/2017 (quota), https://github.com/nextcloud/server/issues/7329 (Deleted files in shared folder take twice the disk space), https://github.com/nextcloud/server/issues/1858 (Unable to create or interact with files containing spaces.), https://github.com/nextcloud/server/issues/5142 (Files app not showing files), and https://github.com/nextcloud/server/issues/6486 (Quota bar in files app greyed out).
While I agree the .1GB here is pretty useless. It should also need a more flexible solution as certain langauges might translate it still to to long a string.
What could we do?
Create boundaries which create a linebreak when nessessary?
Show only "5MB of 5GB"
Do not show words at all and reduce it only to "5MB/5GB"?
I have no clue whats best here
Me neither. @nextcloud/designers input please :D
I'd say we can just add an ellipsis at the end if the text gets too long or we can just get rid of the verb and use "300GB of 500GB", since it should be clear that this is about the used space.
I have an open pull request, which edits the fileapp (and even the file which handles the quota).
Can i include a fix there, or should i open a second pull request?
I can then change this text, after a solution was found
@newhinton do it :)
A new PR please. ;)
@MorrisJobke I already added the commit to the existing pr. ^^
I'll revert it and make a new one ;)
I propose to cut off sub-zero decimal places to gather more space if the used and or available exceeds a given size.
Sounds good, but only if the value is >= 10, because below 10, the decimal is actually a big percentage of the whole number. Also good adding the ellipsis of course.
or we can just get rid of the verb and use "300GB of 500GB", since it should be clear that this is about the used space.
Disagree here @juliushaertl, as that is then way too technical and not so friendly.
Another option would be to make sure that the units are always the same (both GB, or both MB for example), then we only have to show the unit once. So it would be:
261 of 500 MB used
or
2.5 of 500 GB used
At the moment, the filesize is reduced in the following cases:
over 100MB and under 1GB
and
over 100GB and under 1TB
this can easily be changed and or expanded to fit our needs
@newhinton cool! Could you adjust it as I described then? Would be awesome! :) (Also, it seems your pull request at https://github.com/nextcloud/server/pull/10245 is a bit broken cause it has a ton of commits in there?)
@jancborchardt yes that may indeed be true, i guess i made a mistake as i tried to update my fork. I'll update or redo the PR when i have time to do so :)
(And yes, i'll make the changes too ;) )
@jancborchardt I have recreated the pr. Currently the filesizes are reduced when quota (used and total) shows:
over 10MB and under 1GB
and
over 10GB and under 1TB
Another option would be to make sure that the units are always the same (both GB, or both MB for example), then we only have to show the unit once. So it would be:
This would be way to complicated for little gain. Consider a combination like this:
200B of 500GB
Any combination of different exponents would create a different case, which we would need to cover. Often you would need to show both exponents as well as the number, and only sometimes not. The behaviour would not be consistent over all sizes. And i dont think that this is a good idea
The current display is set to
261MB of 500 MB used
instead of
261 of 500 MB
which was in the old pullrequest.
Most helpful comment
@MorrisJobke I already added the commit to the existing pr. ^^
I'll revert it and make a new one ;)