Skip to content

Fix: stroke/fill controls should not restyle imported icons - #98

Merged
Amark19 merged 4 commits into
masterfrom
fix/icons-not-styleable
Aug 15, 2026
Merged

Fix: stroke/fill controls should not restyle imported icons#98
Amark19 merged 4 commits into
masterfrom
fix/icons-not-styleable

Conversation

@Amark19

@Amark19 Amark19 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

What changed

  • A selected icon (imported SVG logo) now shows only an "Icon" hint + the Layer controls in the properties panel — the Stroke / Fill / Width / Style controls are hidden.
  • applyToActive skips icons inside a multi-selection, so a color change on a mixed selection recolors the shapes but leaves logos untouched.
  • An "icon" is detected as a non-arrow group (isIcon), so arrows still restyle normally and shapes/text are unaffected.

Why

Reported: applying a stroke/fill to a dropped logo overwrote all its paths and flattened it into a single-color blob (a red Redis logo turned into a red blob).

Test plan (in-browser)

  • Drop the Redis logo → select it → panel shows only "Icon" + Layer (no color/width/style).
  • Select [icon + rectangle] → apply green stroke → the rectangle turns green, the logo keeps its real colors (#912626/#c6302b/#fff/#621b1c).
  • Arrows and shapes still restyle as before.
  • Dev build compiles clean.

Note

A "single-path" logo (rare) is a bare fabric.Path, not a group, so it isn't caught by isIcon and would still accept a fill (same as a freehand stroke). Not worth a persistent per-object marker for now; can revisit if it comes up.

Applying a stroke/fill to an imported SVG logo recoloured all its paths into a
single-colour blob. Treat a non-arrow group as an icon: the panel now hides the
Stroke/Fill/Width/Style controls for a selected icon (shows an 'Icon' hint + the
Layer controls), and applyToActive skips icons inside a multi-selection so a
colour change on a mixed selection recolours the shapes but leaves logos intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 15, 2026

Copy link
Copy Markdown

Deploying whiteboard with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2671b4e
Status: ✅  Deploy successful!
Preview URL: https://745fbcb9.whiteboard-988.pages.dev
Branch Preview URL: https://fix-icons-not-styleable.whiteboard-988.pages.dev

View logs

Amark19 and others added 3 commits August 15, 2026 13:41
Double-chevron icons (all the way) vs single-chevron (one step) plus
explicit tooltips, so the one-step vs jump-to-edge reorder actions are
distinguishable at a glance. No change to reorder logic.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bring forward / send backward now pass fabric's intersecting flag, so
they only move a shape relative to objects it actually overlaps. A shape
already in front of everything it touches no longer keeps climbing past
unrelated shapes, so it can't accumulate meaningless forward moves that
then require an equal number of backward clicks to undo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Amark19
Amark19 merged commit 5475b01 into master Aug 15, 2026
1 of 2 checks passed
@Amark19
Amark19 deleted the fix/icons-not-styleable branch August 15, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant