Spaces overview: drop the sort dropdown — sort by table headers; files table gains sortable Owner and Tags #786

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

Nikola: "we don't need the sort dropdown if we have the table where users can sort by table headers, which is already partially enabled. owner and tags should also be sortable."

Explicit instructions:

  1. Remove the .spovsort <select> from the overview head (markup, wiring, prefs.spovSort select persistence, its CSS, the spovSort/spovSortMembers i18n keys' usage — keys may stay), and the qa783 pins on it (update the test honestly in the same push).
  2. Overview table headers become sortable with the SAME affordance the files table uses: the .hsort pattern (clickable header, ascending/descending toggle, arrow indicator classes exactly as the files list header renders them — copy the markup/class conventions, do not invent new ones). Sortable columns: Name (default A–Z), Members, Storage used, State (Active < Directory < Deactivated or alpha — pick alpha of the chip label, document in code comment). Clicking toggles direction per the files-table rule (name defaults asc, numeric columns default desc). Persist as prefs.spovSort ("name-asc" style values, reuse the existing pref key).
  3. Tiles mode: cards follow the same stored sort (re-append, as today). No sort UI in Tiles beyond what the stored pref gives — matches files-view behavior where header sorting lives in the list.
  4. Files table: make Owner and Tags headers sortable via the existing data-sort/.hsort mechanism — add comparators to the files sort engine (owner: userDisp alpha, empty last; tags: first tag alpha, untagged last) and mark both <th>s with the .hsort class + data-sort attributes. Verify the sort dropdown menu (sortmenu) does NOT need new entries — header-only is fine for these two, matching "partially enabled" today.
  5. Sweep pins/censuses before pushing: qa5/qa734/misc6 (setView region untouched), any test pinning the files <th> markup, qa783's dropdown pins (update), the fbSetSort callers.

Acceptance: overview has no sort select; clicking NAME / MEMBERS / STORAGE USED / STATE sorts with visible direction arrows and survives re-render; in files views, clicking OWNER or TAGS sorts; existing name/size/modified header sorting unchanged.

Nikola: "we don't need the sort dropdown if we have the table where users can sort by table headers, which is already partially enabled. owner and tags should also be sortable." **Explicit instructions:** 1. Remove the `.spovsort` `<select>` from the overview head (markup, wiring, `prefs.spovSort` select persistence, its CSS, the `spovSort`/`spovSortMembers` i18n keys' *usage* — keys may stay), and the qa783 pins on it (update the test honestly in the same push). 2. Overview table headers become sortable with the SAME affordance the files table uses: the `.hsort` pattern (clickable header, ascending/descending toggle, arrow indicator classes exactly as the files list header renders them — copy the markup/class conventions, do not invent new ones). Sortable columns: Name (default A–Z), Members, Storage used, State (Active < Directory < Deactivated or alpha — pick alpha of the chip label, document in code comment). Clicking toggles direction per the files-table rule (name defaults asc, numeric columns default desc). Persist as `prefs.spovSort` ("name-asc" style values, reuse the existing pref key). 3. Tiles mode: cards follow the same stored sort (re-append, as today). No sort UI in Tiles beyond what the stored pref gives — matches files-view behavior where header sorting lives in the list. 4. Files table: make Owner and Tags headers sortable via the existing `data-sort`/`.hsort` mechanism — add comparators to the files sort engine (owner: `userDisp` alpha, empty last; tags: first tag alpha, untagged last) and mark both `<th>`s with the `.hsort` class + `data-sort` attributes. Verify the sort dropdown menu (`sortmenu`) does NOT need new entries — header-only is fine for these two, matching "partially enabled" today. 5. Sweep pins/censuses before pushing: qa5/qa734/misc6 (setView region untouched), any test pinning the files `<th>` markup, qa783's dropdown pins (update), the `fbSetSort` callers. **Acceptance:** overview has no sort select; clicking NAME / MEMBERS / STORAGE USED / STATE sorts with visible direction arrows and survives re-render; in files views, clicking OWNER or TAGS sorts; existing name/size/modified header sorting unchanged.
Cordy closed this issue 2026-09-28 02:48:42 +00:00
Author
Owner

Shipped in v0.6.297 (PR #796), live on both dogfoods. Verified on Bao after deploy:

  • Overview: no sort dropdown. Members header → most members first ("test" 2, then 1, then 0s by name), accent + arrow; click again reverses; persisted; Name → back to A–Z.
  • Files (Fall 3): Owner header → "test owner" (nikola-test) first, owner-less folders last; reversed → owner-less folders still last; header accent + arrow; sort button reads "Owner A–Z" / "Owner Z–A" instead of falling back to "Name A–Z". Tags uses the same logic (checked in Node against sample data — the dogfood has no tagged items in a view with owners).

Before shipping, both comparators were executed against sample data taken straight from the spliced file (both directions, empties, ties, legacy stored values).

Prefs restored after the checks and confirmed across a real reload: files Name A–Z, overview Name A–Z, List. Ready for review.

**Shipped in v0.6.297 (PR #796), live on both dogfoods. Verified on Bao after deploy:** - **Overview:** no sort dropdown. Members header → most members first ("test" 2, then 1, then 0s by name), accent + arrow; click again reverses; persisted; Name → back to A–Z. - **Files (Fall 3):** Owner header → "test owner" (nikola-test) first, owner-less folders last; reversed → owner-less folders *still* last; header accent + arrow; sort button reads "Owner A–Z" / "Owner Z–A" instead of falling back to "Name A–Z". Tags uses the same logic (checked in Node against sample data — the dogfood has no tagged items in a view with owners). Before shipping, both comparators were executed against sample data taken straight from the spliced file (both directions, empties, ties, legacy stored values). Prefs restored after the checks and confirmed across a real reload: files Name A–Z, overview Name A–Z, List. 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#786
No description provided.