From 54c4ef81ab7bd0c27b0a55894e7d1219501e5a44 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Tue, 13 Dec 2022 16:43:31 -1000 Subject: [PATCH 01/14] Fix initial screens --- src/components/ScreenWrapper/index.js | 1 + src/pages/NewChatPage.js | 4 +- src/pages/SearchPage.js | 4 +- src/pages/settings/AboutPage/AboutPage.js | 4 +- src/pages/settings/InitialSettingsPage.js | 4 +- src/pages/settings/PreferencesPage.js | 4 +- src/pages/settings/Profile/ProfilePage.js | 206 +++++++++--------- .../settings/Security/CloseAccountPage.js | 98 +++++---- src/pages/workspace/WorkspaceInitialPage.js | 4 +- src/pages/workspace/WorkspaceMembersPage.js | 5 +- 10 files changed, 181 insertions(+), 153 deletions(-) diff --git a/src/components/ScreenWrapper/index.js b/src/components/ScreenWrapper/index.js index 52d9aa5e6b62..dacd915a0cb0 100644 --- a/src/components/ScreenWrapper/index.js +++ b/src/components/ScreenWrapper/index.js @@ -95,6 +95,7 @@ class ScreenWrapper extends React.Component { _.isFunction(this.props.children) ? this.props.children({ insets, + paddingBottom, didScreenTransitionEnd: this.state.didScreenTransitionEnd, }) : this.props.children diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index dbbf8edf21f4..e5a1f7f4be18 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -235,7 +235,9 @@ class NewChatPage extends Component { maxParticipantsReached, ); return ( - + {({didScreenTransitionEnd}) => ( <> + {({didScreenTransitionEnd}) => ( <> { ]; return ( - + + Navigation.dismissModal(true)} diff --git a/src/pages/settings/PreferencesPage.js b/src/pages/settings/PreferencesPage.js index e3d10d6fb4b1..4f7f1661b41a 100755 --- a/src/pages/settings/PreferencesPage.js +++ b/src/pages/settings/PreferencesPage.js @@ -57,7 +57,9 @@ const PreferencesPage = (props) => { }; return ( - + - Navigation.navigate(ROUTES.SETTINGS)} - onCloseButtonPress={() => Navigation.dismissModal(true)} - /> -
- - + {({paddingBottom}) => ( + <> + Navigation.navigate(ROUTES.SETTINGS)} + onCloseButtonPress={() => Navigation.dismissModal(true)} /> - - - {this.props.translate('profilePage.tellUsAboutYourself')} - - - - - + + + + + {this.props.translate('profilePage.tellUsAboutYourself')} + + + + + + + + + + + + + {this.state.hasSelfSelectedPronouns && ( + + + + )} + + - - - - - - - - {this.state.hasSelfSelectedPronouns && ( - - + this.setState({selectedTimezone})} /> - )} - - - - - this.setState({selectedTimezone})} - /> - - - + + + + )}
); } diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 99f295726cec..00071846dfe3 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -60,53 +60,59 @@ class CloseAccountPage extends Component { render() { const userEmailOrPhone = Str.removeSMSDomain(this.props.session.email); return ( - - Navigation.navigate(ROUTES.SETTINGS_SECURITY)} - onCloseButtonPress={() => Navigation.dismissModal(true)} - /> -
- - {this.props.translate('closeAccountPage.reasonForLeavingPrompt')} - + {({paddingBottom}) => ( + <> + Navigation.navigate(ROUTES.SETTINGS_SECURITY)} + onCloseButtonPress={() => Navigation.dismissModal(true)} /> - - - {this.props.translate('closeAccountPage.closeAccountWarning')} - - {' '} - {this.props.translate('closeAccountPage.closeAccountPermanentlyDeleteData')} - - - - {this.props.translate('closeAccountPage.defaultContact')} - - {' '} - {userEmailOrPhone} - - - -
+
+ + {this.props.translate('closeAccountPage.reasonForLeavingPrompt')} + + + + {this.props.translate('closeAccountPage.closeAccountWarning')} + + {' '} + {this.props.translate('closeAccountPage.closeAccountPermanentlyDeleteData')} + + + + {this.props.translate('closeAccountPage.defaultContact')} + + {' '} + {userEmailOrPhone} + + + +
+ + )}
); } diff --git a/src/pages/workspace/WorkspaceInitialPage.js b/src/pages/workspace/WorkspaceInitialPage.js index 241d275ccf7d..d70dfcc2810e 100644 --- a/src/pages/workspace/WorkspaceInitialPage.js +++ b/src/pages/workspace/WorkspaceInitialPage.js @@ -147,7 +147,9 @@ class WorkspaceInitialPage extends React.Component { ]; return ( - + Navigation.navigate(ROUTES.SETTINGS_WORKSPACES)} diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 92ac6559f895..066f58ef0f3a 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -317,7 +317,10 @@ class WorkspaceMembersPage extends React.Component { const policyName = lodashGet(this.props.policy, 'name'); return ( - + Navigation.navigate(ROUTES.SETTINGS_WORKSPACES)} From 6c1b9ece5031f6b0be050765d3c5ea26dad1bd2a Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 14 Dec 2022 11:28:10 -1000 Subject: [PATCH 02/14] Fix IOU screens --- .../BankAccountManualStep.js | 2 +- .../BankAccountPlaidStep.js | 2 +- .../ReimbursementAccount/BankAccountStep.js | 4 +- src/pages/ReimbursementAccount/CompanyStep.js | 2 +- .../ReimbursementAccountPage.js | 53 ++++--- .../ReimbursementAccount/RequestorStep.js | 2 +- src/pages/RequestCallConfirmationScreen.js | 2 +- src/pages/RequestCallPage.js | 148 +++++++++--------- src/pages/iou/IOUModal.js | 11 +- .../IOUParticipantsPage.js | 1 + .../IOUParticipantsSplit.js | 2 +- .../workspace/WorkspacePageWithSections.js | 64 ++++---- src/pages/workspace/WorkspaceSettingsPage.js | 5 +- 13 files changed, 160 insertions(+), 138 deletions(-) diff --git a/src/pages/ReimbursementAccount/BankAccountManualStep.js b/src/pages/ReimbursementAccount/BankAccountManualStep.js index 25e767d24800..143693758ec3 100644 --- a/src/pages/ReimbursementAccount/BankAccountManualStep.js +++ b/src/pages/ReimbursementAccount/BankAccountManualStep.js @@ -88,7 +88,7 @@ class BankAccountManualStep extends React.Component { onSubmit={this.submit} validate={this.validate} submitButtonText={this.props.translate('common.saveAndContinue')} - style={[styles.mh5, styles.flexGrow1]} + style={[styles.mh5, styles.flexGrow1, {paddingBottom: this.props.paddingBottom}]} > {this.props.translate('bankAccount.checkHelpLine')} diff --git a/src/pages/ReimbursementAccount/BankAccountPlaidStep.js b/src/pages/ReimbursementAccount/BankAccountPlaidStep.js index 1142cfde7efd..93b65b2414f4 100644 --- a/src/pages/ReimbursementAccount/BankAccountPlaidStep.js +++ b/src/pages/ReimbursementAccount/BankAccountPlaidStep.js @@ -80,7 +80,7 @@ class BankAccountPlaidStep extends React.Component { validate={() => ({})} onSubmit={this.submit} submitButtonText={this.props.translate('common.saveAndContinue')} - style={[styles.mh5, styles.flexGrow1]} + style={[styles.mh5, styles.flexGrow1, {paddingBottom: this.props.paddingBottom}]} isSubmitButtonVisible={Boolean(selectedPlaidAccountID)} > { const bankAccountRoute = `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.BANK_ACCOUNT}`; if (subStep === CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL) { - return ; + return ; } if (subStep === CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID) { - return ; + return ; } return ( diff --git a/src/pages/ReimbursementAccount/CompanyStep.js b/src/pages/ReimbursementAccount/CompanyStep.js index 10c2c6fdc021..239e5f8e93f2 100644 --- a/src/pages/ReimbursementAccount/CompanyStep.js +++ b/src/pages/ReimbursementAccount/CompanyStep.js @@ -152,7 +152,7 @@ class CompanyStep extends React.Component { validate={this.validate} onSubmit={this.submit} submitButtonText={this.props.translate('common.saveAndContinue')} - style={[styles.ph5, styles.flexGrow1]} + style={[styles.ph5, styles.flexGrow1, {paddingBottom: this.props.paddingBottom}]} > {this.props.translate('companyStep.subtitle')} - {currentStep === CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT && ( - (hasInProgressVBBA ? this.setState({shouldShowContinueSetupButton: true}) : BankAccounts.setBankAccountSubStep(null))} - /> - )} - {currentStep === CONST.BANK_ACCOUNT.STEP.COMPANY && ( - - )} - {currentStep === CONST.BANK_ACCOUNT.STEP.REQUESTOR && ( - - )} - {currentStep === CONST.BANK_ACCOUNT.STEP.ACH_CONTRACT && ( - - )} - {currentStep === CONST.BANK_ACCOUNT.STEP.VALIDATION && ( - - )} - {currentStep === CONST.BANK_ACCOUNT.STEP.ENABLE && ( - + + {({paddingBottom}) => ( + <> + {currentStep === CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT && ( + (hasInProgressVBBA ? this.setState({shouldShowContinueSetupButton: true}) : BankAccounts.setBankAccountSubStep(null))} + paddingBottom={paddingBottom} + /> + )} + {currentStep === CONST.BANK_ACCOUNT.STEP.COMPANY && ( + + )} + {currentStep === CONST.BANK_ACCOUNT.STEP.REQUESTOR && ( + + )} + {currentStep === CONST.BANK_ACCOUNT.STEP.ACH_CONTRACT && ( + + )} + {currentStep === CONST.BANK_ACCOUNT.STEP.VALIDATION && ( + + )} + {currentStep === CONST.BANK_ACCOUNT.STEP.ENABLE && ( + + )} + + )} - ); } diff --git a/src/pages/ReimbursementAccount/RequestorStep.js b/src/pages/ReimbursementAccount/RequestorStep.js index 474ed78b4281..f3542687901f 100644 --- a/src/pages/ReimbursementAccount/RequestorStep.js +++ b/src/pages/ReimbursementAccount/RequestorStep.js @@ -162,7 +162,7 @@ class RequestorStep extends React.Component { submitButtonText={this.props.translate('common.saveAndContinue')} validate={this.validate} onSubmit={this.submit} - style={[styles.mh5, styles.flexGrow1]} + style={[styles.mh5, styles.flexGrow1, {paddingBottom: this.props.paddingBottom}]} > {this.props.translate('requestorStep.subtitle')} diff --git a/src/pages/RequestCallConfirmationScreen.js b/src/pages/RequestCallConfirmationScreen.js index 22c1d3eeb2c6..a723119a2327 100644 --- a/src/pages/RequestCallConfirmationScreen.js +++ b/src/pages/RequestCallConfirmationScreen.js @@ -36,7 +36,7 @@ const RequestCallConfirmationScreen = props => (