-
Notifications
You must be signed in to change notification settings - Fork 3
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
Separate and export core without properties panel #52
Conversation
No need to depend on internal utility.
Reduces unnecessary ties to properties panel.
* move behaviors to `behavior` module * create `core` module * move properties panel (UI) related things to `properties-panel` module
export { ElementTemplateLinterPlugin as CloudElementTemplatesLinterPlugin } from './cloud-element-templates/linting'; | ||
|
||
// core | ||
export { default as CloudElementTemplatesCoreModule } from './cloud-element-templates/core'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as a great start 🥁.
My assumption in the past was that we need a core
only export for this to work, too. Let's see if that is what we end up with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as we don't bundle frontend dependencies, I think we should be safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You were right, Nico: bpmn-io/element-templates-cli#14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposal: Provide a separate core
export that allows me to consume the core (as is).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to fix this within the package, but indeed a core
module sounds less strict. We shouldn't force browser code to not use browser apis at top-level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So much good stuff inside 🤩
I released this as v1.12.0 but it still uses browser APIs at import. So I will need to fix this. |
This PR separates the core of element templates from the properties panel provider. This allows to easier adopt the templates in a headless setup, specifically https://github.com/bpmn-io/element-templates-cli/
Built on top of @nikku's amazing work in the summer hackdays 2023.