Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Preferred light/dark theme?

Aperta
#55 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
android, ios, javascript, react-native
Ambito
mobile

Direzione di ricerca

Inizia esaminando l’entry point AndroidInfoModule di React Native e le API Android uiMode e iOS traitCollection.userInterfaceStyle citate nell’issue. Il lavoro è completato quando il provider del tema può distinguere tra le preferenze non specificata, chiara e scura su entrambe le piattaforme, con il comportamento coperto da test appropriati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the feature

It'd be nice to automatically be able to accommodate a user's preferred light/dark theme preferences.

Perhaps, simplifying the check of uiMode && UI_MODE_NIGHT_MASK on Android and traitCollection.userInterfaceStyle on iOS.

These both have undefined/unspecified, light, and dark/night.

Unfortunately, the built-in react-native uiMode doesn't give this information.

Motivation

With iOS 13 and Android Q making this sort of theming more integrated (and Google and Apple's own apps supporting the ability to switch at the OS level), it'd be nice to automatically detect what theme the user wants.

I'd rather not force a user to fumble through app settings to configure the theme if they've already got an option to specify it at the OS level.

Related Issues

I didn't see any at first glance, but I may have missed them.

Lingua principale
JavaScript
Stelle
466
Fork
53
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstack/react-theme-provider

Tutte le issue di callstack/react-theme-provider

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.