Skip to content

Reconcile AppTheme Module with new Appearance Module #4322

@NickGerleman

Description

@NickGerleman

React Native 0.62 adds a new Appearance Module, which allows apps to query light mode vs dark mode. See https://medium.com/@rossbulat/theming-in-react-native-explained-ac40d0d2e15c

This conflicts with out existing custom AppTheme module, which provides the same functionality, but adds information about high contrast, and the high contrast palette.

We should figure out our story here. A few options immediately come to mind:

  1. Keep both around: This seems confusing to users, but there is some Windows specific theming information we might want to expose in the future, like "personalization color" (highlight color).
  2. Add APIs to Appearance: We should not do this. It will just add debt.
  3. Add AppearanceWindows with a superset of functionality: This seems cleanish if we can't logically split other things off.
  4. Split some functionality into AccessibilityInfo and PlatformColor: We already have Windows specific accessibility needs, and these APIs already differ by platform. For things like whether high contrast is enabled, that seems like a potentially better home. High contrast palette, or personalization color could work with PlatformColor, which we should have soon.

FYI @marlenecota

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions