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

Make the Switch to Dark Mode #12944

Merged
merged 7 commits into from
Nov 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources>
<color name="bootsplash_background">#FFFFFF</color>
<color name="bootsplash_background">#061B09</color>
<color name="white">#FFFFFF</color>
<color name="accent">#0185ff</color>
<color name="dark">#0b1b34</color>
2 changes: 1 addition & 1 deletion ios/NewExpensify/BootSplash.storyboard
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
<color key="backgroundColor" red="1.00000000000000" green="1.00000000000000" blue="1.00000000000000" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" red="249.00000000000000" green="228.00000000000000" blue="246.00000000000000" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" notEnabled="YES"/>
</accessibility>
3 changes: 2 additions & 1 deletion src/components/Checkbox.js
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ import React from 'react';
import {View, Pressable} from 'react-native';
import PropTypes from 'prop-types';
import styles from '../styles/styles';
import themeColors from '../styles/themes/default';
import stylePropTypes from '../styles/stylePropTypes';
import Icon from './Icon';
import * as Expensicons from './Icon/Expensicons';
@@ -112,7 +113,7 @@ class Checkbox extends React.Component {
this.state.isFocused && styles.borderColorFocus,
]}
>
<Icon src={Expensicons.Checkmark} fill="white" height={14} width={14} />
{this.props.isChecked && <Icon src={Expensicons.Checkmark} fill={themeColors.textLight} height={14} width={14} />}
</View>
)}
</Pressable>
2 changes: 1 addition & 1 deletion src/components/CustomStatusBar/index.android.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import {StatusBar} from 'react-native';

export default class CustomStatusBar extends React.Component {
componentDidMount() {
StatusBar.setBarStyle('dark-content');
StatusBar.setBarStyle('light-content');
StatusBar.setBackgroundColor('transparent');
StatusBar.setTranslucent(true);
}
2 changes: 1 addition & 1 deletion src/components/CustomStatusBar/index.js
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import {StatusBar} from 'react-native';

export default class CustomStatusBar extends React.Component {
componentDidMount() {
StatusBar.setBarStyle('dark-content', true);
StatusBar.setBarStyle('light-content', true);
}

render() {
2 changes: 1 addition & 1 deletion src/pages/home/report/FloatingMessageCounter/index.js
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ class FloatingMessageCounter extends PureComponent {
onPress={this.props.onClick}
ContentComponent={() => (
<View style={[styles.flexRow]}>
<Icon small src={Expensicons.DownArrow} fill={themeColors.textReversed} />
<Icon small src={Expensicons.DownArrow} fill={themeColors.textLight} />
<Text
selectable={false}
style={[
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspacesListPage.js
Original file line number Diff line number Diff line change
@@ -122,7 +122,7 @@ class WorkspacesListPage extends Component {
iconType: policy.avatar ? CONST.ICON_TYPE_AVATAR : CONST.ICON_TYPE_ICON,
action: () => Navigation.navigate(ROUTES.getWorkspaceInitialRoute(policy.id)),
iconStyles: policy.avatar ? [] : [styles.popoverMenuIconEmphasized],
iconFill: themeColors.iconReversed,
iconFill: themeColors.textLight,
fallbackIcon: Expensicons.FallbackWorkspaceAvatar,
brickRoadIndicator: PolicyUtils.getPolicyBrickRoadIndicatorStatus(policy, this.props.policyMembers),
pendingAction: policy.pendingAction,
2 changes: 1 addition & 1 deletion src/styles/styles.js
Original file line number Diff line number Diff line change
@@ -2149,7 +2149,7 @@ const styles = {
},

checkedContainer: {
backgroundColor: themeColors.link,
backgroundColor: themeColors.checkBox,
},

iouAmountText: {
5 changes: 4 additions & 1 deletion src/styles/themes/default.js
Original file line number Diff line number Diff line change
@@ -55,8 +55,10 @@ const darkTheme = {
placeholderText: colors.greenIcons,
heroCard: colors.blue,
uploadPreviewActivityIndicator: colors.greenHighlightBackground,
checkBox: colors.green,
};

// DEPRECATED THEME, Delete after successful rebranding.
const oldTheme = {
shadow: colors.black,
link: colors.blue,
@@ -96,6 +98,7 @@ const oldTheme = {
uploadPreviewActivityIndicator: colors.gray1,
cardBG: colors.gray1,
cardBorder: colors.gray1,
checkBox: colors.blue,

// Merging new Keys for Dark Mode merge. Delete after new branding is implemented.
highlightBG: colors.gray1,
@@ -113,4 +116,4 @@ const oldTheme = {
textDark: colors.dark,
};

export default oldTheme;
export default darkTheme;