[6.x] New field page to Inertia + Vue#19215
Draft
brianjhanson wants to merge 4 commits into
Draft
Conversation
Replaces the Twig-based settings/fields/new screen with an Inertia page (settings/fields/Edit) whose props are orchestrated by a FieldEditViewModel. - FieldsController::create() now returns an Inertia CpScreenResponse and honors a `type` query param so "Save and add another" preselects the last-saved type - Field type settings remain a server-rendered legacy HTML island, swapped via the existing fields/render-settings action and posted back to store() as a URL-encoded `typeSettings` string - store() accepts island settings via `typeSettings` alongside the legacy `types` array - Adds serializeFormInputs() for posting legacy HTML islands from Vue pages The edit screen for existing fields still uses the Twig path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Extends the new-field Inertia port to existing fields. Full-page requests
to settings/fields/edit/{id} (and fields/edit-field) now render the
settings/fields/Edit page via FieldEditViewModel; slideout requests
(Craft.CpScreenSlideout('fields/edit-field'), with or without a field ID)
still get the legacy Twig screen as JSON — including the field layout
designer's create-field slideout, which the initial port had broken.
- FieldEditViewModel gains readOnly, metadataHtml, missingFieldPlaceholder,
and missing-type handling (blank select option + placeholder, expected
type used for options/settings/translation methods)
- The "Used by" metadata pane moves to a shared Cp\Html\FieldHtml so the
Inertia page and the slideout sidebar render the same HTML
- The Vue page adopts the new default-layout convention (useAppLayout()
instead of wrapping <AppLayout>, which double-rendered the CP shell after
the app-layout-parity merge), adds read-only input states, the metadata
sidebar column, and a server-defined Delete action with confirm
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Replaces the Twig-based settings/fields/new screen with an Inertia page (settings/fields/Edit) whose props are orchestrated by a FieldEditViewModel.
typequery param so "Save and add another" preselects the last-saved typetypeSettingsstringtypeSettingsalongside the legacytypesarrayThe edit screen for existing fields still uses the Twig path.
Description
Related issues