Files
pad/web/src
xarmian 520380946e feat(collections): page-wide sort control + priority-weight helper (TASK-1670, closes IDEA-1648) (#673)
Add a Sort dropdown to the collection toolbar (Manual, Priority,
Recently updated, Created, A→Z) applied within each lane/group in both
BoardView and ListView. A shared helper (lib/collections/itemSort.ts)
builds the comparator; the priority weight reads the `priority` select
field's own options order, so high/medium/low and must/should/nice both
rank naturally (top option = highest) with no hardcoded map.

- 'manual' (default) resolves to the stored sort_order — prior behavior.
- Non-manual sorts disable item drag (like the preserveOrder seam): a
  comparator-ordered lane can't accept a drag, so DnD is suppressed.
- 'Priority' is hidden when the collection has no priority field; a
  stale persisted 'priority' falls back to 'manual'.
- Sort persists per collection in localStorage (mirrors view mode).
- Table view keeps its own column sorting; the control is board/list only.
2026-05-30 21:30:12 -04:00
..
2026-03-26 01:52:36 +00:00