Use one item counter for Combobox, Menu, and Command
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
- Ambito
- accessibility, frontend
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
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di raystack/apsara
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 2 giorni
-
DataView: don't offer select/multiselect filters with empty filterOptionsForse già presa @rohanchkrabrty l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
raystack/apsara#849 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di raystack/apsara
Issue simili
-
status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
a2ui-project/a2ui#3158 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
hemilabs/ui-monorepo#2475 ·
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
lingdojo/kana-dojo#32279 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
code-quality refactoring
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
github/gh-aw-firewall#9879 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Arrow-key cursor movement in combined diff view doesn't scroll to keep the cursor visibleApertaos:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno