The PR adds a dropdown by restyling a native <select>, or it builds a button plus a div list of options and a useState open flag. The repo already has a Select primitive with a trigger, a listbox, typeahead, and the keyboard pattern already wired. Nearby filters use it. The native select cannot match the existing menu typography, and the homemade listbox does not move with the arrow keys or set aria-activedescendant.
I've started treating a homemade dropdown as an incomplete component, not as a lighter select. Opening a list of options is the easy part. Keyboard access and a consistent trigger are why the primitive is there.
Why the homemade select shows up
A tutorial "custom select" example is a button, a mapped list, and a click-outside listener. The model can write that without finding components/Select. Your primitive may wrap Radix or a design-system Select, or it may be named DropdownField, which is easy to miss if the prompt only says "add a dropdown."
You also skip search-in-list, disabled options, and the rule about not using a Select when the job is navigation or a combobox that allows custom text.
A simple Select policy
- New single-choice field dropdowns use the existing Select primitive
- Do not restyle a native select to fake the design-system trigger
- Do not build a button-and-div listbox in a feature file
- A new size or multi-select is a primitive change, with a story
If the user can type a value that is not in the list, that is the existing Combobox, not Select. If the options are destinations, that is navigation, not a form field.
What to put in the prompt
Use the existing Select primitive for this single-choice field.
Do not restyle a native select, and do not build a div listbox in this file.
Keep keyboard movement and the trigger/listbox relationship on the primitive.
If the user can type a custom value, use the existing Combobox instead.
Paste one existing Select usage. In review, search the diff for a raw <select>, a role="listbox" that is not the primitive, and a useState open flag around a homemade menu.
Reject / send back
Reject
- A feature-level dropdown that reimplements the Select primitive
- A native
<select>restyled to look like the design-system trigger - A list that only works with a pointer and ignores arrow keys
- A second select library added for one filter
Accept
- A field that uses the existing Select primitive
- A primitive PR that adds a documented size or multi-select and a story
- A free-text choice that stays on the existing Combobox
Top comments (0)