Skip to content

Commit

Permalink
Merge branch 'Expensify:main' into fix--App-freezes-after-killed-app-…
Browse files Browse the repository at this point in the history
…is-called-via-concierge-deep-link
  • Loading branch information
HezekielT authored Oct 11, 2023
2 parents b5a1d8f + 502df9b commit 7c886ef
Show file tree
Hide file tree
Showing 25 changed files with 227 additions and 77 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001038002
versionName "1.3.80-2"
versionCode 1001038100
versionName "1.3.81-0"
}

flavorDimensions "default"
Expand Down
15 changes: 12 additions & 3 deletions docs/_sass/_search-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,14 @@ $color-gray-label: $color-gray-label;
/* All gsc id & class are Google Search relate gcse_0 is the search bar parent & gcse_1 is the search result list parent */
#___gcse_0 {
margin-left: 20px;
margin-top: -8px;
}

/* This input is in #___gcse_0 search bar */
input#gsc-i-id1.gsc-input {
background-color: $color-appBG;
padding: 15px 0px 0px !important;
pointer-events: auto;
color: #E7ECE9;
font-family: "ExpensifyNeue", "Segoe UI Emoji", "Noto Color Emoji" !important;
}
Expand All @@ -102,23 +105,29 @@ input#gsc-i-id1.gsc-input {
background-color: $color-appBG;
border-bottom: $color-borders 2px solid;
border-bottom-left-radius: 0px;

pointer-events: none;

&:focus-within {
border-bottom: $color-accent 2px solid;
}
}

.gsc-input-box .gsib_a {
padding: 5px 9px 4px 0px;
padding: 0px 0px 4px 0px;
}

.search-icon {
margin-left: auto;
}

.gsst_b, .gsst_a {
padding: 0px !important;
}
/* This is the close icon on search bar */
.gsib_b .gsst_a .gscb_a {
color: $color-icons;
padding: 8px 6px 0px 6px !important;
pointer-events: auto;

&:hover {
color: $color-text;
Expand Down Expand Up @@ -148,6 +157,7 @@ label.search-label {
font-family: "ExpensifyNeue", "Segoe UI Emoji", "Noto Color Emoji";
transform: translateY(-50%);
left: 20px;
pointer-events: none;
color: $color-gray-label;
transform-origin: left top;
user-select: none;
Expand Down Expand Up @@ -181,7 +191,6 @@ label.search-label {
/* Change the Google Search Button icon into Expensify icon button */
.gsc-search-button.gsc-search-button-v2 {
padding: 10px;
margin-top: -7px;
margin-left: 15px;
margin-right: 20px;
border-radius: 25px;
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.80</string>
<string>1.3.81</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.80.2</string>
<string>1.3.81.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.80</string>
<string>1.3.81</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.80.2</string>
<string>1.3.81.0</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.3.80-2",
"version": "1.3.81-0",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
2 changes: 1 addition & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ const CONST = {
CARD_NUMBER: /^[0-9]{15,16}$/,
CARD_SECURITY_CODE: /^[0-9]{3,4}$/,
CARD_EXPIRATION_DATE: /^(0[1-9]|1[0-2])([^0-9])?([0-9]{4}|([0-9]{2}))$/,
ROOM_NAME: /^#[a-z0-9à-ÿ-]{1,80}$/,
ROOM_NAME: /^#[\p{Ll}0-9-]{1,80}$/u,

// eslint-disable-next-line max-len, no-misleading-character-class
EMOJIS: /[\p{Extended_Pictographic}](\u200D[\p{Extended_Pictographic}]|[\u{1F3FB}-\u{1F3FF}]|[\u{E0020}-\u{E007F}]|\uFE0F|\u20E3)*|[\u{1F1E6}-\u{1F1FF}]{2}|[#*0-9]\uFE0F?\u20E3/gu,
Expand Down
1 change: 1 addition & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ const ONYXKEYS = {
PRIVATE_NOTES_FORM: 'privateNotesForm',
I_KNOW_A_TEACHER_FORM: 'iKnowTeacherForm',
INTRO_SCHOOL_PRINCIPAL_FORM: 'introSchoolPrincipalForm',
REPORT_VIRTUAL_CARD_FRAUD: 'reportVirtualCardFraudForm',
},
} as const;

Expand Down
4 changes: 4 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ export default {
route: '/settings/wallet/card/:domain',
getRoute: (domain: string) => `/settings/wallet/card/${domain}`,
},
SETTINGS_REPORT_FRAUD: {
route: '/settings/wallet/cards/:domain/report-virtual-fraud',
getRoute: (domain: string) => `/settings/wallet/cards/${domain}/report-virtual-fraud`,
},
SETTINGS_ADD_DEBIT_CARD: 'settings/wallet/add-debit-card',
SETTINGS_ADD_BANK_ACCOUNT: 'settings/wallet/add-bank-account',
SETTINGS_ENABLE_PAYMENTS: 'settings/wallet/enable-payments',
Expand Down
6 changes: 4 additions & 2 deletions src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import variables from '../styles/variables';
import * as Session from '../libs/actions/Session';
import Hoverable from './Hoverable';
import useWindowDimensions from '../hooks/useWindowDimensions';
import MenuItemRenderHTMLTitle from './MenuItemRenderHTMLTitle';
import RenderHTML from './RenderHTML';

const propTypes = menuItemPropTypes;

Expand Down Expand Up @@ -252,7 +252,9 @@ const MenuItem = React.forwardRef((props, ref) => {
)}
<View style={[styles.flexRow, styles.alignItemsCenter]}>
{Boolean(props.title) && (Boolean(props.shouldRenderAsHTML) || (Boolean(props.shouldParseTitle) && Boolean(html.length))) && (
<MenuItemRenderHTMLTitle title={getProcessedTitle} />
<View style={styles.renderHTMLTitle}>
<RenderHTML html={getProcessedTitle} />
</View>
)}
{!props.shouldRenderAsHTML && !props.shouldParseTitle && Boolean(props.title) && (
<Text
Expand Down
23 changes: 0 additions & 23 deletions src/components/MenuItemRenderHTMLTitle/index.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/MenuItemRenderHTMLTitle/index.native.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/components/MenuItemRenderHTMLTitle/propTypes.js

This file was deleted.

7 changes: 2 additions & 5 deletions src/components/PopoverWithoutOverlay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import styles from '../../styles/styles';
import * as StyleUtils from '../../styles/StyleUtils';
import getModalStyles from '../../styles/getModalStyles';
import withWindowDimensions from '../withWindowDimensions';
import usePrevious from '../../hooks/usePrevious';

function Popover(props) {
const {onOpen, close} = React.useContext(PopoverContext);
Expand All @@ -25,8 +24,6 @@ function Popover(props) {
props.outerStyle,
);

const prevIsVisible = usePrevious(props.isVisible);

React.useEffect(() => {
if (props.isVisible) {
props.onModalShow();
Expand All @@ -43,7 +40,7 @@ function Popover(props) {
Modal.willAlertModalBecomeVisible(props.isVisible);

// We prevent setting closeModal function to null when the component is invisible the first time it is rendered
if (prevIsVisible === props.isVisible && (!firstRenderRef.current || !props.isVisible)) {
if (!firstRenderRef.current || !props.isVisible) {
firstRenderRef.current = false;
return;
}
Expand All @@ -52,7 +49,7 @@ function Popover(props) {

// We want this effect to run strictly ONLY when isVisible prop changes
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.isVisible, prevIsVisible]);
}, [props.isVisible]);

if (!props.isVisible) {
return null;
Expand Down
1 change: 0 additions & 1 deletion src/components/QRShare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class QRShare extends Component {

{!_.isEmpty(this.props.subtitle) && (
<Text
family="EXP_NEUE_BOLD"
fontSize={variables.fontSizeLabel}
numberOfLines={2}
style={[styles.mt1, styles.textAlignCenter]}
Expand Down
7 changes: 7 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,7 @@ export default {
availableSpend: 'Remaining spending power',
virtualCardNumber: 'Virtual card number',
physicalCardNumber: 'Physical card number',
reportFraud: 'Report virtual card fraud',
cardDetails: {
cardNumber: 'Virtual card number',
expiration: 'Expiration',
Expand All @@ -842,6 +843,12 @@ export default {
copyCardNumber: 'Copy card number',
},
},
reportFraudPage: {
title: 'Report virtual card fraud',
description: 'If your virtual card details have been stolen or compromised, we’ll permanently deactivate your existing card and provide you with a new virtual card and number.',
deactivateCard: 'Deactivate card',
reportVirtualCardFraud: 'Report virtual card fraud',
},
activateCardPage: {
activateCard: 'Activate card',
pleaseEnterLastFour: 'Please enter the last four digits of your card.',
Expand Down
8 changes: 8 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ export default {
availableSpend: 'Capacidad de gasto restante',
virtualCardNumber: 'Número de la tarjeta virtual',
physicalCardNumber: 'Número de la tarjeta física',
reportFraud: 'Reportar fraude con la tarjeta virtual',
cardDetails: {
cardNumber: 'Número de tarjeta virtual',
expiration: 'Expiración',
Expand All @@ -838,6 +839,13 @@ export default {
copyCardNumber: 'Copiar número de la tarjeta',
},
},
reportFraudPage: {
title: 'Reportar fraude con la tarjeta virtual',
description:
'Si los datos de tu tarjeta virtual han sido robados o se han visto comprometidos, desactivaremos permanentemente la tarjeta actual y le proporcionaremos una tarjeta virtual y un número nuevo.',
deactivateCard: 'Desactivar tarjeta',
reportVirtualCardFraud: 'Reportar fraude con la tarjeta virtual',
},
activateCardPage: {
activateCard: 'Activar tarjeta',
pleaseEnterLastFour: 'Introduce los cuatro últimos dígitos de la tarjeta.',
Expand Down
1 change: 1 addition & 0 deletions src/libs/Navigation/AppNavigator/ModalStackNavigators.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ const SettingsModalStackNavigator = createModalStackNavigator({
Settings_Lounge_Access: () => require('../../../pages/settings/Profile/LoungeAccessPage').default,
Settings_Wallet: () => require('../../../pages/settings/Wallet/WalletPage').default,
Settings_Wallet_DomainCards: () => require('../../../pages/settings/Wallet/ExpensifyCardPage').default,
Settings_Wallet_ReportVirtualCardFraud: () => require('../../../pages/settings/Wallet/ReportVirtualCardFraudPage').default,
Settings_Wallet_Card_Activate: () => require('../../../pages/settings/Wallet/ActivatePhysicalCardPage').default,
Settings_Wallet_Transfer_Balance: () => require('../../../pages/settings/Wallet/TransferBalancePage').default,
Settings_Wallet_Choose_Transfer_Account: () => require('../../../pages/settings/Wallet/ChooseTransferAccountPage').default,
Expand Down
4 changes: 4 additions & 0 deletions src/libs/Navigation/linkingConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ export default {
path: ROUTES.SETTINGS_WALLET_DOMAINCARDS.route,
exact: true,
},
Settings_Wallet_ReportVirtualCardFraud: {
path: ROUTES.SETTINGS_REPORT_FRAUD.route,
exact: true,
},
Settings_Wallet_EnablePayments: {
path: ROUTES.SETTINGS_ENABLE_PAYMENTS,
exact: true,
Expand Down
43 changes: 42 additions & 1 deletion src/libs/actions/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,47 @@ import Onyx from 'react-native-onyx';
import ONYXKEYS from '../../ONYXKEYS';
import * as API from '../API';

/**
* @param {Number} cardID
*/
function reportVirtualExpensifyCardFraud(cardID) {
API.write(
'ReportVirtualExpensifyCardFraud',
{
cardID,
},
{
optimisticData: [
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.FORMS.REPORT_VIRTUAL_CARD_FRAUD,
value: {
isLoading: true,
},
},
],
successData: [
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.FORMS.REPORT_VIRTUAL_CARD_FRAUD,
value: {
isLoading: false,
},
},
],
failureData: [
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.FORMS.REPORT_VIRTUAL_CARD_FRAUD,
value: {
isLoading: false,
},
},
],
},
);
}

/**
* Activates the physical Expensify card based on the last four digits of the card number
*
Expand Down Expand Up @@ -60,4 +101,4 @@ function clearCardListErrors(cardID) {
Onyx.merge(ONYXKEYS.CARD_LIST, {[cardID]: {errors: null, isLoading: false}});
}

export {activatePhysicalExpensifyCard, clearCardListErrors};
export {reportVirtualExpensifyCardFraud, activatePhysicalExpensifyCard, clearCardListErrors};
Loading

0 comments on commit 7c886ef

Please sign in to comment.