767b: per-space quota — Edit quota dialog and "X of Y" display #803

Closed
opened 2026-09-28 03:58:24 +00:00 by Cordy · 2 comments
Owner

Slice 2 of #767, after #802. Web only, design system as established (#785–#795).

Instructions

  1. Kebab (overview rows/tiles and the space header): ◔ Edit quota, admins only, placed after "Edit image" (mockup rev3 §4).
  2. Dialog (the askName family, same look as the subtitle dialog): number input + unit select (MB / GB / TB, default GB, prefilled from the current cap), a secondary No limit button (→ DELETE), primary Save (→ PUT). Validation: > 0; show the current usage under the field ("Currently 2.1 GB used").
  3. Selection bar (#787): Edit quota appears when the selection holds only app-owned or directory spaces and the user is an admin. One dialog, applied to each space; success toast "Quota set for n spaces".
  4. Display where a cap exists (uncapped rows unchanged):
    • Overview Storage used column: 2.1 GB of 10 GB plus a 3px bar under it (var(--rule-2) track, accent fill; amber ≥ 90 %, var(--danger) when over).
    • Tile meta line: 2.1 GB of 10 GB.
    • Space header: a small usage line under the subtitle.
    • The footer "measured" figure stays as-is.
  5. i18n keys for all strings (en + the existing languages' fallbacks).

Tests

Node pins for the kebab entry, admin gate, dialog verbs, the PUT/DELETE calls, the of formatter, and the bar thresholds.

Slice 2 of #767, after #802. Web only, design system as established (#785–#795). ## Instructions 1. **Kebab** (overview rows/tiles and the space header): `◔ Edit quota`, **admins only**, placed after "Edit image" (mockup rev3 §4). 2. **Dialog** (the `askName` family, same look as the subtitle dialog): number input + unit select (MB / GB / TB, default GB, prefilled from the current cap), a secondary **No limit** button (→ DELETE), primary **Save** (→ PUT). Validation: > 0; show the current usage under the field ("Currently 2.1 GB used"). 3. **Selection bar** (#787): `Edit quota` appears when the selection holds only app-owned or directory spaces and the user is an admin. One dialog, applied to each space; success toast "Quota set for n spaces". 4. **Display** where a cap exists (uncapped rows unchanged): - Overview **Storage used** column: `2.1 GB of 10 GB` plus a 3px bar under it (`var(--rule-2)` track, accent fill; amber ≥ 90 %, `var(--danger)` when over). - Tile meta line: `2.1 GB of 10 GB`. - Space header: a small usage line under the subtitle. - The footer "measured" figure stays as-is. 5. i18n keys for all strings (en + the existing languages' fallbacks). ## Tests Node pins for the kebab entry, admin gate, dialog verbs, the PUT/DELETE calls, the `of` formatter, and the bar thresholds.
Author
Owner

Mockup reviewed (2026-09-28): mockup-803-space-quota.html, rendered in-app on Bao. Decisions:

  • Space header: 7b, meter in the right column under the Members button (not inline after the name).
  • Amber at ≥ 90 %, --danger when over.
  • Unit picker MB / GB / TB (default GB); no presets.
  • Batch Edit quota for directory spaces + disabled Deactivate with tooltip → separate issue.
  • Implementation note: new classes use the spq* prefix (the app already has .qrow).
**Mockup reviewed (2026-09-28)**: `mockup-803-space-quota.html`, rendered in-app on Bao. Decisions: - Space header: **7b**, meter in the right column under the Members button (not inline after the name). - Amber at **≥ 90 %**, `--danger` when over. - Unit picker **MB / GB / TB** (default GB); no presets. - Batch Edit quota for directory spaces + disabled Deactivate with tooltip → separate issue. - Implementation note: new classes use the `spq*` prefix (the app already has `.qrow`).
Cordy closed this issue 2026-09-28 15:32:39 +00:00
Author
Owner

Shipped in v0.6.302 (PR #809, CI green, web 290/290). Verified live on Bao through the real UI:

  • Space menu: "Edit quota" sits right after "Edit image" in both the row menu and the space header's menu (directory space, admin).
  • Dialog:
    • Title and hint are correct; prefill matches the stored cap ("3 MB", "3.6 MB", "3 GB").
    • The live hint switches between "Currently … used (92%)" (amber bar) and "already holds 3.3 MB, more than this limit…" (danger bar).
    • Save → PUT; the overview refreshes in place. No limit → DELETE; the header refreshes and the meter disappears.
  • States: Fall 3 at 3 MB → spq-over (red "3.3 MB of 3.0 MB"); at 3.6 MB → spq-warn (amber); cleared afterwards.
  • Space header (7b): Members button, then "3.3 MB of 3.6 MB used" with the bar in the right column.
  • Selection bar: "Edit quota" appears with two spaces picked; the dialog reads "Edit quota for 2 spaces" with an empty field and Save disabled (cancelled — nothing changed).
  • Tiles: "0 B of 3.0 GB" + bar on the capped tiles; uncapped tiles unchanged.
  • After a real reload the view prefs are unchanged.

The two 3 GiB caps on app-owned-space and test were already set when the check started (not by this check) and were left as they are.

Possible polish (not changed): the shared fmtSize renders 3 GiB as "3.0 GB"; the mockup showed "3 GB".

Shipped in **v0.6.302** (PR #809, CI green, web 290/290). Verified live on Bao through the real UI: - **Space menu:** "Edit quota" sits right after "Edit image" in both the row menu and the space header's menu (directory space, admin). - **Dialog:** - Title and hint are correct; prefill matches the stored cap ("3 MB", "3.6 MB", "3 GB"). - The live hint switches between "Currently … used (92%)" (amber bar) and "already holds 3.3 MB, more than this limit…" (danger bar). - Save → PUT; the overview refreshes in place. No limit → DELETE; the header refreshes and the meter disappears. - **States:** Fall 3 at 3 MB → `spq-over` (red "3.3 MB of 3.0 MB"); at 3.6 MB → `spq-warn` (amber); cleared afterwards. - **Space header (7b):** Members button, then "3.3 MB of 3.6 MB used" with the bar in the right column. - **Selection bar:** "Edit quota" appears with two spaces picked; the dialog reads "Edit quota for 2 spaces" with an empty field and Save disabled (cancelled — nothing changed). - **Tiles:** "0 B of 3.0 GB" + bar on the capped tiles; uncapped tiles unchanged. - After a real reload the view prefs are unchanged. The two 3 GiB caps on `app-owned-space` and `test` were already set when the check started (not by this check) and were left as they are. Possible polish (not changed): the shared `fmtSize` renders 3 GiB as "3.0 GB"; the mockup showed "3 GB".
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#803
No description provided.