feat(form): consume spec-aligned FormView buttons/defaults in ObjectForm#2790
Conversation
The authored @objectstack/spec FormViewSchema carries structured
`buttons.{submit,cancel,reset}.{show,label}` and `defaults`, but the form
renderer only ever read the flat renderer-invented `showSubmit`/`submitText`/
`showCancel`/`cancelText`/`showReset`/`initialValues`. That left the two spec
keys parsed-but-inert (ADR-0078) and stuck at `experimental` in the spec
liveness ledger.
ObjectForm now folds the structured shape down onto those flat props inside its
existing normalization pass, so every entry path (ObjectView drawer/modal/page,
RecordFormPage) honors it. An explicitly-set flat key still wins, so metadata
authored against the deprecated flat keys is unchanged. ObjectView and
RecordFormPage forward `buttons`/`defaults` from the spec form view.
Refs objectstack-ai/objectstack#1894, objectstack-ai/objectstack#2998.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CMaDBhnZEUu1fcw8Rvo6Yq
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CMaDBhnZEUu1fcw8Rvo6Yq
|
CI red is a runner-allocation outage, not this diff. Every job on both my SHAs ( The diff is verified green locally: I'll re-run the failed jobs once runners recover and report back. No action needed on the code meanwhile. Generated by Claude Code |
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
What
Teaches the form renderer to consume the structured, spec-aligned
FormViewSchema.buttons/FormViewSchema.defaultssurface from@objectstack/spec.The authored spec carries
buttons.{submit,cancel,reset}.{show,label}anddefaults(create-mode initial values), butObjectFormonly ever read theflat renderer-invented
showSubmit/submitText/showCancel/cancelText/showReset/initialValues. That left the two spec keys parsed-but-inert(ADR-0078) and stuck at
experimentalin the spec liveness ledger.How
@object-ui/types— add optionalbuttons/defaultstoObjectFormSchema; mark the flatinitialValuesdeprecated in favor ofdefaults.ObjectForm— a newfoldFormButtons()runs inside the existing schemanormalization pass and folds the structured shape down onto the flat props the
component (and every variant it dispatches into) already read. Returns the
input untouched when neither key is present (no hot-path allocation). An
explicitly-set flat key still wins, so metadata authored against the deprecated
flat keys is unchanged.
ObjectView+RecordFormPage— forwardbuttons/defaultsfrom thespec form view so both entry paths honor them.
This is the objectui-side consumer that lets the framework flip the two ledger
entries
experimental → live(paired PR: objectstack-ai/objectstack — closesthe
viewitem of objectstack-ai/objectstack#1894).Testing
formButtonsDefaults.test.tsx(3 cases):buttons.submit.labelbecomesthe submit text;
defaultsseed create-mode initial values; an explicit flatkey wins over the structured block.
type-checkgreen across@object-ui/types,plugin-form,plugin-view,app-shell(turbo, deps built).plugin-form+plugin-viewDOM suite green (118 tests, no regression).Refs objectstack-ai/objectstack#1894, objectstack-ai/objectstack#2998, #2545.
🤖 Generated with Claude Code
Generated by Claude Code