Uh oh!
There was an error while loading. Please reload this page.
feat(metadata): relationship inlineEdit auto-renders master-detail - #1532
Merged
Conversation
attachInlineSubforms scans objects for master_detail/lookup fields with inlineEdit:true and merges the child collections into the parent object's form view as subforms — so the standard New/Edit form auto-renders an atomic master-detail form with no view config and no bespoke page. Children without inlineEdit are not inlined; explicit form.subforms overrides the derived one. +4 unit tests (app-shell 310 pass). Live-verified: New Project renders the relationship-derived Tasks subtable + atomic /api/v1/batch (view subforms removed). Pairs with @objectstack/spec field.inlineEdit. 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
The capstone of config-driven master-detail: declare the inline-editing intent once on the relationship (in the data model) and every standard form derives it — no form view config, no bespoke page.
attachInlineSubforms(inMetadataProvider) scans objects formaster_detail/lookupfields withinlineEdit: trueand merges the resulting child collections into each parent object's form view assubforms. Because every form host already reads the object'sform.subforms(#1528/#1529/#1530), the modal, drawer, full-page, and ObjectView forms all auto-render the atomic master-detail — for free.inlineEditare not inlined (associations like comments/attachments stay out).form.subformsentry overrides the derived one (view can still tune columns/order).Why this shape
The relationship (
master_detail) already encodes the structure + ownership in the data model. The inline-edit intent belongs there too — defined once where the schema is modelled (e.g. by an AI), with forms following — rather than re-declared per form view. This makes master-detail truly zero-config for the common case.Testing
attachInlineSubforms(inline merge, no-inline-without-flag, explicit override wins, no-op when none). app-shell 310 pass.subformsremoved andshowcase_task.projectdeclaringinlineEdit, "New Project" still renders the Tasks subtable and submits one atomic/api/v1/batch(parent + child{$ref:0}).Pairs with
@objectstack/specfield.inlineEdit.🤖 Generated with Claude Code