Skip to content

Fix exported SVG block sizing#540

Open
oiahoon wants to merge 1 commit into
eclipse-sprotty:masterfrom
oiahoon:fix/export-svg-block-size
Open

Fix exported SVG block sizing#540
oiahoon wants to merge 1 commit into
eclipse-sprotty:masterfrom
oiahoon:fix/export-svg-block-size

Conversation

@oiahoon

@oiahoon oiahoon commented Jul 13, 2026

Copy link
Copy Markdown

Summary

  • exclude the computed block-size when copying root styles into exported SVGs
  • keep unrelated computed styles and child style copying unchanged
  • add dedicated regression coverage for every excluded root property

Testing

  • focused SVG exporter regression: 5 passed
  • TypeScript project build: passed
  • ESLint on changed files: passed
  • full Vitest suite: 210/223 passed; untouched master is 205/218 with the same 13 JSX assertion failures caused by the current transform injecting __self and __source attributes

Fixes #520

@gfontorbe

Copy link
Copy Markdown
Contributor

Hi @oiahoon, thanks for the contribution.

Would you mind adding tests for the other excluded properties as well? Each should get it's own dedicated test case.

Also, please sign the Eclipse Contributor Agreement via your Eclipse Foundation account in order for this PR to be considered.

@oiahoon

oiahoon commented Jul 13, 2026

Copy link
Copy Markdown
Author

Hi @oiahoon, thanks for the contribution.

Would you mind adding tests for the other excluded properties as well? Each should get it's own dedicated test case.

Also, please sign the Eclipse Contributor Agreement via your Eclipse Foundation account in order for this PR to be considered.

surely.

Signed-off-by: Joey@macstudio <4296411@qq.com>
@oiahoon
oiahoon force-pushed the fix/export-svg-block-size branch from 76f3c7a to 39732ad Compare July 13, 2026 15:58
@oiahoon

oiahoon commented Jul 13, 2026

Copy link
Copy Markdown
Author

Addressed in 39732ad. Added dedicated tests for width, height, opacity, inline-size, and block-size; the focused tests, TypeScript build, and ESLint pass. The ECA check is also passing now.

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.

Exported SVG with a very small size making it invisible

2 participants