Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to image with canvas (drop canvg) #4569

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

barmac
Copy link
Collaborator

@barmac barmac commented Sep 30, 2024

Proposed Changes

This is a WIP branch of a migration out of canvg which fails to render some diagrams.

Known issues:

  • The webhook icon diagram is exported, but the image fails to load, so it looks like this:

insurance bpmn (2)

However, the icon loads correctly when diagram is opened. This indicates that the SVG export in bpmn-js may not work correctly.

  • In the tests, we check the exact content of dataURL exported from the utility. I discovered, that in tests there are different dataURLs exported by Puppeteer's Chrome Headless 127, and my desktop Chrome 129. That may be a problem regarding the maintenance of the app since we'd need to update the snapshots, and tests would fail depending on the platform.
  • Export tests in other places of the test suite started to fail with the changes even though the diagrams can be exported from the app.

Checklist

To ensure you provided everything we need to look at your PR:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Sep 30, 2024
Copy link

This Pull Request targets develop branch, but contains fix commits.

Consider targeting main instead.

@barmac barmac changed the base branch from develop to main September 30, 2024 13:45
@barmac barmac removed the in progress Currently worked on label Oct 1, 2024
@barmac
Copy link
Collaborator Author

barmac commented Oct 1, 2024

Given that the main bug is in tiny-svg, I will move this PR to the backlog.

@barmac barmac added the backlog Queued in backlog label Oct 1, 2024
@barmac
Copy link
Collaborator Author

barmac commented Oct 2, 2024

Export tests in other places of the test suite started to fail with the changes even though the diagrams can be exported from the app.

This is due to mock modelers exporting empty svg tag: <svg />. We should make the export realistic if this is to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export to PNG of a diagram with webhook connector fails
1 participant