feat(react-ui): add Storybook stories for the genui-lib Form component#766
Open
Shinyaigeek wants to merge 1 commit into
Open
feat(react-ui): add Storybook stories for the genui-lib Form component#766Shinyaigeek wants to merge 1 commit into
Shinyaigeek wants to merge 1 commit into
Conversation
Form is a genui-lib (openui-lang) component with no standalone React counterpart, so it had no Storybook coverage: the existing stories under components/*/stories exercise the plain React components, and the lang layer's Form container — validation wiring, primary-button validation, the FormControl input union — was never rendered anywhere in Storybook. Render openui-lang programs through Renderer with openuiLibrary, the same path an LLM response takes. Three stories: a contact form matching the library's prompt example, a play-function story that submits the empty form to show per-field validation errors, and a form covering every FormControl input type (DatePicker, Slider, CheckBoxGroup, RadioGroup). The stories live under a new "GenUI/" Storybook section to keep lang-layer components separate from "Components/", and to give future lang-only stories (e.g. Stack) a home. Co-Authored-By: Claude Fable 5 <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.
Summary
Formis a genui-lib (openui-lang) component with no standalone React counterpart, so it had no Storybook coverage: the existing stories undercomponents/*/storiesexercise the plain React components, and the lang layer's Form container — validation wiring, primary-button validation, the FormControl input union — was never rendered anywhere in Storybook.This PR adds stories that render openui-lang programs through
RendererwithopenuiLibrary— the same path an LLM response takes — so the lang-layer behavior (positional args, validation, Action) is visible as-is.requiredrules and a hint)The stories live under a new GenUI/ Storybook section to keep lang-layer components separate from Components/, and to give future lang-only stories (e.g.
Stack) a home.Testing
openuiLibrary.toJSONSchema()(no errors, unresolved refs, or orphans)tsc --noEmitreports no errors for the new file🤖 Generated with Claude Code