feat(ui): add element:text_input — free-text data-entry element for SDUI pages#2321
Merged
Conversation
…DUI pages
SDUI pages could display and navigate but not collect free-text input — the
`element:form` props existed but there was no input element and no input-bound
schema. This adds the data-entry half.
Spec: `ElementTextInputPropsSchema` (label, placeholder, `inputType` —
text/email/number/tel/url/password — defaultValue, required, disabled,
description, targetVariable) wired into `PageComponentType` and
`ComponentPropsMap` as `element:text_input`. One element carries the whole
free-text family via `inputType`, leaving genuinely-distinct inputs (textarea,
select, checkbox) free to arrive as their own elements later.
The objectui renderer binds the typed value into a page variable
(`PageVariableSchema.source`); a submit `element:button` reads it back via
`{{page.<var>}}` token interpolation in the console action runtime.
Demo: `showcase_contact_form` — four text inputs write page variables and a
Submit button POSTs them to the public web-to-lead endpoint
(`/api/v1/forms/contact-us/submit`), creating a `showcase_inquiry`. The showcase
analog of a branded cloud onboarding screen, reusing the console design system
instead of hand-rolled HTML.
Liveness note for PageSchema.variables refreshed to cite the new writer + the
submit bridge. Pairs with the objectui renderer/bridge PR.
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): 91 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
Contributor
Author
|
Paired objectui PR (renderer + page-variable submit bridge): objectstack-ai/objectui#1995 |
…sSchema The new public export legitimately adds one entry to the ./ui surface; the committed snapshot must match (CI: spec public API surface check). 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.
Why
SDUI pages could display and navigate but not collect input — there was no free-text input element and no input-bound schema, so you couldn't author a data-entry form as a pure SDUI page. The first consumer is a branded onboarding screen for the cloud control plane (collect a workspace name + subdomain, post to a backend endpoint) that today is hand-rolled vanilla HTML; this lets it become a console-rendered SDUI page (design system, dark mode, i18n). The capability is general — any SDUI data-entry form.
This is the spec half. Paired renderer + action bridge land in objectui.
What
Spec (
packages/spec/src/ui)ElementTextInputPropsSchema—inputType(text/email/number/tel/url/password),label,placeholder,defaultValue,required,disabled,description,targetVariable.PageComponentType(page.zod.ts) andComponentPropsMap(component.zod.ts) aselement:text_input.inputType, leaving genuinely-distinct inputs (textarea/select/checkbox) free to arrive as their own elements later.liveness/page.jsonvariablesnote refreshed to cite the new writer + the{{page.<var>}}submit bridge.Demo (
examples/app-showcase)showcase_contact_form— fourelement:text_inputs write page variables; a Submitelement:buttonruns anapiaction whose params reference them as{{page.<var>}}, POSTing to the existing public web-to-lead endpoint (/api/v1/forms/contact-us/submit, ADR-0056) to create ashowcase_inquiry. The showcase analog of the onboarding screen.pages/index.ts,objectstack.config.ts, and the app nav.@objectstack/specminor (fixed group).Verification
element:text_inputschema +ComponentPropsMapcases).definePageparses the demo page against the built spec.page.inquiryEmail-gated hint appears), Submit POSTs the resolved body{name,email,company,message}→ HTTP 201,showcase_inquirycreated.🤖 Generated with Claude Code