Skip to content

fix: include BOOLEAN_OPERATION in SVG container collapse#314

Merged
GLips merged 1 commit intomainfrom
fix/boolean-op-svg-rollup
Mar 28, 2026
Merged

fix: include BOOLEAN_OPERATION in SVG container collapse#314
GLips merged 1 commit intomainfrom
fix/boolean-op-svg-rollup

Conversation

@GLips
Copy link
Copy Markdown
Owner

@GLips GLips commented Mar 28, 2026

Summary

  • Adds BOOLEAN_OPERATION to SVG_ELIGIBLE_TYPES so boolean ops are recognized as SVG-eligible children
  • Adds BOOLEAN_OPERATION to the parent collapse check in collapseSvgContainers so boolean op containers can collapse to IMAGE-SVG when all their children are SVG-eligible
  • Boolean operations (UNION, SUBTRACT, INTERSECT, EXCLUDE) always produce vector output, so omitting them was an oversight that caused unnecessary payload bloat

Test plan

  • Added test: BOOLEAN_OPERATION with vector children collapses to IMAGE-SVG
  • Added test: FRAME containing a BOOLEAN_OPERATION collapses transitively (bottom-up)
  • Existing tree-walker tests pass
  • Type check passes

Boolean operations (UNION, SUBTRACT, INTERSECT, EXCLUDE) always produce
vector output but were missing from the SVG rollup logic, causing them
to block parent containers from collapsing to IMAGE-SVG.
@GLips GLips merged commit 354679e into main Mar 28, 2026
1 check passed
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