The variables node's settings form is rendered by two different surfaces. The classic canvas form renders it as a real Drupal form, where the drag-to-reorder table, the "Add a provider" select and the Add button all work. A BPMN modeler instead turns the same form into an element template, one field per form element, and its properties panel has no rebuild cycle for a button to drive.

The result is that two controls that only make sense in the canvas leak into the properties panel: "Add a provider" appears as a dropdown that does nothing there, and the Add button, being a submit element, appears as a text field named "Add". Neither can work in that panel.

The list itself is fine: the panel's providers field holds the JSON list and editing it there saves correctly, so the panel stays a usable raw editor. Only the two canvas-only controls are noise.

Proposed

Render the rich editor only when the settings form is embedded in a real form, and a plain providers text field otherwise. A host that embeds the form passes a SubformState; the template builder calls the plugin with a bare FormState and no parents, so the two are already distinguishable without inventing a contract.

The panel then offers exactly the two fields that work there, the canvas keeps the table with Add and Remove, and the round trip is unchanged.

Also worth removing

The providers_editor hidden marker added in #3613299: Add a VariableProvider plugin type and a variables task type can go. It existed to tell an editor submit apart from the replay Component::validate() performs on every modeler save, but the merge now accepts the stored shape (a JSON list) as readily as the editor's table rows, so a replay round-trips through it unchanged and the marker no longer decides anything.

Issue fork orchestra-3613559

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed 5b764ca0 on 1.x
    task: #3613559 Keep the variables node Add controls out of the modeler...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.