ConditionalProps do not appear on text label

Hi everyone,

I have observed some behaviour that might be a bug, but I wanted to ask here first because I’m a) not certain and b) don’t know where the bug originates and thus where I should report it.

When adding conditional props to a custom group in a properties panel, the Condition Type only appears when selecting the Sequence Flow directly, but not when selecting its Text Label.

I have created a Codesandbox based on bpmn-js-examples properties panel extension to illustrate the problem. When you select the flow directly you can find Condition Type on the Magic-Tab. But when you select the label, Condition Type is nowhere to be found. The custom Spell-Property however is.

If anyone has an idea why this is happening, please let me know.

Thanks for sharing the sandbox! I see that you are trying to use Camunda specific props (conditional), although you don’t include the camunda-bpmn-moddle extensions in your Modeler.

I’m not sure whether this caused the issue you’re describing, but I think they are definitely needed when working with Camunda specific props.

Thanks, I’ve added them to the sandbox. It does not seem to affect my problem, though.

If you want to have labels to have the same props as their targets, you need to use the labelTarget when retrieving the props, as we do in the existing Camunda properties provider

element = element.labelTarget || element;

conditionalProps(blackMagicGroup, element, bpmnFactory, translate);

I agree that this should maybe be a general concern and not be something to define in the providers (because the properties panel header already reacts on it). Something we are likely to change with a newer properties panel library.

Thank you very much, now everything works as expected.