fix(kanban): select card with click and delete with Delete/Backspace #62
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!62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_kanban_card_select_delete"
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 cards can now be selected by clicking them, and the selected card can be removed with Delete or Backspace. The existing whole-kanban delete path is preserved as a fallback when no card is internally selected.
Related Issue
Closes #48
Changes
crates/hero_whiteboard_ui/static/web/js/whiteboard/kanban.js_selectedColIdx,_selectedCardIdx) directly on the Konva group so it is NOT serialized bysync.js.renderCardnow draws the selected card with a blue accent stroke (#007AFF, width 2).cardRectclick/tap sets internal selection and re-renders; does not cancel bubbling, so the stage-level handler still transformer-selects the kanban group.cardRectdragstart and the group's dragstart both clear internal selection so no stale accent survives a drag.destroyto avoid leaks.deleteSelectedCard(group)helper mutates state, re-renders, refreshes the property panel, and callsWhiteboardSync.onUpdate(group); returnstrueon success,falseif nothing selected. Exported on the public API.crates/hero_whiteboard_ui/static/web/js/whiteboard/shortcuts.jshandleWidgetShortcut, intercept Delete/Backspace: ifWhiteboardKanban.deleteSelectedCard(group)returnstrue, stop; otherwise returnfalseso the outer handler falls through toWhiteboardTools.deleteSelected()and removes the whole kanban as before.Test Results
cargo check --workspace: passcargo test --workspace: passcargo clippy --workspace -- -D warnings: passcargo fmt --check: passJavaScript-only change; Rust checks confirm no regression. Manual verification will follow on a running UI per the spec's Step 6 checklist.