Skip to content

GLSP-1692: Fix elkfactory for browser usecase#141

Open
tortmayr wants to merge 1 commit into
mainfrom
glsp-1692
Open

GLSP-1692: Fix elkfactory for browser usecase#141
tortmayr wants to merge 1 commit into
mainfrom
glsp-1692

Conversation

@tortmayr

@tortmayr tortmayr commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

What it does

Replace no-op elk factory with proper setup for isWebworker context. A small workaround/hack is required to present a document during construction of the factory which routes elkjs to the c orrect in-process message worker

Fixes eclipse-glsp/glsp#1692

How to test

  • To test locally, checkout glsp-client master alongside the server-node repo and run
yarn dev:browser --external-server /path/tp/glsp-server-node/examples/workflow-server-bundled-web/wf-glsp-server-webworker.js

Then trigger a layout via Ctrl+Shift+L

I have already verified this locally. It might be easier to simple merge this after a positive code reivew and directly test in the glsp-client repo without the --external-server workaround.

Follow-ups

Changelog

  • This PR should be mentioned in the changelog
  • This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)
    Replaces the no-op webworker in the browser context with an actual working implementation.
    Adopters that relied on the fact that the elkLayoutModule was effectivly no-op in the browser might need to adopt accordingly

Replace no-op elk factory with proper setup for isWebworker context.
A small workaround/hack is required to present a `document` during
construction of the factory which routes elkjs to the c orrect
in-process message worker
@tortmayr tortmayr requested a review from martin-fleck-at June 8, 2026 20:30
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.

Fix layout/elk support for browser-only servers

1 participant