feat(spec): detail-page related-list tabs via relatedList: 'primary' (#2579)#2594
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
#2579) `Field.relatedList` becomes tri-state `boolean | 'primary'`. 'primary' marks a core relationship the detail page promotes to its own tab (ADR-0085 prominence, not a layout switch); non-primary children collapse into a shared "Related" tab. `RecordRelatedListProps.columns` becomes optional — columns derive from the child object's highlightFields when omitted. Both additive/back-compat → minor. Dogfood acceptance: showcase_account drops its hand-authored detail page and gets equivalent Projects/Invoices tabs purely from `relatedList: 'primary'` on the child FKs (+ highlightFields migrated off the deleted page's highlights slot). Renderer + derivation ship in objectui (companion PR). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
de84125 to
e80cd2d
Compare
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 90 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
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.
What
Detail-page related lists become configurable via field annotations instead of a hand-authored page — see issue #2579.
spec (
@objectstack/spec, minor):Field.relatedList→ tri-stateboolean | 'primary'.'primary'marks a core relationship that the detail page promotes to its own tab (ADR-0085 prominence, not a layout switch); non-primary children collapse into a single shared "Related" tab.false/truekeep their meaning, so this is additive and opt-in per relationship (no'primary'anywhere → byte-for-byte the legacy stacked default).RecordRelatedListProps.columns→ optional; columns derive from the child object'shighlightFields/ default list columns when omitted.dogfood acceptance (
examples/app-showcase):showcase_account's hand-authoredaccount-detail.page.tsis deleted; the equivalent Projects/Invoices tabs now come purely fromrelatedList: 'primary'on the child FKs, and the deleted page'shighlightsslot migrates to the object'shighlightFieldssemantic role.Companion PR
Renderer + derivation (rule Z tabs, multi-FK, self-ref, unified picker columns): objectstack-ai/objectui#2235.
Verification
pnpm buildOK;check:api-surfaceunchanged (it tracks exported signatures, not zod field internals, so an additive union / optional field is invisible to it).tsc --noEmitclean — the only remaining errors areCannot find module '@objectstack/*'for workspace deps not built in the worktree, which CI's build step resolves.Design notes (from the issue)
viewref onrecord:related_list(AI dangling-ref surface), an object-levelrelatedLists[]array, and an object-levelrelatedLayoutswitch.Refs #2579 (close once this and the companion objectui PR merge).
🤖 Generated with Claude Code