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

Feature/3604 enable dark mode #3776

Merged
merged 111 commits into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
8eab789
Update acceptance criteria with metrics line
Cal-L Jan 31, 2022
b2fcf0c
Merge branch 'main' of https://github.com/MetaMask/metamask-mobile
Cal-L Feb 1, 2022
5b92f05
Merge branch 'main' of https://github.com/MetaMask/metamask-mobile
Cal-L Feb 5, 2022
4b7f203
Remove hardcoded theme on iOS
Cal-L Feb 7, 2022
b9f6322
Set up theme foundation
Cal-L Feb 7, 2022
6eee989
Add theme toggle to react native dev menu
Cal-L Feb 7, 2022
e4949a1
Add theme toggle to react native dev menu
Cal-L Feb 7, 2022
cc56429
Fix inital theme toggle
Cal-L Feb 7, 2022
f3be3dd
Begin hooking up onboarding with dark mode
Cal-L Feb 8, 2022
0f65795
Change default theme mode
Cal-L Feb 8, 2022
5219ac2
Change default theme mode
Cal-L Feb 8, 2022
3c3b028
Begin introducing dark mode to settings
Cal-L Feb 8, 2022
b0b7ba8
Merge branch 'feature/3705-dark-mode-onboarding' of https://github.co…
Cal-L Feb 8, 2022
5236988
Merge branch 'feature/3707-dark-mode-settings' of https://github.com/…
Cal-L Feb 8, 2022
3a50876
Add context type to login screen
Cal-L Feb 8, 2022
b094145
Merge branch 'feature/3705-dark-mode-onboarding' of https://github.co…
Cal-L Feb 8, 2022
7bcab3b
Begin introducing dark theme to send flow
Cal-L Feb 9, 2022
a15f80c
Merge branch 'feature/3709-dark-mode-send' of https://github.com/Meta…
Cal-L Feb 9, 2022
1bb3bbf
Introduce dark mode to swaps
Cal-L Feb 9, 2022
c78a425
Merge branch 'feature/3708-dark-mode-swaps' of https://github.com/Met…
Cal-L Feb 9, 2022
e89be7a
Introduce dark mode to buy and receive screens
Cal-L Feb 9, 2022
0212956
Merge branch 'feature/3716-dark-mode-buy-and-receive' of https://gith…
Cal-L Feb 9, 2022
0cf88d9
Introduce dark mode to asset screens
Cal-L Feb 9, 2022
37c15c6
Merge branch 'feature/3710-dark-mode-import-assets' of https://github…
Cal-L Feb 9, 2022
c60e981
Introduce dark mode to drawer and related screens
Cal-L Feb 9, 2022
6d801a8
Merge branch 'feature/3719-dark-mode-drawer' of https://github.com/Me…
Cal-L Feb 9, 2022
d3c73e2
Import design tokens library
Cal-L Feb 10, 2022
d1c2452
Merge branch 'feature/3698-theme-foundation' of https://github.com/Me…
Cal-L Feb 10, 2022
6e410ae
Merge branch 'feature/3698-theme-foundation' of https://github.com/Me…
Cal-L Feb 10, 2022
0adc633
Merge branch 'feature/3698-theme-foundation' of https://github.com/Me…
Cal-L Feb 10, 2022
67f2046
Merge branch 'feature/3698-theme-foundation' of https://github.com/Me…
Cal-L Feb 10, 2022
347e568
Merge branch 'feature/3698-theme-foundation' of https://github.com/Me…
Cal-L Feb 10, 2022
441ae7a
Merge branch 'feature/3698-theme-foundation' of https://github.com/Me…
Cal-L Feb 10, 2022
728a003
Update carousel with theme colors
Cal-L Feb 10, 2022
ee55a65
Use theme colors in onboarding flow
Cal-L Feb 10, 2022
258863e
Merge branch 'feature/3698-theme-foundation' of https://github.com/Me…
Cal-L Feb 10, 2022
4c8237f
Merge branch 'feature/3705-dark-mode-onboarding' of https://github.co…
Cal-L Feb 10, 2022
b54c9aa
Update general with theme colors
Cal-L Feb 10, 2022
68db651
Update privacy with theme colors
Cal-L Feb 10, 2022
a41e20a
Update advanced with theme colors
Cal-L Feb 10, 2022
ae8baca
Add dark mode to contacts
Cal-L Feb 10, 2022
d449a88
Add dark mode to networks
Cal-L Feb 10, 2022
1c7010d
Add dark mode to experimental
Cal-L Feb 10, 2022
f5b4a9f
Add dark mode to about
Cal-L Feb 10, 2022
6463ec8
Merge branch 'feature/3707-dark-mode-settings' of https://github.com/…
Cal-L Feb 10, 2022
c4f894e
Merge branch 'feature/3708-dark-mode-swaps' of https://github.com/Met…
Cal-L Feb 11, 2022
b2f0475
Update swap elements with theme colors
Cal-L Feb 11, 2022
531185a
Merge branch 'feature/3708-dark-mode-swaps' of https://github.com/Met…
Cal-L Feb 11, 2022
ad4d457
Replacing jpg with pngs (#3734)
georgewrmarshall Feb 11, 2022
9375f0c
Merge branch 'feature/3705-dark-mode-onboarding' of https://github.co…
Cal-L Feb 11, 2022
5a95cab
Update send flow with dark theme colors
Cal-L Feb 11, 2022
8582396
Merge from dark mode send flow
Cal-L Feb 11, 2022
5fb50f0
Add dark theme colors to send and receive flows
Cal-L Feb 11, 2022
06adb55
Merge branch 'feature/3716-dark-mode-buy-and-receive' of https://gith…
Cal-L Feb 11, 2022
aaa7619
Add dark colors to settings
Cal-L Feb 12, 2022
17edf0f
Merge branch 'feature/3707-dark-mode-settings' of https://github.com/…
Cal-L Feb 12, 2022
150f0e2
Update onboarding flow with dark colors
Cal-L Feb 12, 2022
616f9ea
Merge branch 'feature/3705-dark-mode-onboarding' of https://github.co…
Cal-L Feb 12, 2022
0951a6a
Add dark colors to import assets screens
Cal-L Feb 12, 2022
b0db358
Merge from import assets
Cal-L Feb 12, 2022
ee5cc64
Update miscellaneous screens with dark mode
Cal-L Feb 15, 2022
48d2737
Continue updating colors
Cal-L Feb 15, 2022
ea0e666
Reintroduce animated fox
Cal-L Feb 16, 2022
3937ff4
Tag places where icon colors are needed
Cal-L Feb 16, 2022
bbeb290
Use overlay and icon colors from design system
Cal-L Feb 16, 2022
51e1475
Continue flushing dark mode colors
Cal-L Feb 16, 2022
acea0a1
Update few colors
Cal-L Feb 16, 2022
64d6c14
Add light and dark assets
Cal-L Feb 16, 2022
ad87f65
Update modal overlays
Cal-L Feb 17, 2022
24e758b
Replace slippage slider with SVG
Cal-L Feb 17, 2022
5a13248
Hook up theme settings in general settings
Cal-L Feb 17, 2022
58d03a6
Finalize removing unneccessary colors
Cal-L Feb 17, 2022
f87e53f
Finalize removing unneccessary colors
Cal-L Feb 17, 2022
432cad3
Complete dark theme conversion
Cal-L Feb 17, 2022
23b9d02
Fix unit tests
Cal-L Feb 18, 2022
39a6b79
Merge from main
Cal-L Feb 18, 2022
f931248
Replace hardcoded white colors
Cal-L Feb 18, 2022
a215c7b
Increment build numbers
Cal-L Feb 18, 2022
e302a7f
Standardize on nav bar border
Cal-L Feb 18, 2022
8c6741f
Update build numbers
Cal-L Feb 18, 2022
26ec1a0
Update build number
Cal-L Feb 18, 2022
e52ce37
Update refresh loader colors
Cal-L Feb 18, 2022
6b5fd0f
Update unit test
Cal-L Feb 18, 2022
79d528a
Add missing colors. Fix navigating to settings flow.
Cal-L Feb 20, 2022
f310315
Fix approval screen crash
Cal-L Feb 20, 2022
5030d79
Update build numbers
Cal-L Feb 20, 2022
a15c6ea
Fix text input color
Cal-L Feb 21, 2022
cf52719
Merge conflicts from main
Cal-L Mar 8, 2022
62aea77
Introduce analytics event to track theme. Update design token library.
Cal-L Mar 8, 2022
cb98bc8
Explicitly pass app theme style to analytics
Cal-L Mar 9, 2022
0dca09d
Merge from main
Cal-L Mar 9, 2022
2a105b0
Up build numbers
Cal-L Mar 10, 2022
876fbde
Update inputs to use dark mode keyboard for iOS
Cal-L Mar 11, 2022
2caf6ad
Pull from main
Cal-L Mar 11, 2022
2274fcb
Patch action sheet to support dark theme
Cal-L Mar 11, 2022
af89184
Fix WC deep link crasher. Attempt to fix Android dialog dark theme.
Cal-L Mar 11, 2022
417abc9
Fix color artifacts
Cal-L Mar 12, 2022
a172e97
Update build numbers + versions
Cal-L Mar 12, 2022
69805d4
Merge in from main
Cal-L Mar 12, 2022
b293ec7
Fix Android build. Fix toast background.
Cal-L Mar 12, 2022
ca53d34
Remove toast background color
Cal-L Mar 13, 2022
169bf9a
Ypdate build version
Cal-L Mar 14, 2022
4b4b15e
Fix skip tutorial button style
Cal-L Mar 16, 2022
4f1f05f
Fix transaction notification layout
Cal-L Mar 16, 2022
8a21045
Fix custom action sheet colors
Cal-L Mar 16, 2022
ece52eb
Merge in from main
Cal-L Mar 16, 2022
1b48faf
Remove manual theme settings. Default to OS theme.
Cal-L Mar 16, 2022
d2f0838
Update placholder color
Cal-L Mar 16, 2022
bf8c975
Fix checkbox colors
Cal-L Mar 16, 2022
1773f19
Merge in from main
Cal-L Mar 16, 2022
ae94ac3
Update unit tests
Cal-L Mar 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ module.exports = {
'eslint-comments/no-unused-disable': 0,
'react-native/no-color-literals': 2,
'react-native/no-inline-styles': 2,
'react-native/no-unused-styles': 2,
'react-native/no-unused-styles': 0,
'react-native/split-platform-components': 2,
'react/jsx-boolean-value': 2,
'react/jsx-key': 1,
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ android {
applicationId "io.metamask"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 834
versionName "4.2.2"
versionCode 846
versionName "4.3.3"
multiDexEnabled true
testBuildType System.getProperty('testBuildType', 'debug')
missingDimensionStrategy "minReactNative", "minReactNative46"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion android/app/src/main/res/drawable/background_splash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:drawable="@color/white"/>
android:drawable="@color/theme"/>

<item
android:width="200dp"
Expand Down
Binary file modified android/app/src/main/res/drawable/diamond.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion android/app/src/main/res/layout/launch_screen.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent" android:background="#ffffffff">
android:layout_height="match_parent" android:background="@color/theme">
<ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/diamond" android:scaleType="center" />
</RelativeLayout>
4 changes: 4 additions & 0 deletions android/app/src/main/res/values-night/booleans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="useLightStatusBar">false</bool>
</resources>
7 changes: 7 additions & 0 deletions android/app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="theme">#151719</color>
<color name="themeInverse">#FFFFFF</color>
<color name="navBar">#000000</color>
<color name="lightgray">#EBEBED</color>
</resources>
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/booleans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="useLightStatusBar">true</bool>
</resources>
4 changes: 3 additions & 1 deletion android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="white">#FFFFFF</color>
<color name="theme">#FFFFFF</color>
<color name="themeInverse">#000000</color>
<color name="navBar">#000000</color>
<color name="lightgray">#EBEBED</color>
</resources>
23 changes: 11 additions & 12 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:statusBarColor">@color/lightgray</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:navigationBarColor">@color/lightgray</item>
<item name="android:windowLightNavigationBar">true</item>
<item name="android:windowBackground">@color/theme</item>
<item name="android:statusBarColor">@color/theme</item>
<item name="android:navigationBarColor">@color/navBar</item>
<item name="android:windowLightStatusBar">@bool/useLightStatusBar</item>
<item name="android:textColor">@color/themeInverse</item>
</style>

<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<style name="SplashTheme" parent="Theme.AppCompat.DayNight">
<item name="android:windowBackground">@drawable/background_splash</item>
<item name="android:statusBarColor">@color/white</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:navigationBarColor">@color/white</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowLightNavigationBar">true</item>
<item name="android:textColor">#000000</item>
<item name="android:statusBarColor">@color/theme</item>
<item name="android:navigationBarColor">@color/navBar</item>
<item name="android:windowLightStatusBar">@bool/useLightStatusBar</item>
<item name="android:textColor">@color/themeInverse</item>
</style>

</resources>
6 changes: 6 additions & 0 deletions app/__mocks__/react-native-view-shot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
captureScreen: jest.fn().mockImplementation(() => {
// eslint-disable-next-line no-console
console.log('capture screen');
}),
};
7 changes: 7 additions & 0 deletions app/actions/user/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ export function logOut() {
};
}

export function setAppTheme(theme) {
return {
type: 'SET_APP_THEME',
payload: { theme },
};
}

/**
* Temporary action to control auth flow
*
Expand Down
Loading