The playground instrument selector's search matches instrument UUIDs instead of labels, so typing a name finds nothing
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 88/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- nodejs, react, typescript
Direzione di ricerca
Leggi apps/playground/src/components/Header/InstrumentSelector/InstrumentSelector.tsx intorno alle righe 49–57, quindi aggiorna la copertura e2e in testing/src/specs/playground.spec.ts e il page object selectInstrument in testing/src/pages/playground/index.page.ts. Esegui il test e2e del playground; il lavoro è completato quando cercando “Form Reference” viene visualizzata quell’opzione e il page object non ha più bisogno del commento sulla soluzione alternativa.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The playground instrument selector's search box matches instrument UUIDs instead of labels, so typing an instrument's name finds nothing. Each Command.Item gets value={instrument.id}, and cmdk filters items by value (plus keywords, which are not set). So the typed text is fuzzy-matched against random crypto.randomUUID() strings. Typing Unilingual shows "No Instruments Found". A short query like a or 3 returns an arbitrary set of instruments whose UUIDs happen to contain those characters, and the set changes on every reload because the ids of examples and templates are regenerated each load. The e2e page object already works around this: selectInstrument clicks the option without typing, with the comment "The list's search box matches on instrument ids rather than labels".
Where
apps/playground/src/components/Header/InstrumentSelector/InstrumentSelector.tsx:49-57:
{instruments.map((instrument) => (
<Command.Item
key={instrument.id}
value={instrument.id}
onSelect={(id) => {
setSelectedInstrument(id);
setOpen(false);
}}
>
Reproduce
- Open the playground and click the instrument selector.
- Type
Unilingual.
Actual: the list shows "No Instruments Found".
Expected: Unilingual Form is listed.
Tests
E2E in testing/src/specs/playground.spec.ts: open the selector, type Form Reference, and assert that the Form Reference option is visible. Change selectInstrument in testing/src/pages/playground/index.page.ts to type the label before clicking, and drop its workaround comment. The fix is a prop on a third-party component and has no logic to unit-test.
Suggested fix
Keep value={instrument.id} for selection and add keywords={[instrument.label]} to each Command.Item (cmdk scores keywords together with the value). Alternatively, use the label as value and select with setSelectedInstrument(instrument.id) from the closure.
- Lingua principale
- TypeScript
- Stelle
- 119
- Fork
- 19
- Merge medio
- 1g 2h
- PR unite (30g)
- 56
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun 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 DouglasNeuroInformatics/OpenDataCapture
-
Area: Playground Bug Difficulty: Low Good First Issue Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
DouglasNeuroInformatics/OpenDataCapture#1805 ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Instruments Bug Difficulty: Low Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
DouglasNeuroInformatics/OpenDataCapture#1801 ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Instruments Bug Difficulty: Low Good First Issue Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
DouglasNeuroInformatics/OpenDataCapture#1800 ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Instruments Bug Difficulty: Low Good First Issue Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
DouglasNeuroInformatics/OpenDataCapture#1799 ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Instruments Bug Difficulty: Low Performance Priority: Medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
DouglasNeuroInformatics/OpenDataCapture#1795 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di DouglasNeuroInformatics/OpenDataCapture
Issue simili
-
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 75/100
lingdojo/kana-dojo#32018 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
paperclipai/paperclip#15751 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
BuilderIO/agent-native#7275 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno