Content
View differences
Updated by Alexander Coles 6 days ago
### Context
Backlogs already renders top/up/down/bottom move items server-side and lets the `sortable-lists` item controller gate availability and resolve the relative anchor. Resource Planner and several admin/settings surfaces independently render equivalent controls with different labels, icons, availability rules, and persistence paths.
### Goal
Provide one shared four-direction descriptor/helper for server-rendered move menus and align all sortable-list consumers on the same client-side gating and direction values, without coupling their domain-specific move endpoints.
The descriptor lands after #DREAM-786 establishes the extended suite contract. Each migration cluster adopts it while moving its surfaces; this is not a separate big-bang conversion.
### Acceptance criteria
- [ ] One descriptor defines top/up/down/bottom labels, icons, direction values, and Stimulus data.
- [ ] The server renders all four items; the item controller hides or disables unavailable moves from live DOM position.
- [ ] Menu moves resolve `prev_id` and use the same persistence request as a drag.
- [ ] The descriptor supports list rows beyond Backlogs cards and does not depend on a Backlogs model or endpoint.
- [ ] Backlogs remains behaviorally unchanged after adopting the descriptor.
- [ ] Project attributes are retrofitted after cluster 1; later DREAM-671 clusters adopt the descriptor during their migration.
- [ ] Resource Planner's bespoke submenu and persistence path are removed in #DREAM-793.
- [ ] Component and frontend tests cover first, middle, last, single-item, empty/gapped, and truncated-list availability.
### Paginated consumers
The shared client-side direction resolver operates on loaded rows. #AUTOWORK-285 and its semantic-table follow-up [DREAM-839](https://community.openproject.org/wp/DREAM-839) retain server-backed status menus because top/up/down/bottom can move across page boundaries. Do not replace them with loaded-row-only availability or anchors. Shared sortable-table integration [DREAM-838](https://community.openproject.org/wp/DREAM-838) documents this boundary; extending the menu descriptor to server-resolved paginated moves would require its own explicit contract.
Backlogs already renders top/up/down/bottom move items server-side and lets the `sortable-lists` item controller gate availability and resolve the relative anchor. Resource Planner and several admin/settings surfaces independently render equivalent controls with different labels, icons, availability rules, and persistence paths.
### Goal
Provide one shared four-direction descriptor/helper for server-rendered move menus and align all sortable-list consumers on the same client-side gating and direction values, without coupling their domain-specific move endpoints.
The descriptor lands after #DREAM-786 establishes the extended suite contract. Each migration cluster adopts it while moving its surfaces; this is not a separate big-bang conversion.
### Acceptance criteria
- [ ] One descriptor defines top/up/down/bottom labels, icons, direction values, and Stimulus data.
- [ ] The server renders all four items; the item controller hides or disables unavailable moves from live DOM position.
- [ ] Menu moves resolve `prev_id` and use the same persistence request as a drag.
- [ ] The descriptor supports list rows beyond Backlogs cards and does not depend on a Backlogs model or endpoint.
- [ ] Backlogs remains behaviorally unchanged after adopting the descriptor.
- [ ] Project attributes are retrofitted after cluster 1; later DREAM-671 clusters adopt the descriptor during their migration.
- [ ] Resource Planner's bespoke submenu and persistence path are removed in #DREAM-793.
- [ ] Component and frontend tests cover first, middle, last, single-item, empty/gapped, and truncated-list availability.
### Paginated consumers
The shared client-side direction resolver operates on loaded rows. #AUTOWORK-285 and its semantic-table follow-up [DREAM-839](https://community.openproject.org/wp/DREAM-839) retain server-backed status menus because top/up/down/bottom can move across page boundaries. Do not replace them with loaded-row-only availability or anchors. Shared sortable-table integration [DREAM-838](https://community.openproject.org/wp/DREAM-838) documents this boundary; extending the menu descriptor to server-resolved paginated moves would require its own explicit contract.