Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add theming and dark mode support #64

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Add theming and dark mode support #64

merged 2 commits into from
Oct 25, 2024

Conversation

katsuroo
Copy link
Contributor

Overview

This pull request introduces a proof of concept for theming using the built-in theming capabilities of react-navigation. The goal is to create a thin theming layer that simplifies the implementation of dark mode styling across the app.

Key Elements for Dark Mode
To properly implement dark mode, the following elements are considered

  1. Navigation
  2. Custom Components
  3. Third-Party Libraries
  4. Icons / Images

Why This Approach?

This approach leverages a theming layer on top of a library we are already using, react-navigation, without introducing new dependencies. It maintains a clear separation between style and component logic, making it easier to manage and extend theming across the app.

React navigation also exposes some basic theming defaults for light and dark mode which we can leverage for basic styling of text, background, etc.

Most of the styling libraries that supports theming introduces a bunch of new syntax and introduces tight coupling between styles and component which makes it hard to refactor in the future. Since this is a very thin theming layer it is also easy to just plug this into the styling libraries as well.

Simulator.Screen.Recording.-.iPhone.15.-.2024-09-27.at.04.50.00.mp4

This adds a thin theming layer using the react navigation theming
capabilities. Some basic dark mode styling has also been added to the
generated content.
Copy link
Contributor

@codeofdiego codeofdiego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition! Thank you very much

@katsuroo katsuroo marked this pull request as ready for review October 25, 2024 04:53
@katsuroo katsuroo changed the title Theming POC Add theming and dark mode support Oct 25, 2024
@katsuroo katsuroo merged commit 77a9408 into main Oct 25, 2024
2 checks passed
@katsuroo katsuroo deleted the jw/theme-poc branch October 25, 2024 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants