feat(spec): page variable source renders as a component picker (objectui#2328) - #2968
Merged
Conversation
…tui#2328)
The page form's `variables` repeater now declares explicit sub-fields and pins
`{ field: 'source', widget: 'ref:component' }` so Studio can pick a page
variable's `source` (the component that writes it) from the page's real
components instead of a free-text id — mirroring the sibling `object`
`ref:object` picker. The `ref:component` widget ships in objectui.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 97 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
The page metadata form's
variablesrepeater now declares explicit sub-fields and pins{ field: 'source', widget: 'ref:component' }.A page variable's
sourcenames the component (byid) that writes it. Previously the form renderedsourceas a plain text input, forcing authors to type a component id by hand. This pins theref:componentwidget so Studio offers a dropdown of the components actually placed on the page — mirroring how the siblingobjectfield usesref:object.This is the form-spec trigger; the
ref:componentwidget itself lives in objectui (app-shell metadata-admin) — see objectui#2328 companion PR.Details
variablessub-fields are now explicit (name,type,defaultValue,source), kept in sync withPageVariableSchema.widget: z.string()already accepts arbitrary widget names, and nested repeaterfieldsare already supported — no schema change needed.Testing
packages/specpage.test.ts— 73/73 pass.pageFormparses with the newref:componentsub-field (defineForm Zod validation at import).Resolves the framework half of objectui#2328.
🤖 Generated with Claude Code