elsa-workflows / elsa-workflows/elsa-core
Designer Shadow DOM
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
In order to enable easy re-hosting of the workflow designer component, the component should work within a [shadow DOM](https://javascript.info/shadow-dom).
StencilJS supports generating [Shadow DOM components](https://stenciljs.com/docs/styling), but there are challenges to using this when working with third-party libraries such as [Antvis X6](https://github.com/antvis/X6) and [Monaco Editor](https://github.com/microsoft/monaco-editor).
The challenges are:
- 3rd-party libraries that manipulate the "light" DOM do not see elements in the shadow DOM.
- The TailwindCSS stylesheet is currently applied globally, but should somehow target shadow DOM elements.
Some guidance & possible workarounds:
- https://stenciljs.com/docs/styling#global-styles
- https://github.com/elsa-workflows/elsa-core/issues/2421
- https://github.com/Microsoft/monaco-editor/issues/483
- https://github.com/microsoft/monaco-editor/issues/308#issuecomment-284389162
- https://github.com/Microsoft/monaco-editor/issues/619
Contributor guide
Assessment
This issue has not been assessed yet.