Spaces batch bar: adopt the established selection bar (style, position, swap behavior) with per-selection actions #787

Closed
opened 2026-09-28 01:33:26 +00:00 by Cordy · 1 comment
Owner

Nikola: the overview's batch bar ignores the established design. The design-system bar is the files/recents selection bar — full-width white bar with icon+label actions left, "n selected · Clear selection ✕" right, sitting in the toolbar slot (it SWAPS with the actions row in place, #389). OpenCloud reference: the action set adapts to the selection (1 selected → Duplicate/Download/Edit quota/Disable; 2 → Download drops out).

Explicit instructions:

  1. Replace the current .spovbar (pill chip + two buttons above the table) with a bar using the EXACT established selbar structure: reuse the .selbar classes/markup conventions (icon+label buttons, right-aligned .selN count + Clear selection ✕). Scout the files #selbar markup and clone its shape for a spaces-owned element (#spovselbar) — do NOT reuse the #selbar element itself (it belongs to the files table, see the leak issue).
  2. Position: the toolbar slot — when selection > 0 in the overview (List/Condensed), the bar occupies the same place the files selbar does (swapping with the #fileactions row content in place, no layout shift — mirror the body[data-sel] swap mechanism with a spaces-scoped equivalent).
  3. Actions, adapting to the selection like OpenCloud:
    • Any active space selected → Deactivate (fact-row confirm listing names, as shipped).
    • Any deactivated selected → Reactivate (no confirm — reversible, mirrors single-space menu).
    • All selected deactivated → Delete (fact-row confirm, as shipped).
    • Buttons appear/disappear rather than sit disabled, matching the OpenCloud pattern and our recents bar.
    • Edit quota joins when #767 lands; Duplicate/Download space are out of scope (rev3 exclusion) — note in code comment.
  4. Keep: kind-aware checkboxes (directory rows none), filter-deselect sync, askDanger censuses (recount qa693 — Reactivate adds none).
  5. Icons: reuse the existing selbar icon convention (each action icon+label). Deactivate/Reactivate/Delete icons already exist as MI.pause/MI.play/MI.del.
  6. i18n ×4 for any new labels (Reactivate label exists as mSpaceReactivate/spcReactivate — reuse; "Clear selection" key exists for the files bar — reuse).

Acceptance: selecting rows in the overview swaps the toolbar row for a bar visually identical in style/position to the recents selection bar, with Deactivate/Reactivate/Delete appearing per the selection's states, names listed in the confirms, and Clear selection ✕ on the right; Tiles mode unaffected (no checkboxes there).

Nikola: the overview's batch bar ignores the established design. The design-system bar is the files/recents selection bar — full-width white bar with icon+label actions left, "n selected · Clear selection ✕" right, sitting in the toolbar slot (it SWAPS with the actions row in place, #389). OpenCloud reference: the action set adapts to the selection (1 selected → Duplicate/Download/Edit quota/Disable; 2 → Download drops out). **Explicit instructions:** 1. Replace the current `.spovbar` (pill chip + two buttons above the table) with a bar using the EXACT established selbar structure: reuse the `.selbar` classes/markup conventions (icon+label buttons, right-aligned `.selN` count + Clear selection ✕). Scout the files `#selbar` markup and clone its shape for a spaces-owned element (`#spovselbar`) — do NOT reuse the `#selbar` element itself (it belongs to the files table, see the leak issue). 2. Position: the toolbar slot — when selection > 0 in the overview (List/Condensed), the bar occupies the same place the files selbar does (swapping with the `#fileactions` row content in place, no layout shift — mirror the `body[data-sel]` swap mechanism with a spaces-scoped equivalent). 3. Actions, adapting to the selection like OpenCloud: - Any active space selected → **Deactivate** (fact-row confirm listing names, as shipped). - Any deactivated selected → **Reactivate** (no confirm — reversible, mirrors single-space menu). - All selected deactivated → **Delete** (fact-row confirm, as shipped). - Buttons appear/disappear rather than sit disabled, matching the OpenCloud pattern and our recents bar. - Edit quota joins when #767 lands; Duplicate/Download space are out of scope (rev3 exclusion) — note in code comment. 4. Keep: kind-aware checkboxes (directory rows none), filter-deselect sync, askDanger censuses (recount qa693 — Reactivate adds none). 5. Icons: reuse the existing selbar icon convention (each action icon+label). Deactivate/Reactivate/Delete icons already exist as MI.pause/MI.play/MI.del. 6. i18n ×4 for any new labels (Reactivate label exists as `mSpaceReactivate`/`spcReactivate` — reuse; "Clear selection" key exists for the files bar — reuse). **Acceptance:** selecting rows in the overview swaps the toolbar row for a bar visually identical in style/position to the recents selection bar, with Deactivate/Reactivate/Delete appearing per the selection's states, names listed in the confirms, and Clear selection ✕ on the right; Tiles mode unaffected (no checkboxes there).
Cordy closed this issue 2026-09-28 03:06:24 +00:00
Author
Owner

Shipped in v0.6.298 (PR #797), live on both dogfoods. Verified on Bao after deploy with real clicks:

  • Ticked app-owned-space + test (both active): the toolbar row swaps out for the standard selection bar — Deactivate (icon + label) left, "2 selected · Clear selection ✕" right; files bar stays hidden; Reactivate and Delete correctly absent.
  • Deactivate opens the fact-row confirm "Deactivate 2 spaces?" listing both names — cancelled (no state changed; both still Active), selection kept.
  • Leaving to Recents: spaces bar gone, toolbar back; returning to Spaces: nothing selected.
  • Pre-ship preview: panel top edge identical before/after the swap (no layout shift).

Not live-testable on the current data: Reactivate/Delete appearance needs a deactivated app-owned space — there is none on Bao. Logic is pinned and code-reviewed; worth one manual pass (deactivate a throwaway space via its menu, then select it: Reactivate + Delete should appear, Deactivate should not). Ready for review.

**Shipped in v0.6.298 (PR #797), live on both dogfoods. Verified on Bao after deploy with real clicks:** - Ticked app-owned-space + test (both active): the toolbar row swaps out for the standard selection bar — Deactivate (icon + label) left, "2 selected · Clear selection ✕" right; files bar stays hidden; Reactivate and Delete correctly absent. - Deactivate opens the fact-row confirm "Deactivate 2 spaces?" listing both names — **cancelled** (no state changed; both still Active), selection kept. - Leaving to Recents: spaces bar gone, toolbar back; returning to Spaces: nothing selected. - Pre-ship preview: panel top edge identical before/after the swap (no layout shift). Not live-testable on the current data: Reactivate/Delete appearance needs a deactivated app-owned space — there is none on Bao. Logic is pinned and code-reviewed; worth one manual pass (deactivate a throwaway space via its menu, then select it: Reactivate + Delete should appear, Deactivate should not). Ready for review.
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#787
No description provided.