feat(kanban): drag column title to reorder columns #71
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!71
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_kanban_column_reorder"
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
Kanban columns can now be reordered by dragging the column title. The new order persists across reload and supports undo/redo.
Related Issue
Closes #69
Changes
crates/hero_whiteboard_ui/static/web/js/whiteboard/kanban.jsrenderKanbannow stashesgroup._kbColumnLayout— a per-render array of{x, w, center}per column for dragend slot math.colTitleis markeddraggable: true.colTitle.on('dragstart')cancels bubble (so the whole-kanban drag does not also fire), clears card selection, callsWhiteboardHistory.snapshotBefore, doesmoveToTop, and records the source column index on the group.colTitle.on('dragend')converts pointer to group-local, finds the target slot (with clamping for out-of-bounds drops), splicesstate.columns, re-renders, commits history, and callsWhiteboardSync.onUpdate. Snap-back / same-slot / single-column drops are no-ops and do not emit sync traffic.Preserved
×delete button,+ Add card,+ Column.Scope
state.columnsarray order and already round-trips.colTitleKonva.Text moves with the cursor; column bg, color indicator,×,+ Add card, and cards stay put. Standard "grab the handle" affordance.Test Results
cargo check --workspace: passcargo clippy --workspace -- -D warnings: passcargo fmt --check: passJS-only change; Rust checks confirm no regression. Manual QA required: reorder by drag, reload, undo/redo, regression-check the preserved interactions.