-
Notifications
You must be signed in to change notification settings - Fork 13
Combobox #2267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combobox #2267
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
In migrating a few more Listboxes over to Comboboxes, I discovered a few props that were missing that I've added, like for a disabled state. It also appears that the ComboboxOption, which currently has a value: string and a label: string, isn't as flexible as the existing ListboxOption, on two accounts. First, Listboxes allow for rendered HTML elements, meaning we can use richer designs for the dropdowns. Second, all of our existing implementations have an item where the label and the value are identical. We'll have occasions — especially with those rendered HTML elements — where the selected value (a string) will be different from the label (a string, or a ReactNode). This PR has been going long enough that I want to treat those other situations separately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice. Let's do the followup work in followups and get this on dogfood ASAP so people can try it.
- More tests
virtual
- Enable fancier option rendering
- Think about when to use listbox vs. combobox — I figure listbox is simpler for things where we expect there to be a small number of times, but we need a clearer standard
oxidecomputer/console@a9b325e...a06d852 * [a06d8521](oxidecomputer/console@a06d8521) bump api to latest main * [f1fce1b9](oxidecomputer/console@f1fce1b9) oxidecomputer/console#2267 * [c52d6840](oxidecomputer/console@c52d6840) get rid of isTruthy calls thanks to TS 5.5 * [92494d97](oxidecomputer/console@92494d97) oxidecomputer/console#2281 * [017145c7](oxidecomputer/console@017145c7) oxidecomputer/console#2283 * [cb98aa27](oxidecomputer/console@cb98aa27) oxidecomputer/console#2282 * [e7d7d95d](oxidecomputer/console@e7d7d95d) oxidecomputer/console#2275 * [e6e3e176](oxidecomputer/console@e6e3e176) add deno.lock to gitignore
oxidecomputer/console@a9b325e...a06d852 * [a06d8521](oxidecomputer/console@a06d8521) bump api to latest main * [f1fce1b9](oxidecomputer/console@f1fce1b9) oxidecomputer/console#2267 * [c52d6840](oxidecomputer/console@c52d6840) get rid of isTruthy calls thanks to TS 5.5 * [92494d97](oxidecomputer/console@92494d97) oxidecomputer/console#2281 * [017145c7](oxidecomputer/console@017145c7) oxidecomputer/console#2283 * [cb98aa27](oxidecomputer/console@cb98aa27) oxidecomputer/console#2282 * [e7d7d95d](oxidecomputer/console@e7d7d95d) oxidecomputer/console#2275 * [e6e3e176](oxidecomputer/console@e6e3e176) add deno.lock to gitignore
This uses the Headless combobox component (here), making a few tweaks to align with our current dropdowns.
Fixes #1942
Also added a few tests to check for combobox interactivity.