Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Use one item counter for Combobox, Menu, and Command

Aperta
#962 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript

Direzione di ricerca

Start by reading the shared helper in packages/react/shared/item-count/ and the Combobox count added in #954; compare how the two paths handle empty states and screen-reader result announcements. After #953, #954, and #960 merge, move Combobox to the shared helper and remove its separate count. Check whether Select's search mode can use the helper without an items prop, and verify the empty state and status message across the four components.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Combobox, Menu, ContextMenu, and Command each need to know how many items match the search. They use the count to show the empty state and to announce "N results" for screen readers.

Base UI's own count (useFilteredItems) only works when the root gets an items prop. Our components also filter their own children, so they need their own count.

Today there are two ways to do this:

  • #953 and #960 add packages/react/shared/item-count/. Each item adds itself to the count while it is shown. Menu, ContextMenu, and Command use it.
  • #954 adds a separate count on the Combobox root.

Both do the same job.

Proposal

After #953, #954, and #960 merge, move Combobox to shared/item-count and delete its own count. Keep one code path for the empty state and the status message in all four components.

Select's search mode (#958) only shows Select.Empty when items is given. It could use the same helper to work without items too.

Lingua principale
TypeScript
Stelle
69
Fork
13
Merge medio
3g 15h
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di raystack/apsara

Tutte le issue di raystack/apsara

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.