fix(shape): persist stroke width / stroke color / fill across reload #70
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!70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_fix_shape_style_persistence"
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
Shape style edits (Stroke Width, Stroke color, Fill color) from the Properties panel now persist across reload.
Related Issue
Closes #67
Root cause
The three Properties-panel handlers for
prop-stroke-input,prop-fill-input, andprop-stroke-widthmutated the Konva bg and redrew the layer but never calledWhiteboardSync.onUpdate(currentNode). That call is what adds the node topendingUpdates, triggers the debounce timer, and ultimately sends theobject.updateRPC. Without it the server never heard the edit, soobject.liston reload returned the original style.Changes
crates/hero_whiteboard_ui/static/web/js/whiteboard/properties.js— addWhiteboardSync.onUpdate(currentNode);inside each of the three shape style handlers, right afterbatchDraw(), matching the pattern already used by every other object-type style handler in the same file.Preserved
applySyncUpdatealready handled this path correctly; the fix just ensures it is actually triggered).style.strokeWidth,style.stroke,style.fillwere already in the wire format and round-trip through the reload path.Out of scope (deserves a separate issue)
Two related persistence gaps were discovered while exploring the panel and are NOT fixed in this PR:
prop-frame-title): rename is lost on reload.prop-mm-root-text,prop-mm-root-color): edits lost on reload.Test Results
cargo check --workspace: passcargo clippy --workspace -- -D warnings: passcargo fmt --check: passJS-only change; Rust checks confirm no regression. Manual QA required: set Stroke Width / Stroke / Fill on a shape, reload, confirm the new values are rendered back.