Skip to content

Dropdown components (menu, select, combobox, autocomplete)#85

Merged
IzumiSy merged 28 commits intomainfrom
dropdown_components
Mar 19, 2026
Merged

Dropdown components (menu, select, combobox, autocomplete)#85
IzumiSy merged 28 commits intomainfrom
dropdown_components

Conversation

@IzumiSy
Copy link
Contributor

@IzumiSy IzumiSy commented Mar 16, 2026

Add new dropdown components (Menu, Select, Combobox, Autocomplete) and improve existing component APIs.

New Components

  • Menu — Dropdown menu with compound component API. Supports checkbox/radio items, groups, separators, and nested sub-menus.
  • Select — Single/multi-select dropdown. Supports async data fetching via Select.Async.
  • Combobox — Searchable combobox with built-in filtering. Supports async fetching via Combobox.Async.
  • Autocomplete — Text input with suggestion list (value is raw input string). Supports async suggestions via Autocomplete.Async.

Select, Combobox, and Autocomplete each expose a .Parts namespace with low-level sub-components and hooks (useFilter, useAsync, useCreatable) for custom compositions.

Other Changes

  • Tooltip: Consolidate side/align/sideOffset into a single position prop (old props preserved as deprecated for backward compatibility)
  • Sidebar / DescriptionCard: Migrate to the new Tooltip position prop
  • add-component skill: Document Pattern D (Standalone + Parts) for agent guidance

@IzumiSy IzumiSy changed the base branch from main to add_primitive_components March 16, 2026 13:13
@IzumiSy IzumiSy changed the base branch from add_primitive_components to primitive_components_basic March 16, 2026 13:14
@IzumiSy IzumiSy changed the title Dropdown components Dropdown components (menu, select, combobox, autocomplete) Mar 16, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 16, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@tailor-platform/app-shell@85
npm i https://pkg.pr.new/@tailor-platform/app-shell-vite-plugin@85

commit: 40067c7

@IzumiSy IzumiSy force-pushed the primitive_components_basic branch from 675abe2 to c22722a Compare March 17, 2026 01:07
Base automatically changed from primitive_components_basic to main March 17, 2026 01:10
@IzumiSy IzumiSy force-pushed the dropdown_components branch from c797986 to 1571f10 Compare March 17, 2026 02:15
@IzumiSy IzumiSy force-pushed the dropdown_components branch from 67105b5 to c85f035 Compare March 17, 2026 06:12
IzumiSy added 15 commits March 17, 2026 16:02
- Narrow Select renderValue type based on multiple discriminant
- Add value/defaultValue props to Autocomplete.Async
- Export AsyncFetcher type from public API
- Add JSDoc explaining Combobox.Creatable T extends object constraint
Use !== undefined instead of ?? so that value="" is correctly
treated as controlled mode.
…rules

- Add Pattern D (Standalone) for pre-assembled + Parts components
- Clarify Pick<> rule: Root uses Pick<>, leaf sub-components use ComponentProps
- Note Pattern D can combine with Pattern C (directory split)
@IzumiSy IzumiSy marked this pull request as ready for review March 18, 2026 15:24
@IzumiSy
Copy link
Contributor Author

IzumiSy commented Mar 18, 2026

/review

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated by API Design Review for issue #85

IzumiSy added 2 commits March 19, 2026 10:58
Document that items are identified as groups by the presence of
label and items fields. Consumers should avoid item types whose
shape coincidentally matches this structure.
}
ComboboxClear.displayName = "Combobox.Clear";

function ComboboxChips({ className, ...props }: React.ComponentProps<typeof BaseCombobox.Chips>) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing displayName on ComboboxChips. Every other sub-component in all new files has one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added displayName to ComboboxChips, AutocompleteStandalone, and AutocompleteAsyncStandalone — the three components that were missing it.

Commit: 8509cd5

Comment on lines +246 to +247
* Internally filters out `item-press` events so that selecting an item does
* not trigger a redundant refetch.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My review agent thinks this JSDoc comment might be out of sync with the implementation. I don't see any obvious filtering happening?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — the JSDoc claimed onValueChange "filters out item-press events" but that logic doesn't exist in the Autocomplete useAsync (it was likely copied from the Combobox variant). Simplified the JSDoc to remove the incorrect claim.

Commit: 375c078

IzumiSy and others added 4 commits March 19, 2026 15:45
Remove incorrect claim about filtering item-press events, which does not
happen in the Autocomplete useAsync implementation.
@IzumiSy IzumiSy merged commit e7a1177 into main Mar 19, 2026
4 checks passed
@IzumiSy IzumiSy deleted the dropdown_components branch March 19, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants