bpmn-io / bpmn-js-element-templates

The element template extension for bpmn-js
MIT License
5 stars 3 forks source link

chore(conditions): streamline data flow #89

Closed marstamm closed 5 months ago

marstamm commented 5 months ago

As the suggestions contain a small refactoring, it was hard to do this with suggestions feature in the original PR.

Notable Changes: Add a convention that when calling propertiesPanel.zeebe.changeTemplate, newTemplate will always be the original (non-conditional) template. This ensures we only have 1 point where the template is changed, which is in ensureConditional. This adds an additional applyConditions to the operation, but IMO makes the code more readable

Re-ordered listeners to follow the execution path of "I changed a value, how is a condition applied"

nikku commented 5 months ago

I like these improvements, I think simple, understandable code beats efficiency in this case.