[6.x] Render element editor meta fields as a Form - #19390
Draft
brianjhanson wants to merge 1 commit into
Draft
Conversation
📚 Storybook previews@craftcms/ui — open Storybook No changed components detected in this Storybook. resources/js — open Storybook No changed components detected in this Storybook. |
brianjhanson
force-pushed
the
feature/inertia-edit-meta-fields
branch
from
August 11, 2026 19:56
211139d to
531eb24
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 onHasControlPanelUIwithmetaFieldsNodes()as the per-element-type extension point — the Form-system counterpart togetSidebarHtml()andmetaFieldsHtml(), 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 asmetaFieldsHtml(); the base implementation contributes the status and notes fields.The sidebar renders as a second
FormRendererbridged into the same Inertia form as the field layout. Two root-scopeduseInertiaFormRendererbridges 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.tspins that behavior. With every value now in Inertia state, the unsaved-changes guard reduces toform.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.