Hand colorScheme.set() to Appearance, so every reader of the scheme moves with it
Maintainer antworten meist innerhalb von 3 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- react-native, typescript
- Bereich
- frontend
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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?
- Vorherrschende Sprache
- TypeScript
- Sterne
- 166
- Forks
- 45
- Ø Merge
- 13 T. 14 Std.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine 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 nativewind/react-native-css
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 87/100
nativewind/react-native-css#506 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 56/100
nativewind/react-native-css#509 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
nativewind/react-native-css#507 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 62/100
nativewind/react-native-css#481 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
nativewind/react-native-css#473 ·
Maintainer antworten meist innerhalb von 3 Tagen
Alle Issues in nativewind/react-native-css
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
marmelab/react-admin#11431 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
db-ux-design-system/core-web#8655 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
stripe/react-stripe-js#728 ·
-
[Upload Grade C dataset] the pop-up changes it's size while uploading the document => Jumping effectOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
epam/statgpt-admin-frontend#305 ·
Maintainer antworten meist innerhalb von 1 Tag