Repository navigation
Description
P/S Slack thread: expensify.slack.com/archives/C01GTK53T8Q/p1733938583809829
Problem
As discussed in this issue and this Slack thread we should replace modal screens (navigation screens/routes, that only render a modal) and modals that stay open when the containing screen gets unmounted.
The current modals use react-native-modal which uses RN internal Modal under the hood. Using these modals with @react-navigation/native-stack poses issues with animations and navigation, as these modals cannot animate in/out, due to the screen mounting/unmounting at the same time. Additionally, the animations will not look the same as the rest of the screen animations, which doesn't look very nice.
Solution
Replace the following types of modals with modal (screens) from @react-navigation
- screens/routes that only render a modal
- modals on screens, that are navigated back from while the modal is still open or animating out at the same time
cc @mountiny
List of components and screens to migrate to @react-navigation modal screens
Tracking my progress on an exhaustive list of components and screens that can/should be migrated to modal screens.
The list of components/screens (and other files) are triaged/prioritized as follows:
(File names are listed without file ending, usually .tsx)
-
🔴 HIGH: Should definitely be migrated, due to current issues with animations and navigation.
These modals are already causing issues with animations, because
- they are animating in while a new screen is still mounting
- they are still open/displayed while the old screen unmounting
causing no or cut off animations.
-
🟡 MEDIUM: Not causing any issues at the moment, but still worth to migrate to modal screens since the behave "like a screen", to achieve consistent animations and generally improve navigation. (gestures, native feel)
This includes modals that are either
- animated in from right-to-left (like a screen) or
- that are part of another screen with
animation: none, - etc.
-
🟢 LOW: These screens are animated in from bottom-to-top like actual modals and are never (un-)mounted while at the same time as the screen. Migrating these modals to modal screens (and extra navigation routes) would make animations more consistent with the other screens, but it is not necessary and might not be worth the effort.
Using a custom modal implementation or something like
gorhom/react-native-bottom-sheetprobably makes more sense.
Base components to (potentially) re-write
BaseModal
- Affected modals:
TransactionStartDateSelectorModalPaymentCardCurrencyModalAmountSelectorModalAttachmentModalAvatarCropModalCategorySelectorModalConfirmModalCountrySelectorModalYearPickerModalDecisionModalFeatureTrainingModalPushRowModalRequireTwoFactorAuthenticationModalSearchRouterModalStateSelectorModalTestToolsModalTextSelectorModalValueSelectorModalBusinessTypeSelectorModalNetSuiteCustomListSelectorModalExpenseLimitTypeSelectorModalTransactionStartDateSelectorModalUnitSelectorModalWorkspaceMemberDetailsRoleSelectionModalInitialListValueSelectorModalTypeSelectorModal
- Pages:
EditReportFieldDateSetDatePageDateOfBirthPageSearchSelectedNarrow
- Components:
SearchDateFilterBaseDateOfBirthStepDebugDetailsDateTimePickerPageAdditionalDetailsStepIncorporationDateBusinessIOURequestStepDate
Popover (uses Modal)
- Comment: Uses
Modalunder the hood - Components:
EmojiPickerPopoverMenuPopoverWithMeasuredContentPopoverReportActionContextMenuBasePopoverReactionListProcessMoneyReportHoldMenuWorkspaceCardsListLabelAccountSwitcherAddPaymentMethodMenuAvatarWithImagePickerAttachmentPickerWithMenu
Triaging
Modals only visible on native platforms (Android & iOS) are marked with 📱.
🔴 HIGH: Modals causing issues at the moment
Modals animating in from the bottom are marked with ⬆️, modals animating in from the right with ⬅️
AttachmentModal ⬅️ (screen recordings attached)
-
Comment: Add one or many extra routes?
-
Components:
AvatarWithImagePickerReportAvatarTransactionReceiptPageReportActionComposeReportAttachmentsProfileAvatarWorkspaceAvatar
-
iOS: Animating in not working, because the modal is animating at the same time, as a new screen with
animation: noneis mounting.Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-01-05.at.14.21.11.mp4
-
Android: Animation out is not working, probably due to the screen unmounting before the modal can animate out
Screen.Recording.2025-01-05.at.14.20.52.mov
ConfirmModal ⬆️ (screen recordings attached)
-
Comment: Not all
ConfirmModals are causing issues -
Screens, where we navigate back while also animating the modal out:
TagSettingsPage(Remove tag)WorkspaceEditTaxPage(Remove tax)CategorySettingsPage(Remove category)PolicyDistanceRateDetailsPage(Remove distance rate)
-
iOS: Modal not able to animate out, because the screen that wraps the modal is already unmounting:
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-01-05.at.14.24.29.mp4
-
Android: Same issue, though less obvious:
Screen.Recording.2025-01-05.at.14.24.47.mov
🟡 MEDIUM: Screen-like modals - Animating in from right-to-left
SearchRouterModal
- Pages:
AuthScreens
AmountSelectorModal -> AmountPicker
- Pages:
FormWorkspaceCreateTaxPage
AvatarCropModal -> AvatarWithImagePicker
- Pages:
NewChatConfirmPageReportDetailsPageProfilePageWorkspaceProfilePage
CategorySelectorModal
- Pages:
WorkspaceCategoriesSettingsPage
- Components:
CategorySelector- Pages:
PolicyDistanceRatesSettingsPageWorkspacePerDiemSettingsPage(unused?)
- Pages:
YearPickerModal -> CalendarPicker -> DatePicker
- Comment: Didn't test all flows
- Pages:
SearchDateFilterBaseDateOfBirthStepDebugDetailsDateTimePickerPageEditReportFieldDateAdditionalDetailsStepIncorporationDateBusinessIOURequestStepDateSetDatePageDateOfBirthPage
- Components:
TransactionStartDateSelectorModal
TextSelectorModal -> TextPicker
- Pages:
CreateReportFieldsPageWorkspaceCreateTaxPage
- Components:
Form
ValidateCodeActionModal
- Pages:
MissingPersonalDetailsContent(multiple occurrences)BankAccountStepContactMethodDetailsPage(multiple occurrences)NewContactMethodPageDelegateMagicCodeModalCodesStepBaseGetPhysicalCardExpensifyCardPageReportCardLostPageReportVirtualCardFraudPageVerifyAccountPageConfirmationStep
ValueSelectorModal -> ValuePicker
- Pages:
WorkspaceNewRoomPage
- Components:
Form(multiple occurrences)
FeatureTrainingModal
- Pages:
TrackTrainingPage
- Components:
ExplanationModalMigratedUserWelcomeModalOnboardingWelcomeVideo
PaymentCardCurrencyModal
ConnectToQuickbooksOnlineFlow 📱
ConnectToXeroFlow 📱
CardAuthenticationModal
- Pages:
PaymentCardWorkspaceOwnerChangeWrapperPage
NetSuiteCustomListSelectorModal -> NetSuiteCustomListPicker
- Pages:
ChooseCustomListStep
ExpenseLimitTypeSelectorModal -> ExpenseLimitTypeSelector
- Pages:
CategoryFlagAmountsOverPage
TransactionStartDateSelectorModal
- Components:
TransactionStartDateStep
UnitSelectorModal -> UnitSelector
- Pages:
PolicyDistanceRatesSettingsPage
WorkspaceMemberDetailsRoleSelectionModal
- Pages:
WorkspaceMemberDetailsPage(multiple occurrences)
InitialListValueSelectorModal -> InitialListValueSelector
- Pages:
CreateReportFieldsPage
TypeSelectorModal -> TypeSelector
- Pages:
CreateReportFieldsPage
🟢 LOW: Contained modals - Only visible as part of the current screen, animating in from bottom-to-top
ConfirmModal
- Comment: We will need to decide about creating an extra route for every screen individually.
- Screens:
EditReportFieldPageReportDetailsPageReportParticipantDetailsPageReportParticipantsPageRoomMemberDetailsPageRoomMembersPageEmptySearchViewConsolePageInitialSettingsPageContactMethodDetailsPageVisibilityPageCloseAccountPageSecuritySettingsPageTroubleshootPageWalletPageWorkspaceInitialPageWorkspaceMembersPageWorkspaceMoreFeaturesPageWorkspaceProfilePageWorkspacesListPagePolicyAccountingPageSageIntacctEditUserDimensionsPageNetSuiteImportCustomFieldViewImportedCategoriesPageWorkspaceCategoriesPageWorkspaceCompanyCardDetailsPageWorkspaceCompanyCardsSettingsPagePolicyDistanceRatesPageWorkspaceEditCardLimitPageWorkspaceEditCardLimitTypePageWorkspaceExpensifyCardDetailsPageWorkspaceExpensifyCardPageEmptyStateWorkspaceInvoiceVBASectionImportedMembersPageWorkspaceMemberDetailsPageImportedPerDiemPageWorkspacePerDiemDetailsPageWorkspacePerDiemPageReportFieldsListValuesPageReportFieldsSettingsPageReportFieldsValueSettingsPageWorkspaceReportFieldsPageImportedTagsPageWorkspaceTagsPageWorkspaceViewTagsPageWorkspaceTaxesPageWorkspaceWorkflowsPageWorkspaceWorkflowsApprovalsEditPage
- Components:
ExpensifyAccountSwitcherAccountingConnectionConfirmationModalAttachmentModalConfirmModalDelegateNoAccessModalFocusModeNotificationImportSpreadsheetLocationPermissionModalMoneyReportHeaderExportWithDropdownMenuSearchPageHeaderSupportActionRestrictedModalBaseUpdateAppModalHeaderViewPopoverReportActionContextMenuReportDetailsExportPageFloatingActionButtonAndPopoverIOURequestStepScanIOURequestStepWaypointCardSectionWorkspaceResetBankAccountModal
- Hooks:
useDeleteSavedSearch
DecisionModal
- Pages:
SearchPageHeaderReportDetailsPage(multiple occurrences)WorkspaceMembersPage(multiple occurrences)WorkspaceCategoriesPage(multiple occurrences)WorkspaceTagsPage
- Components:
BaseImportOnyxStateProcessMoneyReportHoldMenu
SelectionListModal -> SelectionListWithModal
- Pages:
SearchReportParticipantsPageRoomMembersPageWorkspaceMembersPageWorkspaceCategoriesPagePolicyDistanceRatesPageWorkspacePerDiemPageReportFieldsListValuesPageWorkspaceReportFieldsPageWorkspaceTagsPageWorkspaceViewTagsPageWorkspaceTaxesPage
RequireTwoFactorAuthenticationModal
- Components:
Expensify(multiple occurrences)
TestToolsModal
- Pages:
AuthScreens
SearchSelectedNarrow -> SearchPageHeader
- Pages:
SearchPageSearchSelectionModaHeader
❓ Unknown: Unable to test because the modal is either missing or not accessible
CountrySelectorModal -> CountryPicker -> Address
- Pages:
MissingPersonalDetailsContent->MissingPersonalDetails(unused?)
StateSelectorModal -> StatePicker -> Address
- Components:
MissingPersonalDetailsContent->MissingPersonalDetails(unused?)
PushRowModal -> PushRowWithModal (unused?)
- Pages:
ReimburseAccountPageAddressFormFieldsBusinessTypeIncorporationLocationPaymentVolumeConfirmation
BusinessTypeSelectorModal -> BusinessTypePicker
- Pages:
ReimburseAccountPageBusinessInfo
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsLOW
Activity
melvin-bot commentedon Dec 3, 2024
Triggered auto assignment to @Christinadobrzyn (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.[-]Replace modal screens with modals from `@react-navigation`[/-][+][TRACKING] Replace modal screens with modals from `@react-navigation`[/+][-][TRACKING] Replace modal screens with modals from `@react-navigation`[/-][+][HOLD] Replace modal screens with modals from `@react-navigation`[/+]mountiny commentedon Dec 4, 2024
@chrispader we will have to discuss this and make a proposal first
melvin-bot commentedon Dec 10, 2024
@chrispader, @mountiny, @Christinadobrzyn Eep! 4 days overdue now. Issues have feelings too...
Christinadobrzyn commentedon Dec 10, 2024
Hey @mountiny or @chrispader - should this remain a daily issue?
Are we holding it for this PR - #53362
499 remaining items
MelvinBot commentedon Sep 14, 2026
🤖 Done — unassigned
chrispaderfrom this issue.Remaining assignees:
jmusial,mallenexpensify,parasharrajat,mountiny.view run · no recording available
melvin-bot commentedon Oct 7, 2026
This issue has not been updated in over 15 days. @jmusial, @mallenexpensify, @parasharrajat, @mountiny eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
mountiny commentedon Oct 8, 2026
@MelvinBot can you write a summary of what's left on this issue?
MelvinBot commentedon Oct 8, 2026
One migration is still open:
CardAuthenticationModal. Everything else on the July 22 plan is merged or was closed as "keep as modal."Still open
sharabai.allgandalfapproved it on Oct 2. You requested changes on Oct 7 because Retry payment no longer opens the 3DS challenge.sharabaipushed a fix ("Open 3DS challenge on Retry payment") and tests today. The PR now needs your re-review.Open question
ParticipantPickerwas on the July 14 "investigating" list, but the July 22 triage never classified it. It still renders aModal(src/components/ParticipantPicker/index.tsx:24). You need to decide whether to migrate it or keep it as a modal.Done or closed
HRSyncResultsModalmerged Aug 30 andPlanTypeSelectormerged Jul 27.CardAuthenticationModal.TypeSelectorModal,AvatarCropModal,FeatureTrainingModal, andConnectToQuickbooksOnlineFlow/ConnectToXeroFloware all closed.YearPickerModal,MonthPickerModal(their sub-issues are closed),TimeModalPicker,IOURequestStepCurrencyModal,CurrencyPicker, and the Group 0 generic form pickers.parasharrajat's $1,125 for the earlier PRs was approved May 21. Each sub-issue handles its own payment.Once the
CardAuthenticationModalPR merges and you settleParticipantPicker, you can close this tracking issue.jmusial commentedon Oct 22, 2026
Missing modal migration from this issue wasn't on my bingo this week ...
ParticipantPickerwas missed because it was added (#87920, Apr 28) after the Apr 24 inventory and shipped behind a beta, and Jul 22 triage skipped it while that beta was being reverted and its iOS freeze fixed.It should be migrated: the routed version,
DynamicIOURequestStepParticipants, already exists with the confirmation step as an entry screen.@MelvinBot please create a subissue here and assign @mountiny @parasharrajat and myself. Also please link the issue to this PR if you can
MelvinBot commentedon Oct 22, 2026
🤖 I created Migrate ParticipantPicker to @react-navigation modal screen and added it as a sub-issue here.
mountiny,parasharrajat,jmusialDaily,Task$ https://github.com/Expensify/App/issues/104753to the Fixed Issues section of Migrate ParticipantPicker modal to nav.mountiny commentedon Oct 22, 2026
Thanks