Swap @shopify/draggable for SortableJS behind DragContainer
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Replace @shopify/draggable with SortableJS behind the existing DragContainer API.
Complexity: Medium Target branch: develop
Context
@shopify/draggableis imported only inDragContainer.vue; nothing else touches the library.- Four callsites use
DragContainervia@sort(QuestionsAccordionalso@dragStart):- coach
QuestionsAccordion.vue - coach
LessonSummaryPage/tables/LessonResourcesTable.vue - coach
CreateExamPage/sidePanels/SectionSidePanel/SectionOrder.vue - device
RearrangeChannelsPage.vue
- coach
- Shopify CSS to migrate:
.draggable-mirror,.draggable-source--is-dragging,.draggable-source--placedinDragContainer.vue, plus a/deep/ .draggable-mirror<tr>fix inLessonResourcesTable.vue. - Keyboard reordering comes from
DragSortWidget, independent of the library. - Only
RearrangeChannelsPagehas a test; it emits events directly, not through the library. - Dead code to drop:
sortable:moveDown/moveUplisteners bound to undefined methods, the commented-outtriggerMouseUpOnESC, the undeclared:noDragprop onDragSortWidget.
The Change
- Remove
@shopify/draggablefrompackages/kolibri-common/package.json, addsortablejs. - Re-implement
DragContaineron SortableJS behind its existing API, so callsites change only their CSS. - Add touch support.
- Migrate the Shopify CSS classes, hand-rolling the
--placedbounce (no SortableJS equivalent).
How to Get There
- Coach → lesson → manage resources → reorder.
- Coach → quiz → create/edit → question order and section order.
- Device → channels → rearrange.
Out of Scope
- The source→zone cross-target abstraction.
- The
DragSortWidgetkeyboard experience. - Callsite behaviour beyond the CSS-class renames.
Acceptance Criteria
- [ ]
@shopify/draggableremoved frompackage.json;sortablejsadded. - [ ] All four callsites reorder correctly via SortableJS.
- [ ] Dragging works by touch on tablets.
- [ ] Keyboard reordering via
DragSortWidgetstill works. - [ ] Drag mirror, source-hiding, and drop bounce render as before.
- [ ]
RearrangeChannelsPagetest passes.
AI usage
Drafted with Claude Code from a codebase audit of the existing @shopify/draggable usage; I verified the callsites, classes, and test against the code and edited every section.
The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.
The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.