Mixed-value indicator on the multi-edit toolbar #210
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#210
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?
Mixed-value indicator on the multi-edit toolbar
Delivered in commit
62373e9.Summary
When several items of the same type are selected and edited together via the floating selection toolbar, the toolbar previously gave no signal when the selected items disagreed on a given property. A user could not tell whether all selected stickies shared one color or held a mix. This change adds a visual "mixed values" hint to each property control whose targets are not uniform.
Behavior
wb-pt-mixed,outline: 1px dashed var(--wb-text-muted)).Scope
Applied to every property control across the sticky, text, shape, and drawing renderers:
Implementation
selection_toolbar.js: new_isUniform(getter)helper compares the property value across all multi-edit targets;_markMixed(el, getter)wraps each control to add thewb-pt-mixedclass and tooltip when values differ.whiteboard.css: new.wb-pt-mixedrule for the dashed-outline hint.Files
crates/hero_whiteboard_admin/static/web/js/whiteboard/selection_toolbar.jscrates/hero_whiteboard_admin/static/web/css/whiteboard.cssDone — shipped in commit
62373e9feat(whiteboard): mixed-value indicator on the multi-edit toolbarWhat changed
selection_toolbar.js— added two helpers:_isUniform(getter)— reads the property off every multi-edit target (falling back from_targetNodesto_lastTargets) and returnsfalsewhen they disagree; single-target selections are always uniform._markMixed(el, getter)— wraps a toolbar control: when its targets aren't uniform it adds thewb-pt-mixedclass and appends a "(mixed)" / "Mixed values — change applies to all" tooltip._markMixed(...), passing a getter that reads the live Konva value (e.g.n.findOne('.bg').fill(),n._mdFontSize,l.strokeWidth()).whiteboard.css— added.wb-pt-mixed { outline: 1px dashed var(--wb-text-muted); outline-offset: 2px; border-radius: 6px; }.Behavior notes
Diff stat