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

Consider implementing headless exports to remove Electron dependency #16

Open
10 tasks
LukeCarrier opened this issue Apr 19, 2020 · 1 comment
Open
10 tasks
Labels
enhancement New feature or request funding wanted Likely to happen only if funded help wanted Extra attention is needed

Comments

@LukeCarrier
Copy link
Owner

LukeCarrier commented Apr 19, 2020

We're currently using the Draw.io desktop application to perform exports. This Electron application also exposes a CLI that allows us to export specific pages to a range of formats.

Whilst the Electron app is an ideal target for installation on desktops, it's less ideal in headless setups as it requires a running display server in order to do anything, even when we don't want a window.

Some bugs on this:

JGraph have a server-side implementation of exports used in browsers that aren't capable of doing the export locally, which uses Puppeteer. I'm thinking that we should write a client for this and have users run it in an additional container.

  • Confirm jgraph/draw-image-export2 supports all of the same formats as the Desktop app:
    • pdf
    • png
    • jpg
    • svg
    • vsdx
  • Containerise jgraph/draw-image-export2
  • Add an export_mode option with both drawio and export2 modes
  • Add an export2_uri option to specify the service's address
  • Write the code
@LukeCarrier LukeCarrier added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Apr 19, 2020
@LukeCarrier LukeCarrier removed the question Further information is requested label Jun 5, 2020
@LukeCarrier
Copy link
Owner Author

I've been working on this today. The JGraph exporter seems both incomplete and a pain to debug, so I've started picking it apart and reimplementing it with less global state and some more approachable functions. The code's over here, and I'd really appreciate some eyes on it if anyone's got a vested interest in exports under Docker.

Basic JPG export is working for me in LukeCarrier/drawio-export-puppeteer#1, but there's work to be done to get to an MVP and quite a bit more to get to feature parity with the Electron app.

@LukeCarrier LukeCarrier added the funding wanted Likely to happen only if funded label Mar 8, 2024
@LukeCarrier LukeCarrier pinned this issue Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request funding wanted Likely to happen only if funded help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant