bpmn-js-properties-panel icon indicating copy to clipboard operation
bpmn-js-properties-panel copied to clipboard

Override an existing properties panel component behaviour

Open Ichigo85 opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe

I am working on upgrading my plugins to Camunda Modeler 5.0 and I am a bit stuck on a thing. I have to edit the behaviour of an existing field on properties panel (in my case, the MessageRef field) because I need to call one of my specific events on setValue. Is there a simple way to do it without re-writing the component and replacing it on the propertiesProvider#getGroups call?

Describe the solution you'd like

Support to override a field component, possibly without completely rewriting it, but only parts of it (getter, setter, validate, ...).

Describe alternatives you've considered

The only way I considered, as I said, is to re-write the existing behaviour of the field, overriding the setValue and adding my code.

Additional context

Ichigo85 avatar Aug 05 '22 14:08 Ichigo85

Cross-posting my answer from the Camunda forum: https://forum.camunda.io/t/is-there-a-simple-way-to-override-a-properties-panel-component-behaviour/39156/2.

I think this should rather be a feature request in the properties panel project: https://github.com/bpmn-io/bpmn-js-properties-panel/issues/new/choose

pinussilvestrus avatar Aug 05 '22 14:08 pinussilvestrus

I transferred the issue accordingly, thanks for the request 👍

I think that would be an interesting slack time topic.

pinussilvestrus avatar Aug 05 '22 14:08 pinussilvestrus

Slack time (2nd Sep. 2022)

Idea(s):

  • Fire event via eventBus on setter, getter, validate so others can hook into (cf. https://github.com/bpmn-io/properties-panel/blob/main/src/components/entries/TextField.js#L102).
  • Make properties panel components extensible (replace setter, getter, validate)
  • Make setter, getter and validate configurable via something like DescriptionProvider

Miro: https://miro.com/app/board/uXjVPaDdxHs=/

Branches:

  • https://github.com/bpmn-io/properties-panel/tree/slack-time-niklas-v1
  • https://github.com/bpmn-io/bpmn-js-properties-panel/tree/slack-time-niklas-v1

pinussilvestrus avatar Aug 26 '22 11:08 pinussilvestrus

Hi @pinussilvestrus! Any news about this issue?

Ichigo85 avatar Nov 11 '22 10:11 Ichigo85

Unfortunately not. this issue is not on our roadmap currently (cf. backlog label).

pinussilvestrus avatar Nov 11 '22 10:11 pinussilvestrus