Content
View differences
Updated by Alexander Coles 4 days ago
## Context
The work package table and the card view each carry their own copy of the row selection policy: plain click replaces, Shift ranges from the anchor, Ctrl/Cmd toggles, right-click keeps a selection that already contains the row, drag pickup collapses a wider selection (`wp-fast-table/handlers/row/click-handler.ts`, `wp-card-view/event-handler/click-handler.ts` and their right-click siblings). The table also paints `-checked` in two places. Adopting the batch selection model from #AGILE-361 would mean editing all of them.
Two latent index slips live in the duplicates: the table right-click handler passes a work package id where a class identifier is expected, so the range anchor becomes -1 after every right-click; drag pickup indexes a different array than Shift-click.
## Goal
One `WorkPackageViewSelectionGesturesService`, provided per isolated query space, maps gestures onto `WorkPackageViewSelectionService`; the table and card view handlers become one call each. `WorkPackageViewSelectionService` stays the store, so context menu, split view, boards and calendar are unchanged. One paint function owns the table's table's `-checked` / `-pressed` classes at build time and on live updates. Behaviour otherwise unchanged; the anchor still stays at the first selected row. Ctrl/Cmd anchor rebasing per AGILE-181 is a follow-up that swaps what sits behind this seam.
### Hints Depends on #OP-20196 for QA
This is part of a series of work packages that touch selection in the Work Package table and card views (i.e. Boards). Please do a quick smoke test. We can perform more extensive testing after the next WP in this series. harness.
The work package table and the card view each carry their own copy of the row selection policy: plain click replaces, Shift ranges from the anchor, Ctrl/Cmd toggles, right-click keeps a selection that already contains the row, drag pickup collapses a wider selection (`wp-fast-table/handlers/row/click-handler.ts`, `wp-card-view/event-handler/click-handler.ts` and their right-click siblings). The table also paints `-checked` in two places. Adopting the batch selection model from #AGILE-361 would mean editing all of them.
Two latent index slips live in the duplicates: the table right-click handler passes a work package id where a class identifier is expected, so the range anchor becomes -1 after every right-click; drag pickup indexes a different array than Shift-click.
## Goal
One `WorkPackageViewSelectionGesturesService`, provided per isolated query space, maps gestures onto `WorkPackageViewSelectionService`; the table and card view handlers become one call each. `WorkPackageViewSelectionService` stays the store, so context menu, split view, boards and calendar are unchanged. One paint function owns the table's
### Hints
This is part of a series of work packages that touch selection in the Work Package table and card views (i.e. Boards). Please do a quick smoke test. We can perform more extensive testing after the next WP in this series.