Skip to content

[6.x] Render element editor meta fields as a Form - #19390

Draft
brianjhanson wants to merge 1 commit into
feature/inertia-edit-entryfrom
feature/inertia-edit-meta-fields
Draft

[6.x] Render element editor meta fields as a Form#19390
brianjhanson wants to merge 1 commit into
feature/inertia-edit-entryfrom
feature/inertia-edit-meta-fields

Conversation

@brianjhanson

@brianjhanson brianjhanson commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Description

Moves the editor sidebar's meta fields onto the Form system, so they submit as Inertia form state instead of being read out of the DOM at save time.

Adds ElementInterface::sidebarForm(), implemented on HasControlPanelUI with metaFieldsNodes() as the per-element-type extension point — the Form-system counterpart to getSidebarHtml() and metaFieldsHtml(), which stay in place for the legacy editor and slideouts. Entry::metaFieldsNodes() covers entry type, slug, parent, authors, post date, and expiry date under the same visibility rules as metaFieldsHtml(); the base implementation contributes the status and notes fields.

The sidebar renders as a second FormRenderer bridged into the same Inertia form as the field layout. Two root-scoped useInertiaFormRenderer bridges can share one form because each instance only clears the root keys it wrote itself, and both are constructed before either receives a mutation — useInertiaFormRenderer.test.ts pins that behavior. With every value now in Inertia state, the unsaved-changes guard reduces to form.isDirty.

Per-site statuses are not included. The expand control behind them is wired up by Craft.ElementEditor, which never ran on the Inertia screen, so it lands with the multi-site work later in the stack.

@brianjhanson brianjhanson changed the title Render element editor meta fields as a Form [6.x] Render element editor meta fields as a Form Aug 10, 2026
@github-actions

Copy link
Copy Markdown

📚 Storybook previews

@craftcms/uiopen Storybook

No changed components detected in this Storybook.

resources/jsopen Storybook

No changed components detected in this Storybook.

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