Repository navigation
feat(ui): share one set of form controls - #67
Merged
Merged
Conversation
Add Field, Input, Select, Textarea and InlineNotice under components/ui with sm and md sizes, then move the new-session and bot forms onto them. - Field is a real label in row or stack layout, so clicking it focuses its control. - Controls keep the app-wide focus ring, turn destructive from aria-invalid, and share one border/placeholder/disabled treatment. - Inline notices keep their text at full contrast instead of dimming the tone.
Field now associates the label with htmlFor instead of wrapping the control, so a hint no longer becomes part of the accessible name. Hints and errors render through aria-describedby, and an error also sets aria-invalid.
Add a native Form wrapper (contents layout, noValidate) and use it in the new-session, new-bot, new-group and group-settings dialogs. The primary button is the form's submit target, so Enter in a field submits the dialog; the template filter keeps Enter for itself.
Wrap the identity form in Form and point the Save button at it with the form attribute while that tab is active. Other tabs keep the plain click save, so the actions inside the skills and automations panes never submit the bot.
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
Form,Field,Input,Select,TextareaandInlineNoticeprimitives undercomponents/uiwithsm/mdsizes.aria-invaliddestructive treatment, and keep inline notice text at full contrast.Verification
pnpm typecheckpnpm test— 321 files / 3,084 tests passed with the watcher suites excluded (this host has exhaustedfs.inotify.max_user_instances: 140 open vs a limit of 128).pnpm build:apppnpm smoke:ui— passed (evidence: artifacts/work6/ui-smoke.json, 25 steps)pnpm smoke:bots— passed (evidence: artifacts/bots-smoke/bots-smoke.json)Notes
Fieldassociates its label with the control viahtmlFor; hints and errors ride onaria-describedby, and an error also setsaria-invalid.Formusesdisplay: contentsso wrapping the dialog body does not change layout, andnoValidateleaves validation to the app.sm32px,md36px); textareas take their own height.AssistantSettingsCardand the other dense cards) still use their compacth-7filled fields; they need anxs/filled variant and are left for a follow-up.🤖 Generated with Claude Code