feat(spec): model action-param translations (_actions.params)#1860
Merged
Conversation
…ons.params)
Action labels localize via `objects.<obj>._actions.<action>.label` bundle keys,
but action PARAMS (the dialog form fields) had no translation path — the
`_actions` translation schema only modeled label/confirmText/successMessage, so
a param's label/helpText/placeholder/options could not be localized and rendered
English in a zh UI.
Add an optional `params` record to the action translation schema (in
ObjectTranslationDataSchema._actions, globalActions, and the secondary
ObjectTranslationNodeSchema._actions):
_actions.<action>.params.<param>.{ label?, helpText?, placeholder?, options? }
`options` maps a select value → translated label. All optional and additive, so
existing bundles are unaffected. objectui's `useObjectLabel().actionParamText()`
already reads this exact key path; this unblocks authoring the bundle entries.
Tests: 1149 spec tests pass (translation/i18n-resolver/typegen); DTS build green.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
xuyushun441-sys
added a commit
that referenced
this pull request
Jun 21, 2026
…2125) * feat(spec,showcase): lookup record-picker authoring metadata + demo The objectui record picker can present multi-column, scoped, dependent lookup results, but FieldSchema exposed none of the authoring surface for it — so the props were silently dropped by defineStack's Zod parse (cf. the FieldSchema property-liveness audit, which flags referenceFilters reaching the renderer under a different key). Authors had no supported way to curate or scope a picker. spec (FieldSchema, packages/spec/src/data/field.zod.ts): - Add forward record-picker props to the lookup/master_detail surface: `displayField`, `descriptionField`, `lookupColumns`, `lookupPageSize`, `lookupFilters` (structured, picker-honoured form of referenceFilters), and `dependsOn` (dependent/cascading lookups). All are genuinely wired — the objectui renderer reads them (camelCase + snake_case aliases). They flow through Field.lookup() automatically via FieldInput. - Tests: assert the props survive FieldSchema.parse (not stripped) and that Field.lookup() carries them through. showcase (examples/app-showcase): - Expand the account seed from 3 → 13 (varied industry / revenue / lifecycle, incl. churned) so the picker exercises search, sort, pagination and scoping. - Configure showcase_invoice.account with curated `lookupColumns` (name / industry / lifecycle / revenue), a `descriptionField`, and a `lookupFilters` rule that hides churned accounts — a rep can't invoice a churned customer. Demonstrates the new authoring surface end-to-end. Pairs with objectui PR #1860 (renderer: auto-derive columns + i18n + accept both key casings + apply lookupFilters in the popover). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(spec): classify new lookup picker props in the liveness ledger The spec liveness gate requires every authorable FieldSchema property to be classified. Mark displayField/descriptionField/lookupColumns/lookupPageSize/ lookupFilters/dependsOn as live (consumed by the objectui record picker, cited as prose per the ledger convention) and sharpen the referenceFilters authorHint to point at the structured lookupFilters key. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Adds an optional
paramsrecord to the action translation schema so action param label/helpText/placeholder/options can be localized via the existing keys+bundles path:objects.<obj>._actions.<action>.params.<param>.{label,helpText,placeholder,options}. All optional/additive — existing bundles unaffected. objectui'suseObjectLabel().actionParamText()already reads this key path; this unblocks the bundle entries (cloud follow-up) + the renderer wiring (objectui follow-up). 1149 spec tests pass; DTS build green.🤖 Generated with Claude Code