Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Use one item counter for Combobox, Menu, and Command

Offen
#962 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 6 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
react, typescript

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
69
Forks
13
Ø Merge
4 T. 14 Std.
Gemergte PRs (30 T.)
34

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus raystack/apsara

Alle Issues in raystack/apsara

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.