Skip to content

Commit

Permalink
Merge pull request Expensify#32512 from Expensify/georgia-LightModeTh…
Browse files Browse the repository at this point in the history
…emeQA

Finalize Light Mode / Dark Mode (with new primitives)
  • Loading branch information
Gonals authored Dec 7, 2023
2 parents d3ea6ea + e69b6c8 commit 8fa65ec
Show file tree
Hide file tree
Showing 31 changed files with 164 additions and 148 deletions.
4 changes: 2 additions & 2 deletions .imgbotconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ignoredFiles": [
"assets/images/empty-state_background-fade-dark.png", // Caused an issue with colour gradients, https://github.com/Expensify/App/issues/30499
"assets/images/empty-state_background-fade-light.png"
"assets/images/themeDependent/empty-state_background-fade-dark.png", // Caused an issue with colour gradients, https://github.com/Expensify/App/issues/30499
"assets/images/themeDependent/empty-state_background-fade-light.png"
],
"aggressiveCompression": "false"
}
2 changes: 1 addition & 1 deletion .storybook/public/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ a.sidebar-item[data-selected="true"], a.sidebar-item[data-selected="true"]:focus
}

.sidebar-container {
background: #07271f;
background: #072419;
}
18 changes: 9 additions & 9 deletions .storybook/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ export default create({
fontBase: 'ExpensifyNeue-Regular',
fontCode: 'monospace',
base: 'dark',
appBg: colors.darkHighlightBackground,
colorPrimary: colors.darkDefaultButton,
appBg: colors.productDark200,
colorPrimary: colors.productDark400,
colorSecondary: colors.green,
appContentBg: colors.darkAppBackground,
textColor: colors.darkPrimaryText,
barTextColor: colors.darkPrimaryText,
appContentBg: colors.productDark100,
textColor: colors.productDark900,
barTextColor: colors.productDark900,
barSelectedColor: colors.green,
barBg: colors.darkAppBackground,
appBorderColor: colors.darkBorders,
inputBg: colors.darkHighlightBackground,
inputBorder: colors.darkBorders,
barBg: colors.productDark100,
appBorderColor: colors.productDark400,
inputBg: colors.productDark200,
inputBorder: colors.productDark400,
appBorderRadius: 8,
inputBorderRadius: 8,
});
Binary file removed assets/images/empty-state_background-fade-dark.png
Binary file not shown.
Binary file removed assets/images/empty-state_background-fade-light.png
Binary file not shown.
Binary file removed assets/images/example-check-image-en.png
Binary file not shown.
Binary file removed assets/images/example-check-image-es.png
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/images/home-background--android.svg
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 assets/images/home-background--mobile.svg
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 assets/images/home-fade-gradient--mobile.svg
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 assets/images/home-fade-gradient.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/_sass/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ $color-green400: #03D47C;
$color-green-icons: #8B9C8F;
$color-green-borders: #1A3D32;
$color-button-background: #1A3D32;
$color-button-hovered: #2C6755;
$color-green-highlightBG: #07271F;
$color-button-hovered: #2A604F;
$color-green-highlightBG: #072419;
$color-green-highlightBG-hover: #06231c;
$color-green-appBG: #061B09;
$color-green-hover: #00a862;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/images/settings-old-dot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/components/LHNOptionsList/OptionRowLHN.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ function OptionRowLHN(props) {
optionItem.type === CONST.REPORT.TYPE.CHAT && _.isEmpty(optionItem.chatType) && !optionItem.isThread && lodashGet(optionItem, 'displayNamesWithTooltips.length', 0) > 2;
const fullTitle = isGroupChat ? getGroupChatName(ReportUtils.getReport(optionItem.reportID)) : optionItem.text;

const subscriptAvatarBorderColor = props.isFocused ? focusedBackgroundColor : theme.sidebar;

return (
<OfflineWithFeedback
pendingAction={optionItem.pendingAction}
Expand Down Expand Up @@ -215,7 +217,7 @@ function OptionRowLHN(props) {
{!_.isEmpty(optionItem.icons) &&
(optionItem.shouldShowSubscript ? (
<SubscriptAvatar
backgroundColor={props.isFocused ? theme.activeComponentBG : theme.sidebar}
backgroundColor={hovered && !props.isFocused ? hoveredBackgroundColor : subscriptAvatarBorderColor}
mainAvatar={optionItem.icons[0]}
secondaryAvatar={optionItem.icons[1]}
size={props.viewMode === CONST.OPTION_MODE.COMPACT ? CONST.AVATAR_SIZE.SMALL : defaultSubscriptSize}
Expand Down
11 changes: 3 additions & 8 deletions src/pages/ReimbursementAccount/BankAccountManualStep.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import lodashGet from 'lodash/get';
import React, {useCallback} from 'react';
import {Image} from 'react-native';
import _ from 'underscore';
import CheckboxWithLabel from '@components/CheckboxWithLabel';
import FormProvider from '@components/Form/FormProvider';
Expand All @@ -18,7 +17,7 @@ import useThemeStyles from '@styles/useThemeStyles';
import * as BankAccounts from '@userActions/BankAccounts';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import exampleCheckImage from './exampleCheckImage';
import ExampleCheck from './ExampleCheck';
import StepPropTypes from './StepPropTypes';

const propTypes = {
Expand All @@ -27,7 +26,7 @@ const propTypes = {

function BankAccountManualStep(props) {
const styles = useThemeStyles();
const {translate, preferredLocale} = useLocalize();
const {translate} = useLocalize();
const {reimbursementAccount, reimbursementAccountDraft} = props;

const shouldDisableInputs = Boolean(lodashGet(reimbursementAccount, 'achData.bankAccountID'));
Expand Down Expand Up @@ -95,11 +94,7 @@ function BankAccountManualStep(props) {
style={[styles.mh5, styles.mt3, styles.flexGrow1]}
>
<Text style={[styles.mb5]}>{translate('bankAccount.checkHelpLine')}</Text>
<Image
resizeMode="contain"
style={[styles.exampleCheckImage, styles.mb5]}
source={exampleCheckImage(preferredLocale)}
/>
<ExampleCheck />
<InputWrapper
InputComponent={TextInput}
autoFocus
Expand Down
24 changes: 24 additions & 0 deletions src/pages/ReimbursementAccount/ExampleCheck.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import {Image} from 'react-native';
import useLocalize from '@hooks/useLocalize';
import useThemeIllustrations from '@styles/illustrations/useThemeIllustrations';
import useThemeStyles from '@styles/useThemeStyles';
import CONST from '@src/CONST';

function ExampleCheckImage() {
const styles = useThemeStyles();
const illustrations = useThemeIllustrations();
const {preferredLocale} = useLocalize();
const isSpanish = (preferredLocale || CONST.LOCALES.DEFAULT) === CONST.LOCALES.ES;

return (
<Image
resizeMode="contain"
style={[styles.exampleCheckImage, styles.mb5]}
source={isSpanish ? illustrations.ExampleCheckES : illustrations.ExampleCheckEN}
/>
);
}

ExampleCheckImage.displayName = 'ExampleCheckImage';
export default ExampleCheckImage;
14 changes: 0 additions & 14 deletions src/pages/ReimbursementAccount/exampleCheckImage.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/styles/StyleUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ function getAutoCompleteSuggestionContainerStyle(itemsHeight: number): ViewStyle
* Select the correct color for text.
*/
function getColoredBackgroundStyle(theme: ThemeColors, isColored: boolean): StyleProp<TextStyle> {
return {backgroundColor: isColored ? theme.link : undefined};
return {backgroundColor: isColored ? theme.mentionBG : undefined};
}

function getEmojiReactionBubbleStyle(theme: ThemeColors, isHovered: boolean, hasUserReacted: boolean, isContextMenu = false): ViewStyle {
Expand Down
37 changes: 18 additions & 19 deletions src/styles/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,26 @@ const colors: Record<string, Color> = {
transparent: 'transparent',

// Dark Mode Theme Colors
darkAppBackground: '#061B09',
darkHighlightBackground: '#07271F',
darkBorders: '#1A3D32',
darkIcons: '#8B9C8F',
darkSupportingText: '#AFBBB0',
darkPrimaryText: '#E7ECE9',
darkDefaultButton: '#184E3D',
darkDefaultButtonHover: '#2C6755',
darkDefaultButtonPressed: '#467164',
productDark100: '#061B09',
productDark200: '#072419',
productDark300: '#0A2E25',
productDark400: '#1A3D32',
productDark500: '#224F41',
productDark600: '#2A604F',
productDark700: '#8B9C8F',
productDark800: '#AFBBB0',
productDark900: '#E7ECE9',

// Light Mode Theme Colors
lightAppBackground: '#FCFBF9',
lightHighlightBackground: '#F8F4F0',
lightBorders: '#EBE6DF',
lightBordersLighter: '#2B5548',
lightIcons: '#A2A9A3',
lightSupportingText: '#76847E',
lightPrimaryText: '#002E22',
lightDefaultButton: '#EEEBE7',
lightDefaultButtonHover: '#E3DFD9',
lightDefaultButtonPressed: '#D2CCC3',
productLight100: '#FCFBF9',
productLight200: '#F8F4F0',
productLight300: '#F2EDE7',
productLight400: '#E6E1DA',
productLight500: '#D8D1C7',
productLight600: '#C7BFB3',
productLight700: '#A2A9A3',
productLight800: '#76847E',
productLight900: '#002E22',

// Brand Colors from Figma
blue100: '#B0D9FF',
Expand Down
6 changes: 5 additions & 1 deletion src/styles/illustrations/dark.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import EmptyStateBackgroundImage from '@assets/images/empty-state_background-fade-dark.png';
import EmptyStateBackgroundImage from '@assets/images/themeDependent/empty-state_background-fade-dark.png';
import ExampleCheckEN from '@assets/images/themeDependent/example-check-image-dark-en.png';
import ExampleCheckES from '@assets/images/themeDependent/example-check-image-dark-es.png';
import {Illustrations} from './types';

const illustrations = {
EmptyStateBackgroundImage,
ExampleCheckEN,
ExampleCheckES,
} satisfies Illustrations;

export default illustrations;
6 changes: 5 additions & 1 deletion src/styles/illustrations/light.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import EmptyStateBackgroundImage from '@assets/images/empty-state_background-fade-light.png';
import EmptyStateBackgroundImage from '@assets/images/themeDependent/empty-state_background-fade-light.png';
import ExampleCheckEN from '@assets/images/themeDependent/example-check-image-light-en.png';
import ExampleCheckES from '@assets/images/themeDependent/example-check-image-light-es.png';
import {Illustrations} from './types';

const illustrations = {
EmptyStateBackgroundImage,
ExampleCheckEN,
ExampleCheckES,
} satisfies Illustrations;

export default illustrations;
2 changes: 2 additions & 0 deletions src/styles/illustrations/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import {ImageSourcePropType} from 'react-native';

type Illustrations = {
EmptyStateBackgroundImage: ImageSourcePropType;
ExampleCheckES: ImageSourcePropType;
ExampleCheckEN: ImageSourcePropType;
};

// eslint-disable-next-line import/prefer-default-export
Expand Down
2 changes: 1 addition & 1 deletion src/styles/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2819,7 +2819,7 @@ const styles = (theme: ThemeColors) =>
smallEditIcon: {
alignItems: 'center',
backgroundColor: theme.buttonHoveredBG,
borderColor: theme.textReversed,
borderColor: theme.appBG,
borderRadius: 14,
borderWidth: 3,
color: theme.textReversed,
Expand Down
Loading

0 comments on commit 8fa65ec

Please sign in to comment.