Skip to content

Add json schema form custom editor support#536

Open
banduk wants to merge 2 commits intoIronclad:mainfrom
talismanai:feat/rsjf-editor
Open

Add json schema form custom editor support#536
banduk wants to merge 2 commits intoIronclad:mainfrom
talismanai:feat/rsjf-editor

Conversation

@banduk
Copy link
Copy Markdown

@banduk banduk commented Mar 26, 2026

Add a reusable JSON Schema form custom editor to the Rivet editor system, and fix code-editor persistence so debounced updates are flushed from the wrapper layer instead of during low-level editor teardown.

Summary

  • add a new custom editor definition in core for schema-driven editors
  • wire custom editor rendering in the app so plugins can register and use a JSON Schema form editor
  • add a new JsonSchemaFormEditor implementation built on react-jsonschema-form
  • style the new editor to fit the existing Rivet/Atlaskit editor experience
  • support common schema-driven field types and proper additionalProperties editing, including add/remove controls and side-by-side key/value layout
  • add the required RJSF dependencies to the app and package manager configuration
  • move final code-editor persistence out of the shared Monaco component teardown path
  • flush debounced code-editor writes from the wrapper on blur/unmount, which avoids stale writes when editor visibility changes trigger unmounts

Why

This introduces a reusable way for plugins to expose structured configuration UIs from JSON Schema rather than requiring bespoke editor components for each node.

It also fixes a state-management issue in the code editor flow: the shared low-level Monaco component was previously used as a persistence point during teardown, which can be problematic because unmount does not always mean "commit". Moving the flush to the debounced wrapper keeps persistence logic in the layer that already owns update scheduling.

Example

A plugin node can use the new editor from getEditors() like this:

getEditors() {
  return [
    {
      type: 'custom',
      customEditorId: 'JsonSchemaForm',
      dataKey: 'myStructuredConfig',
      label: 'Structured Config',
      data: {
        schema: {
          type: 'object',
          properties: {
            title: { type: 'string' },
            count: { type: 'integer' },
            enabled: { type: 'boolean' },
          },
          required: ['title'],
        },
        uiSchema: {
          title: {
            'ui:placeholder': 'Enter a title',
          },
        },
      },
    },
  ];
}

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant