Kanban: transformer outline doesn't resize after adding cards #49
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#49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
When a kanban board is selected (showing its transformer handles), adding a card grows the kanban's internal background — but the transformer bounding box stays at the pre-add size. Handles end up misplaced relative to the new board.
Evidence
renderKanban()destroys and re-creates all children (group.destroyChildren()). Thebgrect'stotalHrecomputes correctly.transformer.forceUpdate()after the rerender, so the transformer still reflects the stale bounding box.Fix
renderKanban(), after drawing, detect if the group is currently attached to a transformer (WhiteboardTools.getTransformer()and.nodes().indexOf(group) >= 0) and calltransformer.forceUpdate()(plus abatchDraw) so the handles follow the new size.Implementation Spec for Issue #49
Objective
After any kanban content change that grows its bounding box (add card, add column, rename, etc.), refresh the active Konva.Transformer so the selection handles track the new size.
Requirements
Files to Modify
crates/hero_whiteboard_ui/static/web/js/whiteboard/kanban.js— at the end ofrenderKanban(group), if the group is part of the active transformer, calltransformer.forceUpdate()and redraw.Implementation Plan
Step 1: Call
transformer.forceUpdate()afterrenderKanbanFiles:
crates/hero_whiteboard_ui/static/web/js/whiteboard/kanban.jsSubtasks:
renderKanban(), after the existingWhiteboardCanvas.getObjectLayer().batchDraw();(last line), add a guard:Dependencies: none
Acceptance Criteria
+ Add cardin any column. The transformer handles expand to wrap the new, taller board.+ Columnand column delete (x) — handles follow.Notes
WhiteboardTools.getTransformer()returns the single shared transformer on the UI layer.forceUpdate()recomputes the transformer's attached-node bounding box without changing its node list.Test Results
cargo check --workspace: PASScargo clippy --workspace -- -D warnings: PASSJavaScript-only change; Rust gates act as no-regression guards.
Pull request opened: #59
This PR implements the changes discussed in this issue.