Cannot change font color for sticky notes from floating toolbar #161
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#161
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?
Sticky notes have a background color picker (sticky color) but no text color picker in the floating toolbar. Other text-bearing objects (text, shape) have a Text color trigger. Add the same trigger to
_renderStickyso users can change the sticky note text color independently from the background.Spec
Root cause
Three coordinated gaps in sticky rendering — wiring the toolbar trigger alone is not enough:
_renderStickyhas no Text color trigger.renderStickyContent(objects.js:288) hardcodescolor: '#1a1a1a'and ignoresgroup._mdFill.editMarkdownText,objects.js:536) hardcodes'#1a1a1a'for sticky.The field name
_mdFillmatches text/shape/document. The sync wire-keyfillmatches the text branch.Files to Modify
crates/hero_whiteboard_ui/static/web/js/whiteboard/selection_toolbar.jscrates/hero_whiteboard_ui/static/web/js/whiteboard/objects.jscrates/hero_whiteboard_ui/static/web/js/whiteboard/sync.jsImplementation Plan
Step 1 —
_renderSticky(selection_toolbar.js)At the top of the function, alongside other locals, read the text color:
Insert between the existing
_buildSizePickerand_buildAlignTriggerblocks (between font-size and align):Final sticky toolbar order: bg color, font-size, text color (NEW), align, edit pencil.
Step 2 —
renderStickyContent(objects.js ~L288)Replace
color: '#1a1a1a'withcolor: group._mdFill || '#1a1a1a'. This is the load-bearing render-path change.Step 3 —
editMarkdownText(objects.js ~L536)Replace:
with:
So the inline-edit textarea matches the rendered color.
Step 4 — sync.js sticky outbound (~L284–288)
After the existing
data.fontSize = …;line, add:Reuses the
fillwire key (same as text branch) so the format stays uniform across text-bearing types.Step 5 — sync.js sticky inbound (~L590–605)
After the existing
data.fontSizeline, add:The existing
styleChangedbookkeeping (~L775) already triggersrerenderSticky— no extra wiring.Acceptance Criteria
_mdFill(or#1a1a1a).data.fill._mdFill) still render with#1a1a1a— visually unchanged.'text'(per34156d5) — visually distinct from the bg trigger ('fill').What NOT to break
c071747) and alignment trigger — new trigger is inserted between them.objData.color,getStickyColors(),kind: 'fill') — unchanged._mdFillfor text/shape/document — those wire keys are not renamed.#1a1a1afor sticky everywhere (NOT#dee2e6). The text/shape default would be invisible on pastel sticky backgrounds.data.fillon stickies — theif (data && data.fill)guard preserves local_mdFill.Done
Commit
57cc6eaondevelopment. 3 files changed (selection_toolbar.js + objects.js + sync.js, +11/-2). Toolbar trigger added between font-size and align; render path + inline-edit textarea now read_mdFill; sync wire format addsdata.fillon the sticky branch.cargo check --workspace: pass