Remove shape-type picker from floating selection toolbar #160
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#160
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?
The floating selection toolbar exposes a control to change a shape from one type to another (rect → diamond → circle, etc.). This shouldnt be possible from the floating toolbar — type selection happens at creation time. Remove this control from
_renderShapeinselection_toolbar.js.Spec
Root cause / scope
_renderShapeinselection_toolbar.jslines ~1040–1052 declares ashapeOptsarray and passes it to_buildSelect(...)with a callback that callsWhiteboardObjects.changeShapeType(node, v)andrefresh(). This control lets users change a shape's geometric type from the floating toolbar — undesired.Files to Modify
crates/hero_whiteboard_ui/static/web/js/whiteboard/selection_toolbar.js— only file.Implementation Plan
Step 1 — delete the picker block in
_renderShapeDelete the 13 lines from
var shapeOpts = [...]through the_buildSelect(shapeOpts, ...)call. Also delete the now-unusedvar shapeType = objData.shapeType || 'rect';line above.Cascading deletions — none
WhiteboardObjects.changeShapeTypeis also called fromsync.js:621(remote sync path) and exported. Keep it — it's part of the realtime contract._buildSelectis shared with calendar / mindmap / connector renderers. Keep..wb-pt-selectCSS shared by all_buildSelectusers. Keep.Acceptance Criteria
shapeTypemutations viasync.js.What NOT to break
WhiteboardObjects.changeShapeTypeexport + sync.js callsite._buildSelectusers (calendar / mindmap / connector).shapeTypevalue still load/render.Done
Commit
d99f817ondevelopment. Removed the shape-type dropdown block from_renderShape(15 lines deleted).WhiteboardObjects.changeShapeTyperemains exported and is still called fromsync.jsfor remote shape-type updates.cargo check --workspace: passcargo test --workspace --lib: pass