Context
This is a sub-issue of #53493 (Replace modal screens with modals from @react-navigation).
For full background and migration approach, see the triage analysis comment and the sub-issue breakdown comment.
Problem
ConnectToQuickbooksOnlineFlow and ConnectToXeroFlow are modal-based accounting integration flows that animate in from right-to-left like screens but use react-native-modal. Their platform-specific implementation (WebView on native, external link on web) and OAuth branching make this a complex migration.
Migration approach (Group 4 — Complex)
- Files:
src/components/ConnectToQuickbooksOnlineFlow/
src/components/ConnectToXeroFlow/
- Used by: Both are triggered only via
getAccountingIntegrationData → AccountingContext using an imperative startIntegrationFlow call.
- Complexity:
- Platform-specific: web uses an external link, native uses a
WebView modal.
- Xero has 2FA branching logic.
- QBO disables taxes on mount as a side effect.
- Imperatively triggered via
startIntegrationFlow, decoupled from the component tree.
Suggested migration approach
- Create dedicated navigation pages:
QBOConnectPage and XeroConnectPage.
- Replace the imperative
startIntegrationFlow trigger with a navigate(ROUTES.QBO_CONNECT) / navigate(ROUTES.XERO_CONNECT) call.
- Move the platform-specific WebView/external link logic into the new pages.
- Handle the QBO tax-disabling side effect in a
useEffect in the new page.
- Decouple from
AccountingContext where possible.
- Test the full OAuth connection flow for both QBO and Xero on iOS, Android, and web.
Reference
Issue Owner
Current Issue Owner: @mallenexpensify
Context
This is a sub-issue of #53493 (Replace modal screens with modals from
@react-navigation).For full background and migration approach, see the triage analysis comment and the sub-issue breakdown comment.
Problem
ConnectToQuickbooksOnlineFlowandConnectToXeroFloware modal-based accounting integration flows that animate in from right-to-left like screens but usereact-native-modal. Their platform-specific implementation (WebView on native, external link on web) and OAuth branching make this a complex migration.Migration approach (Group 4 — Complex)
src/components/ConnectToQuickbooksOnlineFlow/src/components/ConnectToXeroFlow/getAccountingIntegrationData→AccountingContextusing an imperativestartIntegrationFlowcall.WebViewmodal.startIntegrationFlow, decoupled from the component tree.Suggested migration approach
QBOConnectPageandXeroConnectPage.startIntegrationFlowtrigger with anavigate(ROUTES.QBO_CONNECT)/navigate(ROUTES.XERO_CONNECT)call.useEffectin the new page.AccountingContextwhere possible.Reference
@react-navigation#53493 (comment)@react-navigation#53493Issue Owner
Current Issue Owner: @mallenexpensify