Skip to content

Commit

Permalink
Pulled changes
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Jun 16, 2021
2 parents 9998549 + 2863305 commit b183a0e
Show file tree
Hide file tree
Showing 73 changed files with 2,577 additions and 693 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/Standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ labels: AutoAssignerTriage
If you haven’t already, check out our [contributing guidelines](https://github.com/Expensify/ReactNativeChat/blob/main/CONTRIBUTING.md) for onboarding and email contributors@expensify.com to request to join our Slack channel!
___

## Action Performed:
Break down in numbered steps

## Expected Result:
Describe what you think should've happened

## Actual Result:
Describe what actually happened

## Action Performed:
Break down in numbered steps

## Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001006803
versionName "1.0.68-3"
versionCode 1001006900
versionName "1.0.69-0"
}
splits {
abi {
Expand Down
1 change: 1 addition & 0 deletions assets/images/workspace-default-avatar.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: 2 additions & 2 deletions ios/ExpensifyCash/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.68</string>
<string>1.0.69</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0.68.3</string>
<string>1.0.69.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/ExpensifyCashTests/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.0.68</string>
<string>1.0.69</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.68.3</string>
<string>1.0.69.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion 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": "expensify.cash",
"version": "1.0.68-3",
"version": "1.0.69-0",
"author": "Expensify, Inc.",
"homepage": "https://expensify.cash",
"description": "Expensify.cash is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
44 changes: 43 additions & 1 deletion src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,41 @@ const CONST = {
IOS: 'https://apps.apple.com/us/app/expensify-cash/id1530278510',
DESKTOP: 'https://expensify.cash/Expensify.cash.dmg',
},
SMS: {
DOMAIN: '@expensify.sms',
},
BANK_ACCOUNT: {
ADD_METHOD: {
STEP: {
// In the order they appear in the VBA flow
BANK_ACCOUNT: 'BankAccountStep',
COMPANY: 'CompanyStep',
REQUESTOR: 'RequestorStep',
ACH_CONTRACT: 'ACHContractStep',
VALIDATION: 'ValidationStep',
ENABLE: 'EnableStep',
},
SUBSTEP: {
MANUAL: 'manual',
},
VERIFICATIONS: {
ERROR_MESSAGE: 'verifications.errorMessage',
EXTERNAL_API_RESPONSES: 'verifications.externalApiResponses',
REQUESTOR_IDENTITY_ID: 'verifications.externalApiResponses.requestorIdentityID',
REQUESTOR_IDENTITY_ONFIDO: 'verifications.externalApiResponses.requestorIdentityOnfido',
THROTTLED: 'verifications.throttled',
},
FIELDS_TYPE: {
LOCAL: 'local',
},
ONFIDO_RESPONSE: {
SDK_TOKEN: 'apiResult.sdkToken',
PASS: 'pass',
},
QUESTIONS: {
QUESTION: 'apiResult.questions.question',
DIFFERENTIATOR_QUESTION: 'apiResult.differentiator-question',
},
SETUP_TYPE: {
MANUAL: 'manual',
PLAID: 'plaid',
},
Expand All @@ -30,6 +63,12 @@ const CONST = {
PRESSED: 'pressed',
COMPLETE: 'complete',
},
COUNTRY: {
US: 'US',
MX: 'MX',
AU: 'AU',
CA: 'CA',
},
PLATFORM: {
IOS: 'ios',
ANDROID: 'android',
Expand Down Expand Up @@ -81,6 +120,7 @@ const CONST = {
MODAL_TYPE: {
CONFIRM: 'confirm',
CENTERED: 'centered',
CENTERED_UNSWIPEABLE: 'centered_unswipeable',
BOTTOM_DOCKED: 'bottom_docked',
POPOVER: 'popover',
RIGHT_DOCKED: 'right_docked',
Expand Down Expand Up @@ -120,6 +160,8 @@ const CONST = {
PAYPAL_ME_ADDRESS: 'expensify_payPalMeAddress',
PRIORITY_MODE: 'priorityMode',
TIMEZONE: 'timeZone',
FREE_PLAN_BANK_ACCOUNT_ID: 'expensify_freePlanBankAccountID',
ACH_DATA_THROTTLED: 'expensify_ACHData_throttled',
},
DEFAULT_TIME_ZONE: {automatic: true, selected: 'America/Los_Angeles'},
DEFAULT_ACCOUNT_DATA: {error: '', success: '', loading: false},
Expand Down
12 changes: 11 additions & 1 deletion src/Expensify.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import lodashGet from 'lodash/get';
import PropTypes from 'prop-types';
import React, {PureComponent} from 'react';
import {View, StatusBar, AppState} from 'react-native';
import {View, AppState} from 'react-native';
import Onyx, {withOnyx} from 'react-native-onyx';

import BootSplash from './libs/BootSplash';
import StatusBar from './libs/StatusBar';
import listenToStorageEvents from './libs/listenToStorageEvents';
import * as ActiveClientManager from './libs/ActiveClientManager';
import ONYXKEYS from './ONYXKEYS';
Expand All @@ -18,6 +19,8 @@ import UpdateAppModal from './components/UpdateAppModal';
import Visibility from './libs/Visibility';
import GrowlNotification from './components/GrowlNotification';
import {growlRef} from './libs/Growl';
import Navigation from './libs/Navigation/Navigation';
import ROUTES from './ROUTES';

// Initialize the store when the app loads for the first time
Onyx.init({
Expand Down Expand Up @@ -54,6 +57,9 @@ const propTypes = {

/** Currently logged in user accountID */
accountID: PropTypes.number,

/** Should app immediately redirect to new workspace route once authenticated */
redirectToWorkspaceNewAfterSignIn: PropTypes.bool,
}),

/** Whether a new update is available and ready to install. */
Expand All @@ -67,6 +73,7 @@ const defaultProps = {
session: {
authToken: null,
accountID: null,
redirectToWorkspaceNewAfterSignIn: false,
},
updateAvailable: false,
initialReportDataLoaded: false,
Expand Down Expand Up @@ -113,6 +120,9 @@ class Expensify extends PureComponent {
const previousAuthToken = lodashGet(prevProps, 'session.authToken', null);
if (this.getAuthToken() && !previousAuthToken) {
BootSplash.show({fade: true});
if (lodashGet(this.props, 'session.redirectToWorkspaceNewAfterSignIn', false)) {
Navigation.navigate(ROUTES.WORKSPACE_NEW);
}
}

if (this.getAuthToken() && this.props.initialReportDataLoaded) {
Expand Down
6 changes: 6 additions & 0 deletions src/ONYXKEYS.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export default {
// What the active route is for our navigator. Global route that determines what views to display.
CURRENT_URL: 'currentURL',

// Stores current date
CURRENT_DATE: 'currentDate',

// Currently viewed reportID
CURRENTLY_VIEWED_REPORTID: 'currentlyViewedReportID',

Expand Down Expand Up @@ -98,4 +101,7 @@ export default {

// Object containing Wallet terms step state
WALLET_TERMS: 'walletTerms',

// Stores information about the active reimbursement account being set up
REIMBURSEMENT_ACCOUNT: 'reimbursementAccount',
};
5 changes: 4 additions & 1 deletion src/ROUTES.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const REPORT = 'r';

export default {
ADD_PERSONAL_BANK_ACCOUNT: 'add-personal-bank-account',
BANK_ACCOUNT_NEW: 'bank-account/new',
ADD_VERIFIED_BANK_ACCOUNT: 'add-verified-bank-account',
HOME: '',
SETTINGS: 'settings',
SETTINGS_PROFILE: 'settings/profile',
Expand Down Expand Up @@ -48,6 +48,9 @@ export default {
VALIDATE_LOGIN: 'v',
VALIDATE_LOGIN_WITH_VALIDATE_CODE: 'v/:accountID/:validateCode',
ENABLE_PAYMENTS: 'enable-payments',
WORKSPACE_NEW: 'workspace/new',
WORKSPACE_INVITE: 'workspace/:policyID/invite',
getWorkspaceInviteRoute: policyID => `workspace/${policyID}/invite`,

/**
* @param {String} route
Expand Down
10 changes: 9 additions & 1 deletion src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {View} from 'react-native';
import Str from 'expensify-common/lib/str';
import {withOnyx} from 'react-native-onyx';
import CONST from '../CONST';
import Modal from './Modal';
Expand Down Expand Up @@ -97,10 +98,17 @@ class AttachmentModal extends PureComponent {
const attachmentViewStyles = this.props.isSmallScreenWidth
? [styles.imageModalImageCenterContainer]
: [styles.imageModalImageCenterContainer, styles.p5];

// If our attachment is a PDF, make the Modal unswipeable
const modalType = (this.state.sourceURL
&& (Str.isPDF(this.state.sourceURL) || (this.state.file
&& Str.isPDF(this.state.file.name || this.props.translate('attachmentView.unknownFilename')))))
? CONST.MODAL.MODAL_TYPE.CENTERED_UNSWIPEABLE
: CONST.MODAL.MODAL_TYPE.CENTERED;
return (
<>
<Modal
type={CONST.MODAL.MODAL_TYPE.CENTERED}
type={modalType}
onSubmit={this.submitAndClose}
onClose={() => this.setState({isModalOpen: false})}
isVisible={this.state.isModalOpen}
Expand Down
2 changes: 1 addition & 1 deletion src/components/AttachmentPicker/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class AttachmentPicker extends Component {
.then(this.pickAttachment)
.catch(console.error)
.finally(() => delete this.onModalHide),
10,
200,
);

this.close();
Expand Down
3 changes: 2 additions & 1 deletion src/components/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import OpacityView from './OpacityView';

const propTypes = {
/** The text for the button label */
text: PropTypes.string.isRequired,
text: PropTypes.string,

/** Indicates whether the button should be disabled and in the loading state */
isLoading: PropTypes.bool,
Expand Down Expand Up @@ -44,6 +44,7 @@ const propTypes = {
};

const defaultProps = {
text: '',
isLoading: false,
isDisabled: false,
onPress: () => {},
Expand Down
27 changes: 27 additions & 0 deletions src/components/FixedFooter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import styles from '../styles/styles';

const propTypes = {
/** Children to wrap in FixedFooter. */
children: PropTypes.node.isRequired,

/** Styles to be assigned to Container */
style: PropTypes.arrayOf(PropTypes.object),
};

const defaultProps = {
style: [],
};

const FixedFooter = props => (
<View style={[styles.ph5, styles.pb5, ...props.style]}>
{props.children}
</View>
);

FixedFooter.propTypes = propTypes;
FixedFooter.defaultProps = defaultProps;
FixedFooter.displayName = 'FixedFooter';
export default FixedFooter;
27 changes: 13 additions & 14 deletions src/components/IOUConfirmationList.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import {TextInput} from 'react-native-gesture-handler';
import {ScrollView, TextInput} from 'react-native-gesture-handler';
import {withOnyx} from 'react-native-onyx';
import {withSafeAreaInsets} from 'react-native-safe-area-context';
import styles from '../styles/styles';
Expand All @@ -18,6 +18,7 @@ import withLocalize, {withLocalizePropTypes} from './withLocalize';
import SafeAreaInsetPropTypes from '../pages/SafeAreaInsetPropTypes';
import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions';
import compose from '../libs/compose';
import FixedFooter from './FixedFooter';

const propTypes = {
/** Callback to inform parent modal of success */
Expand Down Expand Up @@ -241,8 +242,8 @@ class IOUConfirmationList extends Component {
},
);
return (
<View style={[styles.flex1, styles.w100, styles.justifyContentBetween]}>
<View style={[styles.flex1]}>
<>
<ScrollView style={[styles.flex1, styles.w100]}>
<OptionsList
listContainerStyles={[{
// Give max height to the list container so that it does not extend
Expand All @@ -259,12 +260,10 @@ class IOUConfirmationList extends Component {
disableFocusOptions
selectedOptions={this.getAllOptionsAsSelected()}
/>
<View>
<Text style={[styles.p5, styles.textMicroBold, styles.colorHeading]}>
{this.props.translate('iOUConfirmationList.whatsItFor')}
</Text>
</View>
<View style={[styles.ph5]}>
<Text style={[styles.p5, styles.textMicroBold, styles.colorHeading]}>
{this.props.translate('iOUConfirmationList.whatsItFor')}
</Text>
<View style={[styles.ph5, styles.pb5]}>
<TextInput
style={[styles.textInput]}
value={this.props.comment}
Expand All @@ -273,17 +272,17 @@ class IOUConfirmationList extends Component {
placeholderTextColor={themeColors.placeholderText}
/>
</View>
</View>
<View style={[styles.ph5, styles.pb3]}>
</ScrollView>
<FixedFooter>
<Button
success
style={[styles.mb2]}
style={[styles.w100]}
isLoading={this.props.iou.loading}
text={buttonText}
onPress={() => this.props.onConfirm(this.getSplits())}
/>
</View>
</View>
</FixedFooter>
</>
);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Modal/BaseModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class BaseModal extends PureComponent {
}
this.props.onModalShow();
}}
propagateSwipe={this.props.propagateSwipe}
onModalHide={this.hideModalAndRemoveEventListeners}
onSwipeComplete={this.props.onClose}
swipeDirection={swipeDirection}
Expand Down
Loading

0 comments on commit b183a0e

Please sign in to comment.