feat(core): add ComplexSelector - #4659
Draft
cixzhang wants to merge 5 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
August 2, 2026 21:26
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR New ComponentsComplexSelector (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
commented
Aug 2, 2026
cixzhang
commented
Aug 2, 2026
cixzhang
commented
Aug 2, 2026
cixzhang
commented
Aug 2, 2026
cixzhang
commented
Aug 2, 2026
cixzhang
commented
Aug 2, 2026
cixzhang
left a comment
Contributor
Author
There was a problem hiding this comment.
Some applications to consider that we can build vibe tests around.
- date/time selectors, check on the current ones we have, should any of them have been complex selectors? If so, how could they have been accomplished through this framework?
- tree list selectors with search, multiple pages, etc. This was common internally for complex structures that needed navigation to perform selection
- fun grid-like selectors that reduce time to input multiple dimensions (ex. model + thinking level selection).
- Additional options that require inputs. Ex. choose "apple, banana, etc" but also have an input that lets you add a freeform option.
We can design a vibe test:
- We should evaluate the right accessible design for each of these selectors.
- Determine some naive prompts that someone might request a UI like this
- See if the API can be discovered through Astryx and where the LLM runs into friction. Evaluate the results to see if it accomplished the user request and has the right accessible design we determined in step 1.
Contributor
Author
|
Noticed that when tapping the trigger while it's open it stays open since it ends up closing the popovers due to auto and then retriggering the trigger. |
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
Adds
ComplexSelector, a high-level selector shell for rich custom selection surfaces. It keeps the XDS-style single-component API while letting consumers compose their own accessible content fromvalue,onChange,close, and state helpers.What changed
changeActionsupport and generated exports.ComplexSelectorowns trigger semantics, popover behavior, focus restore, and the async change flow.triggerLabelonly.useGridFocuspreserving columns for keyboard users.TextInputsearch withTreeListhierarchy.complex-selectorvibe-test set covering grid, tree/search, date-time, and freeform-option selectors.Risk
This is additive. The main design question is whether the open render-prop shape is enough guidance for agents to choose the right accessible structure inside the dialog.
WCAG 2.2 evaluation notes
useGridFocus; tree examples rely onTreeListkeyboard behavior.:focus-visibleoutline; TreeList/TextInput/Button use component focus treatment inside the popover.role="grid",row,rowheader,gridcell, andaria-selected; tree examples delegate hierarchy semantics toTreeList.Vibe test
Focused iteration:
3e411072usinginternal/vibe-tests/test-sets/complex-selector.json.cs-1fruit/ripeness grid: cleancs-2destination tree/search picker: cleancs-4snack + Other text input: cleancs-3deadline picker: failed on brandedISODateString/ISOTimeStringtypes, which looks like DateInput/TimeInput discoverability friction rather than a ComplexSelector issue.Testing
pnpm --filter @astryxdesign/core typecheckpnpm vitest run packages/core/src/ComplexSelector/ComplexSelector.test.tsxpnpm exec eslint packages/core/src/ComplexSelector/ComplexSelector.tsx packages/core/src/ComplexSelector/ComplexSelector.test.tsx apps/storybook/stories/ComplexSelector.stories.tsxpnpm sync:exports:checkpnpm --filter @astryxdesign/storybook typecheck(still blocked by existing workspace package-resolution errors; no ComplexSelector story errors after fixes)pnpm -F @astryxdesign/vibe-tests interactive --test-set complex-selector --target astryx --label complex-selector-pr4659npx tsx src/build-previews.ts --iterations 3e411072 --tsc-onlyfrominternal/vibe-testspnpm -F @astryxdesign/vibe-tests aggregate --iteration 3e411072