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

Separate and export core without properties panel #52

Merged
merged 4 commits into from
Jan 23, 2024
Merged

Conversation

barmac
Copy link
Member

@barmac barmac commented Jan 22, 2024

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.

nikku and others added 4 commits January 22, 2024 15:11
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';
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

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

Copy link
Member

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).

Copy link
Member Author

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.

Copy link
Member

@nikku nikku left a 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 🤩

@barmac barmac merged commit 88c2723 into main Jan 23, 2024
8 checks passed
@barmac barmac deleted the export-core branch January 23, 2024 09:38
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jan 23, 2024
@barmac
Copy link
Member Author

barmac commented Jan 23, 2024

I released this as v1.12.0 but it still uses browser APIs at import. So I will need to fix this.

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.

2 participants