Hand colorScheme.set() to Appearance, so every reader of the scheme moves with it
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- react-native, typescript
- Ambito
- frontend
Direzione di ricerca
Start by reading issue #415 and tracing colorScheme.set(), useColorScheme(), and the stores built on Appearance.addChangeListener; the issue names no files or tests. The open question is whether set() should delegate to Appearance or remain local, so the direction needs a maintainer decision before implementation. Done means all scheme readers behave consistently with the chosen direction, including the described platform and Jest cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
On main, colorScheme.set() moves this library's observable and nothing else. useColorScheme() and every store built on Appearance.addChangeListener keep the old scheme, so an app that calls the setter renders its dark: classes on one scheme and its prop-valued colours on the other.
#415 hands the request to Appearance.setColorScheme(), which holds it on the platform, and the class layer follows the scheme Appearance then reports:
import { colorScheme } from "react-native-css";
colorScheme.set("dark"); // asks Appearance; every reader moves when the platform applies it
colorScheme.set(null); // follows the system again
colorScheme.get(); // the scheme the platform reports
Two things change for an app that calls set():
colorScheme.get()andprefers-color-schemekeep the scheme the platform last reported until it applies the request, instead of answering the request at once.- Where React Native reports no scheme it applies, as for an Android activity that does not handle
uiModeitself, the class layer keeps the previous scheme, asuseColorScheme()does.
Without an Appearance native module, as in a jest suite, set() keeps the scheme in this library, as on main.
Is handing the scheme to Appearance the direction you want, or would you rather keep set() local?
- Lingua principale
- TypeScript
- Stelle
- 166
- Fork
- 45
- Merge medio
- 13g 14h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né 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 nativewind/react-native-css
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 87/100
nativewind/react-native-css#506 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
nativewind/react-native-css#509 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
nativewind/react-native-css#507 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
nativewind/react-native-css#481 · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
nativewind/react-native-css#473 ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di nativewind/react-native-css
Issue simili
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrorsForse già presa @as992949791 l’ha presa oggi. Apertagood first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
reticlehq/reticle#2033 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area:quality p3-medium ready-for-agent type:docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
fderuiter/deruiter.dev#3589 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
manfredsteyer/angular-oauth2-oidc#1514 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
marmelab/react-admin#11431 ·
I maintainer di solito rispondono entro 1 giorno