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

[MBL-1127] Dark mode #1922

Merged
merged 11 commits into from
Jan 11, 2024
Merged

[MBL-1127] Dark mode #1922

merged 11 commits into from
Jan 11, 2024

Conversation

mtgriego
Copy link
Contributor

@mtgriego mtgriego commented Jan 5, 2024

📲 What

Add forced dark mode to the app so the app matches the system theme and shows dark mode content

🤔 Why

Dark mode is one of the most requested features for android

🛠 How

Added a new theme for v29+ that includes
<item name="isLightTheme">true</item>
which forces the app into a dark theme. This is not a permanent fix, but a quick win

👀 See

Screenshot_20240102-124202
Screenshot_20240102-124127
Screenshot_20240102-124038I![Screenshot_20240102-124043]
Screenshot_20240102-124023
Screenshot_20240102-123849
(https://github.com/kickstarter/android-oss/assets/7563288/be3814b0-2d86-4fe0-b4e5-3580d6961574)

📋 QA

Go through every screen in the app and confirm it looks good in both light and dark modes
NOTE: The help page webviews (privacy policy, terms etc) will only appear in light mode

Story 📖

MBL-1127

…existing screens for dark mode in compose where needed
@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2024

Codecov Report

Attention: 86 lines in your changes are missing coverage. Please review.

Comparison is base (97e6b10) 74.23% compared to head (33763b3) 74.09%.

Files Patch % Lines
...ckstarter/ui/activities/compose/FormularyScreen.kt 0.00% 42 Missing ⚠️
...arter/ui/activities/compose/ReportProjectScreen.kt 0.00% 24 Missing ⚠️
...om/kickstarter/libs/utils/extensions/ContextExt.kt 0.00% 10 Missing ⚠️
...ava/com/kickstarter/ui/toolbars/compose/ToolBar.kt 33.33% 1 Missing and 3 partials ⚠️
...a/com/kickstarter/viewmodels/DiscoveryViewModel.kt 63.63% 0 Missing and 4 partials ⚠️
...i/activities/compose/PreLaunchProjectPageScreen.kt 50.00% 1 Missing ⚠️
...om/kickstarter/ui/views/compose/KsCreatorLayout.kt 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1922      +/-   ##
============================================
- Coverage     74.23%   74.09%   -0.14%     
  Complexity     1967     1967              
============================================
  Files           336      336              
  Lines         19597    19634      +37     
  Branches       2711     2716       +5     
============================================
  Hits          14547    14547              
- Misses         3466     3499      +33     
- Partials       1584     1588       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mtgriego mtgriego marked this pull request as ready for review January 10, 2024 23:19
@@ -62,6 +63,8 @@ class CreatePasswordActivity : AppCompatActivity() {
AppThemes.LIGHT.ordinal -> false
else -> false
}
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
Copy link
Contributor

Choose a reason for hiding this comment

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

[not mandatory], but we could try to move all theme related logic to the composable KickstarterApp, trying to avoid having to repeat in every single screen the theming setup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thats a good idea, just not sure how much access the kickstarter app has to builds and stuff, but ill play around with that, would save a lot of time

Arkariang
Arkariang previously approved these changes Jan 10, 2024
@mtgriego mtgriego merged commit 41fc5b9 into master Jan 11, 2024
3 checks passed
@mtgriego mtgriego deleted the mgriego/MBL-1127 branch January 11, 2024 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants