Quota meter: drop the trailing ".0" (3 GB, not 3.0 GB) #810

Closed
opened 2026-09-28 15:42:47 +00:00 by Cordy · 1 comment
Owner

Follow-up to #803 (Nikola, 2026-09-28): the shared fmtSize renders 3 GiB as "3.0 GB". In the quota meter and the quota dialog, drop a trailing .0 so whole values read "3 GB". Users who want finer granularity pick MB.

Instructions

  • Add spqSize(n): fmtSize(n) with a trailing .0 before the unit removed ("3.0 GB" → "3 GB"; "3.6 MB" and "952 MB" unchanged; 0 → "0 B").
  • Use it for every size the quota UI prints (spqMeter used and cap, and the dialog's spqNow/spqAbove).
  • Do not change fmtSize itself. File sizes elsewhere keep their current format.

Tests

Node: spqSize exists and spqMeter/the dialog no longer call fmtSize directly. Also evaluate spqSize on 3 GiB, 3.6 MiB, 952 MiB and 0.

Follow-up to #803 (Nikola, 2026-09-28): the shared `fmtSize` renders 3 GiB as "3.0 GB". In the quota meter and the quota dialog, drop a trailing `.0` so whole values read "3 GB". Users who want finer granularity pick MB. ## Instructions - Add `spqSize(n)`: `fmtSize(n)` with a trailing `.0` before the unit removed (`"3.0 GB"` → `"3 GB"`; `"3.6 MB"` and `"952 MB"` unchanged; `0` → `"0 B"`). - Use it for every size the quota UI prints (`spqMeter` used and cap, and the dialog's `spqNow`/`spqAbove`). - **Do not change `fmtSize` itself.** File sizes elsewhere keep their current format. ## Tests Node: `spqSize` exists and `spqMeter`/the dialog no longer call `fmtSize` directly. Also evaluate `spqSize` on 3 GiB, 3.6 MiB, 952 MiB and 0.
Cordy closed this issue 2026-09-28 15:45:31 +00:00
Author
Owner

Shipped in v0.6.303 (PR #811, CI green, web 292/292). Verified live on Bao: the capped rows read "0 B of 3 GB" (previously "3.0 GB"); the uncapped sizes are unchanged ("3.3 MB").

Shipped in **v0.6.303** (PR #811, CI green, web 292/292). Verified live on Bao: the capped rows read "0 B of 3 GB" (previously "3.0 GB"); the uncapped sizes are unchanged ("3.3 MB").
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#810
No description provided.