Uh oh!
There was an error while loading. Please reload this page.
feat(form): standard New/Edit modal renders form-view subforms (Tier 0) - #1529
Merged
Conversation
ModalForm now renders MasterDetailForm inside the dialog when schema.subforms
is set (suppresses its own footer; closes+refreshes on success). app-shell
AppContent sources subforms from the object's default form view. ModalFormSchema
gains subforms.
Result: declaring formViews.default.subforms:[{childObject}] makes an object's
standard New/Edit screen an atomic master-detail form with no bespoke page.
Verified live (e2e/live/form-view-subforms): "New Project" opens a
master-detail modal and submits one /api/v1/batch (parent + child {$ref:0}).
plugin-form 77 tests pass; plugin-form + app-shell build clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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 freeto 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.
Summary
Completes the config-driven master-detail story (Tier 0): the console's standard New/Edit record modal now renders inline child collections when the object's form view declares
subforms— master-detail entry with no bespoke page, saved as one atomic transaction.→ clicking New opens a modal with the object's fields + an inline child grid + one Save.
Changes
ModalForm: whenschema.subforms?.length, rendersMasterDetailForminside the dialog (it owns its Save/Cancel bar, so the modal footer is suppressed); on success the modal closes + the list refreshes.ModalFormSchemagainssubforms.AppContent: the standard create/edit modal sourcessubformsfrom the object's default form view (form.subforms/formViews.default.subforms).Builds on:
ObjectFormSchema.subforms+ObjectFormdelegation (#1527), metadata derivation (#1526),@objectstack/specFormViewSchema.subforms(#1613),ObjectViewpass-through (#1528).Testing
plugin-form77 unit tests pass;plugin-form+app-shellbuild clean (theModalForm → MasterDetailForm → ObjectForm → ModalFormreferences are render-time only).e2e/live/form-view-subforms.spec.ts, green): "New Project" opens a master-detail modal (project fields + inline Tasks grid), fills + submits, and posts exactly onePOST /api/v1/batchwith the populated parent (name/status) and a child op referencing the parent via{$ref:0}. Pairs with the showcase form-view change in the framework repo.🤖 Generated with Claude Code