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

Support multiple tab providers #438

Merged
merged 1 commit into from
Mar 2, 2021
Merged

Support multiple tab providers #438

merged 1 commit into from
Mar 2, 2021

Conversation

nikku
Copy link
Member

@nikku nikku commented Mar 1, 2021

This implements a tab provider mechanism similar to the one we bpmn-js uses for palette and context pad.


Required by camunda/camunda-modeler#1992.

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Mar 1, 2021
@nikku nikku marked this pull request as ready for review March 1, 2021 15:48
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Mar 1, 2021
Base automatically changed from house-keeping to master March 1, 2021 17:11
This adds the PropertiesPanel#registerProvider method that allows users
to register custom properties providers.

A provider must have one of the following signatures:

({ getTabs: (element) => any[] }) // returns / overrides existing tabs

({ getTabs: (element) => (any[]) => any[] }); // may modify the existing
tabs (i.e. monkey patch) and return the updated tabs

Related to camunda/camunda-modeler#1992
Copy link
Contributor

@pinussilvestrus pinussilvestrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like that 👏

I created an example plugin to verify it works with the Camunda Modeler: https://github.com/pinussilvestrus/properties-provider-plugin-example. Super smooth to update the tabs 👍

I'd go for merging it, but I'm also ok to wait for another voice to review it. The next step would then be to update the element-templates-modal plugin to consume the new API.

@nikku
Copy link
Member Author

nikku commented Mar 2, 2021

Aaa, I was searching for the place the Camunda Modeler hooks into the properties panel. Thanks for the 👉.

@nikku
Copy link
Member Author

nikku commented Mar 2, 2021

If you think it is fine, please add your 👍. We generally practice four eyes, not many eyes 😉

Copy link
Contributor

@pinussilvestrus pinussilvestrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎸

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