Use one item counter for Combobox, Menu, and Command
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
- Bereich
- accessibility, frontend
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
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus raystack/apsara
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 6 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 6 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 6 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 6 Tagen
-
Upgrade Base UI to 1.9.0Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
Maintainer antworten meist innerhalb von 6 Tagen
Alle Issues in raystack/apsara
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 83/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ranxianglei/billion-context#3583 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug:new
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
callstackincubator/simlock#673 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation v3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
anomalyco/opencode#56380 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag