Selecting a language inside an instrument preview switches the app language and closes the preview on Manage Group
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, tailwindcss, typescript
Direzione di ricerca
Start in apps/web/src/components/InstrumentPreviewDialog/InstrumentPreviewDialog.tsx around lines 93-99, where InstrumentRenderer gets no language prop, then follow useInstrumentLanguage to see how changeContentLanguage binds to the global changeLanguage. Next, check useInstrumentInfoQuery and the queryKey in apps/web/src/routes/_app/group/manage.tsx (lines 854-870 and 976-987) to see why refetching unmounts ManageGroupForm. Done means preview language changes stay local and the dialog stays open while the query refetches.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
InstrumentPreviewDialog (apps/web/src/components/InstrumentPreviewDialog/InstrumentPreviewDialog.tsx:93-99) renders InstrumentRenderer with no language prop. useInstrumentLanguage(undefined) therefore binds changeContentLanguage to libui's global changeLanguage, so switching languages from inside a previewed interactive instrument (its "Select Language" screen, its toolbar language toggle, or a changeLanguage event from the iframe) switches the whole web app's interface language.
On /group/manage (apps/web/src/routes/_app/group/manage.tsx:854-870, 976-987), useInstrumentInfoQuery includes resolvedLanguage in its queryKey. Switching to an uncached language sets instrumentInfoQuery.data to undefined while refetching, which makes data null and causes WithFallback to unmount ManageGroupForm (where previewItem state lives), closing the open InstrumentPreviewDialog immediately.
Reproduce
- Open
/group/managein English. - Click the preview icon on a bilingual interactive instrument (or a series containing one) with
enableLanguageSelect: trueorenableLanguageToggle: true, click Preview Form, and click Begin. - Pick Français on the "Select Language" screen (or from the toolbar language toggle).
Actual: the entire web interface switches to French and the preview dialog unmounts and closes while useInstrumentInfoQuery refetches for fr.
Expected: the preview stays open (and language switches inside a preview stay local to the preview, or ManageGroupForm keeps previous instrumentInfoQuery data while refetching).
- Lingua principale
- TypeScript
- Stelle
- 119
- Fork
- 19
- Merge medio
- 1g 18h
- PR unite (30g)
- 60
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
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at onceForse già presa @2389400626lh-ops l’ha presa oggi. ApertaArea: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Infrastructure Chore Difficulty: Low Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DouglasNeuroInformatics/OpenDataCapture#1948 ·
I maintainer di solito rispondono entro 1 giorno
-
apps/web preview overwrites newly built dist/index.html with stale dist/index.html.bak across buildsApertaArea: Infrastructure Area: Web Bug Difficulty: Low Priority: Medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
DouglasNeuroInformatics/OpenDataCapture#1938 ·
I maintainer di solito rispondono entro 1 giorno
-
Area: API Bug Difficulty: Low Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
DouglasNeuroInformatics/OpenDataCapture#1937 ·
I maintainer di solito rispondono entro 1 giorno
-
Area: Infrastructure Bug Difficulty: Low Priority: Medium Security
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DouglasNeuroInformatics/OpenDataCapture#1916 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di DouglasNeuroInformatics/OpenDataCapture
Issue simili
-
Resources: New templates of Beijing SubwayForse già presa @rmt-svc l’ha presa oggi. Apertaresources
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
railmapgen/rmg-templates#2726 ·
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
homarr-labs/homarr#7729 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Buzzpy/Dev-Encyclopedia#218 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
prio:low status:done type:content
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
davidsneighbour/samui-samui.de#1925 ·