feat(ui): add form controls for webview parameter forms - #1101
Open
EhabY wants to merge 6 commits into
Open
Conversation
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 the form-control vocabulary
packages/uineeds for the #972 dynamic-parameter webview form:Input(text / number / password with reveal toggle),Textarea,Checkbox,Select(Radix), andField/Label.Design principle
Render like VS Code, not like the dashboard. VS Code's settings editor covers every configuration shape with text fields, number fields, checkboxes, and dropdowns, so the library ships exactly that vocabulary and the future form layer maps the richer dashboard
form_types onto it:form_typeinput(+mask)Input(text / number / password + reveal)textareaTextareadropdown,radioSelectcheckbox,switchCheckboxsliderInputtype="number"with min/maxmulti-selectCheckboxes in aField(composition)tag-selectInput, comma-separated (form-layer split)No Switch, Slider, RadioGroup, or MultiSelect widgets: VS Code has none, and every shipped control has a direct
@vscode-elementsparity reference, so the "Known gaps" list doesn't grow.Implementation notes
SearchInputprecedent (value+onChange(next));Selectkeeps Radix naming and flat compound exports likeDropdownMenu.--ui-checkbox-*,--ui-dropdown-*, and--ui-list-focus-*(quick-input list colors, matching nativeselectBoxStyles); all with fallback chains incl. high contrast.@radix-ui/react-selectadded via the workspace catalog (catalogMode: strict).Verification
pnpm typecheck,pnpm lint,pnpm format:checkpnpm test:webview(40 files, 339 tests)pnpm build, Storybook buildImplementation plan
Why
Issue #972's dynamic-parameter flow returns server-evaluated parameters with
form_types the QuickPick prompter cannot render reactively; a webview form built frompackages/uiis required. The package has the full quality pipeline (tokens, four-theme Pixel snapshots, parity stories, webview tests, isolation lint) but had no form controls — onlySearchInputand menu items.Scope — five components
Input<input>;SearchInputprecedent;typepassthrough incl.number(min/max) andpasswordwith reveal toggleTextarea<textarea>, same tokens, vertical resizeCheckbox--vscode-checkbox-*geometry, codicon check; children as labelSelectreact-select; flat compound exports matching theDropdownMenu*convention; portal on.ui-overlay; option rows support adescriptionslot@radix-ui/react-selectField+LabelLabel(htmlFor+ children), thinField(label + control + description/error slot)Deferred to the #972 form layer: form_type mapping, diagnostics, immutable/ephemeral badges, JSON
list(string)encoding, debounce, WebSocket session, IPC, panel provider.Extraction-readiness (future standalone repo)
No
@repo/*imports (lint-enforced), react peer dep, colocated stories/parity,--ui-*-only component CSS, public root exports as the boundary, per-component test files so tests move wholesale at extraction time.Decisions
Selectengine — Radixreact-select(established practice; native<select>+appearance: base-selectconsidered and rejected for Storybook portability).test/webview/ui/per AGENTS.md; per-file layout keeps a future move into the package mechanical.Note
This PR was generated by Coder Agents on behalf of @EhabY.