feat(master-detail): inlineEdit mode (grid | form) + smart default#1560
Merged
Conversation
…rt default Renders the inline child collection as an editable grid OR a read-only list whose Add / per-row edit opens the child's full form — chosen per relationship, with a smart default by child shape. The hybrid mainstream pattern: thin children (invoice/order lines) → grid; fat children (rich types, many fields) → per-row form. - deriveMasterDetail: `resolveInlineMode(childSchema, inlineEdit)` → 'grid'|'form' (explicit wins; else smart default — rich/form-only types or >8 business fields → form). `deriveDetail` now returns `mode`. Exported from plugin-form. - MetadataProvider.attachInlineSubforms: resolves + passes `inlineMode` per inline relationship. - GridField: `displayMode: 'grid' | 'list'` + `onAdd`. List mode renders rows read-only (select → label, currency formatted, lookup → name) with per-row edit (expand) + delete; Add calls `onAdd`. - MasterDetailForm: form-mode details render the list; "Add" appends a row and opens it in the full inline editor; cancelling a freshly-added row discards it. Verified: live e2e 10/10 (showcase pins tasks to grid); form mode + smart default browser-verified (fat task child auto-renders the form-mode list) and unit-tested. Unit: resolveInlineMode + deriveFormFields (plugin-form 93), GridField incl. list mode (fields, +list tests), app-shell 336. Pairs with framework (spec widen + showcase + docs). 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 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.
Summary
Renders the inline child collection as an editable grid OR a read-only list whose Add / per-row edit opens the child's full form — chosen per relationship, with a smart default by child shape. The mainstream hybrid: thin children (invoice/order lines) → grid; fat children (rich types, many fields) → per-row form.
Changes
resolveInlineMode(childSchema, inlineEdit)→'grid'|'form'(explicit wins; else smart default — rich/form-only types or >8 business fields → form).deriveDetailreturnsmode; exported from plugin-form.inlineModeper inline relationship.displayMode: 'grid' | 'list'+onAdd. List mode = read-only rows (select → label, currency formatted, lookup → name) + per-row edit/delete; Add callsonAdd.Verification
Pairs with framework#1636 (spec widen + showcase + docs).
🤖 Generated with Claude Code