Skip to content

Commit

Permalink
Merge branch 'main' into fix/26694-ignore-selection
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Sep 16, 2023
2 parents 58918c0 + 76c1559 commit 113546a
Show file tree
Hide file tree
Showing 140 changed files with 2,394 additions and 1,266 deletions.
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.greenHighlightBackground,
colorPrimary: colors.greenDefaultButton,
appBg: colors.darkHighlightBackground,
colorPrimary: colors.darkDefaultButton,
colorSecondary: colors.green,
appContentBg: colors.greenAppBackground,
textColor: colors.white,
barTextColor: colors.white,
appContentBg: colors.darkAppBackground,
textColor: colors.darkPrimaryText,
barTextColor: colors.darkPrimaryText,
barSelectedColor: colors.green,
barBg: colors.greenAppBackground,
appBorderColor: colors.greenBorders,
inputBg: colors.greenHighlightBackground,
inputBorder: colors.greenBorders,
barBg: colors.darkAppBackground,
appBorderColor: colors.darkBorders,
inputBg: colors.darkHighlightBackground,
inputBorder: colors.darkBorders,
appBorderRadius: 8,
inputBorderRadius: 8,
});
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 1001036901
versionName "1.3.69-1"
versionCode 1001037005
versionName "1.3.70-5"
}

flavorDimensions "default"
Expand Down
19 changes: 12 additions & 7 deletions docs/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,6 @@ window.addEventListener('DOMContentLoaded', () => {

// If there is a fixed article scroll container, set to calculate titles' offset
scrollContainer: 'content-area',

// onclick function to apply to all links in toc. will be called with
// the event as the first parameter, and this can be used to stop,
// propagation, prevent default or perform action
onClick() {
toggleHeaderMenu();
},
});
}

Expand All @@ -226,6 +219,18 @@ window.addEventListener('DOMContentLoaded', () => {

const articleContent = document.getElementById('article-content');
const lhnContent = document.getElementById('lhn-content');

// This event listener checks if a link clicked in the LHN points to some section of the same page and toggles
// the LHN menu in responsive view.
lhnContent.addEventListener('click', (event) => {
const clickedLink = event.target;
if (clickedLink) {
const href = clickedLink.getAttribute('href');
if (href && href.startsWith('#') && !!document.getElementById(href.slice(1))) {
toggleHeaderMenu();
}
}
});
lhnContent.addEventListener('wheel', (e) => {
const scrollTop = lhnContent.scrollTop;
const isScrollingPastLHNTop = e.deltaY < 0 && scrollTop === 0;
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.69</string>
<string>1.3.70</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.69.1</string>
<string>1.3.70.5</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.69</string>
<string>1.3.70</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.69.1</string>
<string>1.3.70.5</string>
</dict>
</plist>
29 changes: 9 additions & 20 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.3.69-1",
"version": "1.3.70-5",
"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 Expand Up @@ -107,7 +107,7 @@
"patch-package": "^8.0.0",
"process": "^0.11.10",
"prop-types": "^15.7.2",
"pusher-js": "7.4.0",
"pusher-js": "8.3.0",
"react": "18.2.0",
"react-collapse": "^5.1.0",
"react-content-loader": "^6.1.0",
Expand Down
8 changes: 6 additions & 2 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ const CONST = {
},
type: KEYBOARD_SHORTCUT_NAVIGATION_TYPE,
},
NEW_GROUP: {
descriptionKey: 'newGroup',
NEW_CHAT: {
descriptionKey: 'newChat',
shortcutKey: 'K',
modifiers: ['CTRL', 'SHIFT'],
trigger: {
Expand Down Expand Up @@ -1342,6 +1342,7 @@ const CONST = {
SETTINGS: 'settings',
LEAVE_ROOM: 'leaveRoom',
WELCOME_MESSAGE: 'welcomeMessage',
PRIVATE_NOTES: 'privateNotes',
},
EDIT_REQUEST_FIELD: {
AMOUNT: 'amount',
Expand Down Expand Up @@ -2624,6 +2625,9 @@ const CONST = {
DISABLED: 'DISABLED',
},
TAB: {
NEW_CHAT_TAB_ID: 'NewChatTab',
NEW_CHAT: 'chat',
NEW_ROOM: 'room',
RECEIPT_TAB_ID: 'ReceiptTab',
MANUAL: 'manual',
SCAN: 'scan',
Expand Down
1 change: 1 addition & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ const ONYXKEYS = {
SETTINGS_STATUS_SET_FORM: 'settingsStatusSetForm',
SETTINGS_STATUS_CLEAR_AFTER_FORM: 'settingsStatusClearAfterForm',
SETTINGS_STATUS_SET_CLEAR_AFTER_FORM: 'settingsStatusSetClearAfterForm',
PRIVATE_NOTES_FORM: 'privateNotesForm',
I_KNOW_A_TEACHER_FORM: 'iKnowTeacherForm',
INTRO_SCHOOL_PRINCIPAL_FORM: 'introSchoolPrincipalForm',
},
Expand Down
17 changes: 13 additions & 4 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ type ParseReportRouteParams = {

const REPORT = 'r';
const IOU_REQUEST = 'request/new';
const IOU_BILL = 'split/new';
const IOU_SEND = 'send/new';
const NEW_TASK = 'new/task';
const SETTINGS_PERSONAL_DETAILS = 'settings/profile/personal-details';
Expand Down Expand Up @@ -67,11 +66,12 @@ export default {
SETTINGS_2FA: 'settings/security/two-factor-auth',
SETTINGS_STATUS,
SETTINGS_STATUS_SET,
NEW_GROUP: 'new/group',
NEW: 'new',
NEW_CHAT: 'new/chat',
NEW_ROOM: 'new/room',
NEW_TASK,
REPORT,
REPORT_WITH_ID: 'r/:reportID/:reportActionID?',
REPORT_WITH_ID: 'r/:reportID?/:reportActionID?',
EDIT_REQUEST: 'r/:threadReportID/edit/:field',
getEditRequestRoute: (threadReportID: string, field: ValueOf<typeof CONST.EDIT_REQUEST_FIELD>) => `r/${threadReportID}/edit/${field}`,
EDIT_CURRENCY_REQUEST: 'r/:threadReportID/edit/currency',
Expand All @@ -86,7 +86,6 @@ export default {
CONCIERGE: 'concierge',

IOU_REQUEST,
IOU_BILL,
IOU_SEND,

// To see the available iouType, please refer to CONST.IOU.MONEY_REQUEST_TYPE
Expand All @@ -104,6 +103,7 @@ export default {
MONEY_REQUEST_SCAN_TAB: ':iouType/new/:reportID?/scan',
MONEY_REQUEST_DISTANCE_TAB: ':iouType/new/:reportID?/distance',
MONEY_REQUEST_WAYPOINT: ':iouType/new/waypoint/:waypointIndex',
MONEY_REQUEST_ADDRESS: ':iouType/new/address/:reportID?',
IOU_SEND_ADD_BANK_ACCOUNT: `${IOU_SEND}/add-bank-account`,
IOU_SEND_ADD_DEBIT_CARD: `${IOU_SEND}/add-debit-card`,
IOU_SEND_ENABLE_PAYMENTS: `${IOU_SEND}/enable-payments`,
Expand All @@ -118,6 +118,7 @@ export default {
getMoneyRequestMerchantRoute: (iouType: string, reportID = '') => `${iouType}/new/merchant/${reportID}`,
getMoneyRequestDistanceTabRoute: (iouType: string, reportID = '') => `${iouType}/new/${reportID}/distance`,
getMoneyRequestWaypointRoute: (iouType: string, waypointIndex: number) => `${iouType}/new/waypoint/${waypointIndex}`,
getMoneyRequestAddressRoute: (iouType: string, reportID = '') => `${iouType}/new/address/${reportID}`,
getMoneyRequestTagRoute: (iouType: string, reportID = '') => `${iouType}/new/tag/${reportID}`,
SPLIT_BILL_DETAILS: `r/:reportID/split/:reportActionID`,
getSplitBillDetailsRoute: (reportID: string, reportActionID: string) => `r/${reportID}/split/${reportActionID}`,
Expand Down Expand Up @@ -172,6 +173,14 @@ export default {
GOOGLE_SIGN_IN: 'sign-in-with-google',
DESKTOP_SIGN_IN_REDIRECT: 'desktop-signin-redirect',

// Routes related to private notes added to the report
PRIVATE_NOTES_VIEW: 'r/:reportID/notes/:accountID',
getPrivateNotesViewRoute: (reportID: string, accountID: string | number) => `r/${reportID}/notes/${accountID}`,
PRIVATE_NOTES_LIST: 'r/:reportID/notes',
getPrivateNotesListRoute: (reportID: string) => `r/${reportID}/notes`,
PRIVATE_NOTES_EDIT: 'r/:reportID/notes/:accountID/edit',
getPrivateNotesEditRoute: (reportID: string, accountID: string | number) => `r/${reportID}/notes/${accountID}/edit`,

// This is a special validation URL that will take the user to /workspace/new after validation. This is used
// when linking users from e.com in order to share a session in this app.
ENABLE_PAYMENTS: 'enable-payments',
Expand Down
22 changes: 20 additions & 2 deletions src/components/AddPlaidBankAccount.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import _ from 'underscore';
import React, {useEffect, useRef, useCallback} from 'react';
import React, {useEffect, useRef, useCallback, useMemo} from 'react';
import {ActivityIndicator, View} from 'react-native';
import {useIsFocused} from '@react-navigation/native';
import PropTypes from 'prop-types';
import {withOnyx} from 'react-native-onyx';
import lodashGet from 'lodash/get';
Expand Down Expand Up @@ -38,6 +39,9 @@ const propTypes = {
/** Fired when the user exits the Plaid flow */
onExitPlaid: PropTypes.func,

/** Fired when the screen is blurred */
onBlurPlaid: PropTypes.func,

/** Fired when the user selects an account */
onSelect: PropTypes.func,

Expand All @@ -61,6 +65,7 @@ const defaultProps = {
selectedPlaidAccountID: '',
plaidLinkToken: '',
onExitPlaid: () => {},
onBlurPlaid: () => {},
onSelect: () => {},
text: '',
receivedRedirectURI: null,
Expand All @@ -75,6 +80,7 @@ function AddPlaidBankAccount({
selectedPlaidAccountID,
plaidLinkToken,
onExitPlaid,
onBlurPlaid,
onSelect,
text,
receivedRedirectURI,
Expand All @@ -88,6 +94,7 @@ function AddPlaidBankAccount({

const {translate} = useLocalize();
const {isOffline} = useNetwork();
const isFocused = useIsFocused();

/**
* @returns {String}
Expand All @@ -102,6 +109,11 @@ function AddPlaidBankAccount({
}
};

/**
* @returns {Array}
*/
const plaidBankAccounts = useMemo(() => lodashGet(plaidData, 'bankAccounts') || [], [plaidData]);

/**
* @returns {Boolean}
* I'm using useCallback so the useEffect which uses this function doesn't run on every render.
Expand Down Expand Up @@ -151,6 +163,13 @@ function AddPlaidBankAccount({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

useEffect(() => {
if (isFocused || plaidBankAccounts.length) {
return;
}
onBlurPlaid();
}, [isFocused, onBlurPlaid, plaidBankAccounts.length]);

useEffect(() => {
// If we are coming back from offline and we haven't authenticated with Plaid yet, we need to re-run our call to kick off Plaid
// previousNetworkState.current also makes sure that this doesn't run on the first render.
Expand All @@ -160,7 +179,6 @@ function AddPlaidBankAccount({
previousNetworkState.current = isOffline;
}, [allowDebit, bankAccountID, isAuthenticatedWithPlaid, isOffline]);

const plaidBankAccounts = lodashGet(plaidData, 'bankAccounts') || [];
const token = getPlaidLinkToken();
const options = _.map(plaidBankAccounts, (account) => ({
value: account.plaidAccountID,
Expand Down
3 changes: 2 additions & 1 deletion src/components/AnimatedStep/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import * as Animatable from 'react-native-animatable';
import CONST from '../../CONST';
import styles from '../../styles/styles';
import useNativeDriver from '../../libs/useNativeDriver';

const propTypes = {
/** Children to wrap in AnimatedStep. */
Expand Down Expand Up @@ -47,7 +48,7 @@ function AnimatedStep(props) {
}}
duration={CONST.ANIMATED_TRANSITION}
animation={getAnimationStyle(props.direction)}
useNativeDriver
useNativeDriver={useNativeDriver}
style={props.style}
>
{props.children}
Expand Down
3 changes: 2 additions & 1 deletion src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import HeaderGap from './HeaderGap';
import SafeAreaConsumer from './SafeAreaConsumer';
import addEncryptedAuthTokenToURL from '../libs/addEncryptedAuthTokenToURL';
import reportPropTypes from '../pages/reportPropTypes';
import useNativeDriver from '../libs/useNativeDriver';

/**
* Modal render prop component that exposes modal launching triggers that can be used
Expand Down Expand Up @@ -294,7 +295,7 @@ function AttachmentModal(props) {
Animated.timing(confirmButtonFadeAnimation, {
toValue,
duration: 100,
useNativeDriver: true,
useNativeDriver,
}).start();
},
[confirmButtonFadeAnimation],
Expand Down
Loading

0 comments on commit 113546a

Please sign in to comment.