Skip to content

[Diagram Editor] Configurable section template instances - #243

Open
ArizmendiWan wants to merge 6 commits into
open-rmf:mainfrom
ArizmendiWan:section-config
Open

ArizmendiWan wants to merge 6 commits into
open-rmf:mainfrom
ArizmendiWan:section-config

Conversation

@ArizmendiWan

Copy link
Copy Markdown
Collaborator

Closes #83.

Section templates can now expose configuration properties to the workflow that uses them. In the Template panel, authors can define a property’s type, default, and constraints, then link it to a configuration field on a node, script, or nested section. The link menu flags incompatible types and still allows the selection. Removing a link restores the field’s original value.

In the workflow, selecting a section instance opens its configuration in the operation panel. Two instances of a template containing a single Multiply node can use different factors. The editor flags invalid values at the field, and the executor checks the instance configuration when it builds the workflow.

Authors can also declare a schema on each section input or output. The editor uses declarations to check connections and infers the types of undeclared ports. The Template panel shows all ports together.

Screenshots

The scale template defines factor as a required integer from 1 to 10. The same panel lists its input and output.

Template panel with the factor type, bounds, and Required setting

Selecting the input node lets the author declare its type as number. The product output keeps its inferred type.

Section Input with Declare schema selected and the type set to number

The link button in Multiply’s Config field lists factor and its integer type. The field currently holds 1.

Multiply configuration with the section property picker open

Selecting factor replaces the displayed 1 with a blue chip. Removing the chip restores 1.

Multiply configuration linked to factor, with a remove button on the chip

Double and Triple both use scale. Double sets factor to 2, and the selected Triple instance sets it to 3.

Triple’s operation panel shows the scale template and a factor of 3 beside Double and Triple on the canvas

A request of 5 passes through both instances. The response is 30, and the timeline shows each call to Multiply.

Run panel with request 5, response 30, and the Double and Triple execution steps

Setting Triple’s factor to 0 shows the minimum error below the field. The executor also rejects that value when building the workflow.

Triple’s factor set to 0 with the validation message must be greater than or equal to 1

GenAI Use

We follow OSRA's policy on GenAI tools.

  • I used a GenAI tool in this PR.
  • I did not use GenAI.

Generated-by: Codex and Claude

@mxgrey mxgrey added this to PMC Board Nov 22, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in PMC Board Nov 22, 2026
@ArizmendiWan
ArizmendiWan requested a review from mxgrey November 22, 2026 07:56
@ArizmendiWan
ArizmendiWan marked this pull request as draft November 23, 2026 07:23
Let template authors declare configuration and port schemas, bind operation fields to template properties, and configure each section instance independently. Use React JSONSchema Form for schema authoring and data entry, including inline titles for alternatives.

Signed-off-by: ArizmendiWan <2311602492@qq.com>
Share field actions across node and section forms, preserve typed choices and nullable values, and show type warnings when binding template properties. Simplify how declared port schemas are loaded and checked.

Signed-off-by: ArizmendiWan <2311602492@qq.com>
Signed-off-by: ArizmendiWan <2311602492@qq.com>
…ename

Use the declared type on either end of a section connection when checking compatibility, falling back to inference for undeclared ports. Update bindings and instance configs when a template property is renamed, and reuse form controls for field actions.

Signed-off-by: ArizmendiWan <2311602492@qq.com>
Signed-off-by: ArizmendiWan <2311602492@qq.com>
@ArizmendiWan
ArizmendiWan marked this pull request as ready for review November 25, 2026 23:20
Signed-off-by: ArizmendiWan <2311602492@qq.com>
@ArizmendiWan

Copy link
Copy Markdown
Collaborator Author

Reworked this PR to use React JSONSchema Form (RJSF) for defining template properties and configuring section instances.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

Support config / substitutions in section templates

1 participant