feat(kanban): drag-and-drop cards between and within columns #46
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_whiteboard!46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_kanban_card_drag_drop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Cards in the kanban widget can now be moved between columns (and reordered within a column) by dragging, matching Miro/Trello/Jira-style behavior. The previous 3-dot menu -> "Move to X" flow still works.
Related Issue
Closes #45
Changes
crates/hero_whiteboard_ui/static/web/js/whiteboard/kanban.js— inrenderCard():draggable: trueon the card's Konva.Rect (the card background only — text, menu-hit overlay, and menu dots remain non-draggable; the parent kanban group stays draggable for whole-board movement).dragstarthandler:cancelBubble,WhiteboardHistory.snapshotBefore, andmoveToTop()so the grabbed card floats over its neighbors.dragendhandler: converts the stage pointer to group-local coordinates, derives the target column by X (using the same geometry asrenderColumn), derives the insertion index by Y via slot midlines, handles same-column downward-move off-by-one, snaps back when no valid target, then re-renders, refreshes the properties panel, commits the history update, and syncs viaWhiteboardSync.onUpdate.Test Results
cargo check --workspace: PASScargo clippy --workspace -- -D warnings: PASS (0 warnings)cargo fmt --all -- --check: PASScargo test --workspace --lib: PASSNo regressions to: whole-board drag, double-click inline edit, 3-dot menu actions, column rename/delete/add, card add/delete/duplicate, properties panel, undo/redo, or server sync.