bpmn-io / bpmn-js-properties-panel

A properties panel for bpmn-js.
MIT License
286 stars 196 forks source link

Be able to hook into FEEL popup life-cycle via events #974

Closed nikku closed 10 months ago

nikku commented 10 months ago

Is your feature request related to a problem? Please describe.

As an integrator I'm used to listen to events in order to understand if certain UI changes happen. I use these events to enable or disable certain global actions (cf. Camunda Desktop Modeler).

Unfortunately the FEEL popup is currently burried (interaction wise) deep in the properties panel, and gives me no chance as an integrator to understand if it is open, closed, or otherwise interact with it.

Describe the solution you'd like

I'm able to understand if the FEEL popup state changes, via events:

eventBus.on('feelPopup.opened', disableCertainActions);
eventBus.on('feelPopup.closed', enableCertainActions);

Additionally I want to introspect + interact with the FEEL popup via API:

const feelPopup = bpmnjs.get('feelPopup');

if (feelPopup.isOpen()) {
  // do something fancy
}

feelPopup.close();

feelPopup.open(someElement, someProperty);

The later would expose the feature in a way that complies with our core modeling patterns.

Describe alternatives you've considered

None.

Additional context

None.