Skip to content

Fix/resolve svg issues on artemis#396

Open
FadyGergesRezk wants to merge 6 commits intomainfrom
fix/resolve-svg-issues-on-artemis
Open

Fix/resolve svg issues on artemis#396
FadyGergesRezk wants to merge 6 commits intomainfrom
fix/resolve-svg-issues-on-artemis

Conversation

@FadyGergesRezk
Copy link
Contributor

@FadyGergesRezk FadyGergesRezk commented Mar 17, 2026

Checklist

  • I linked PR with a related issue
  • I added multiple screenshots/screencasts of my UI changes

Motivation and Context

We need SVG exports that work in both web environments (theme-adaptive) and non-CSS renderers (PowerPoint/Inkscape). The prior export path flattened CSS variables unconditionally, breaking dark/light mode in the web, while compat output must stay stable for PPT/Inkscape.

Description

  • Added two SVG export modes:
    • Web SVG (default) keeps CSS variables and includes :root fallbacks so it adapts to theme in browsers.
    • Compat SVG resolves CSS variables to fallback values and inlines attributes for PowerPoint/Inkscape.
  • Added a new export option in the web app: "As SVG (PowerPoint/Inkscape)".
  • Export pipeline now selects behavior via svgMode in ExportOptions.
  • Compat export uses the original fallback palette (light) regardless of current theme, preserving the old Inkscape/PPT behavior.
  • Aligned label placement for SFC Transition Branch, PetriNet Place, and PetriNet Transition to the Use Case actor pattern by extending the SVG height with a dedicated label band and centering the label inside it; adjusted sidebar preview height to avoid overlap.

Steps for Testing

  1. Run the web app, switch between light/dark theme.
  2. Export As SVG and open the file in a browser: colors should follow the current theme.
  3. Export As SVG (PowerPoint/Inkscape) and open in Inkscape or PowerPoint: colors should be stable (light) and connectors visible.
  4. In the sidebar, verify PetriNet and SFC elements no longer overlap and labels render cleanly.

Screenshots

N/A (no UI screenshots yet)

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