Repository navigation
[Payment due @mkhutornyi] Show a status modal for Select all bulk actions #102616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
cc29bf9
add bulk action onyx key and type
allgandalf 69c52be
add concierge and clear commands for bulk actions
allgandalf 7a9b338
add bulk action copy
allgandalf f968d94
translate bulk action copy
allgandalf 6c3e8d1
add bulk action status modal
allgandalf 5abef21
show the bulk action modal for select all pay
allgandalf e31631d
fix bulk action translations
allgandalf d55d1db
approve every report matching select all through the backend
allgandalf 77fbae8
show the bulk action modal for select all approve
allgandalf f3ad996
submit every report matching select all through the backend
allgandalf db3c46b
show the bulk action modal for select all submit
allgandalf d33b266
wrap select all approve and submit tests in OnyxListItemProvider
allgandalf aa6e5ba
test that deselected reports are left out of bulk approve and submit
allgandalf 5d8a236
test the bulk action status modal
allgandalf 24543cf
Merge remote-tracking branch 'upstream/main' into bulk-action-status-…
allgandalf dab3043
list the bulk action key in the onyx state export rules
allgandalf 8284021
Merge remote-tracking branch 'upstream/main' into bulk-action-status-…
allgandalf 910f42e
add bulk hold and unhold commands
allgandalf 69756c5
add bulk hold and unhold copy
allgandalf c8f3b52
translate bulk hold and unhold copy
allgandalf 3b7c602
show hold and unhold in the bulk action modal
allgandalf 4f36f87
offer hold and unhold under select all
allgandalf 304a4a5
queue a bulk hold from the hold reason page
allgandalf 5ca3eee
test hold and unhold under select all
allgandalf 7e982dd
test the hold reason page under select all
allgandalf db705a3
test bulk hold in the status modal
allgandalf fcec362
add the bulk reject command
allgandalf 3d31ed3
add bulk reject copy
allgandalf fcb88af
translate bulk reject copy
allgandalf 745584c
show reject in the bulk action modal
allgandalf 4c1d1be
offer reject under select all
allgandalf f6676f2
queue a bulk reject from the reject reason page
allgandalf d31fc27
test reject under select all
allgandalf 46da901
test the reject reason page under select all
allgandalf 476803a
add the bulk delete commands
allgandalf 77aa748
add bulk delete copy
allgandalf 88d60fe
translate bulk delete copy
allgandalf 617e3bd
show delete in the bulk action modal
allgandalf 2bc0f76
offer delete under select all
allgandalf eb489fe
test delete under select all
allgandalf 5ad5487
Merge remote-tracking branch 'upstream/main' into bulk-action-status-…
allgandalf 8702e62
restore main's action bundles
allgandalf 43ccbc5
pass the card list to shouldShowDeleteOption
allgandalf d67cd79
offer the select all bulk actions only on expense and report searches
allgandalf db034e4
test that an invoice search offers no select all bulk actions
allgandalf 4bc4d85
add isExpenseOrReportSearch to the header options dependencies
allgandalf 8604bb5
use plural forms for the bulk action result titles
allgandalf 35d7ce8
use plural forms for the failed reports text
allgandalf 6749209
split the bulk action status modal states into components
allgandalf 60d86a8
add a header comment to the bulk action status modal
allgandalf a14685c
leave out reports with a deselected expense when approving or submitt…
allgandalf 7809c20
leave out reports with a deselected expense when paying all
allgandalf 7046751
recheck the connection after the select all delete confirmation
allgandalf 3d901ef
drop isExpenseReportType from the approve and pay dependencies
allgandalf 8031ba0
block the select all hold while offline
allgandalf 760e7a7
block the select all reject while offline
allgandalf 429d338
test that the select all hold form is blocked offline
allgandalf a00158e
test that the select all reject form is blocked offline
allgandalf 8306b88
Merge remote-tracking branch 'upstream/main' into bulk-action-status-…
allgandalf bfa9c48
move approve and submit to their own PR
allgandalf 2d5379f
move hold, unhold and reject to their own PR
allgandalf 33eefef
move delete to its own PR
allgandalf ef1d6f7
move the modal header comment above the component
allgandalf 6f09219
drop the isVisible prop from the bulk action status modal
allgandalf d87a79b
keep the reports search check for select all pay
allgandalf c5b535f
add space between the result title and the close button
allgandalf e271052
wait for other modals to close before showing the bulk action status
allgandalf d34b106
test the status modal waits for the closing menu
allgandalf 0b7180e
play the success sound for select all pay again
allgandalf 8f3c893
clear the bulk action once from view reports
allgandalf e3425f2
test view reports clears the bulk action once
allgandalf 0e5c274
clear a failed bulk action on the device only
allgandalf 9e13dbf
test clearing a failed and a finished bulk action
allgandalf 1025161
check the clear request with the API test helper
allgandalf 3308839
use the agreed copy while a bulk action runs
allgandalf 024a5d2
say which action failed in the bulk action result
allgandalf 5888e8c
test the failed reports body names the action
allgandalf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1111,6 +1111,7 @@ | |
| "unflushed", | ||
| "unheld", | ||
| "unhold", | ||
| "unholding", | ||
| "unimodules", | ||
| "uninstallations", | ||
| "unminified", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| import useOnyx from '@hooks/useOnyx'; | ||
|
|
||
| import {clearBulkAction, wasBulkActionInitiatedLocally} from '@libs/actions/BulkAction'; | ||
|
|
||
| import CONST from '@src/CONST'; | ||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
|
|
||
| import {isModalActiveSelector} from '@selectors/Modal'; | ||
| import React, {useState} from 'react'; | ||
|
|
||
| import BulkActionStatusModal from './BulkActionStatusModal'; | ||
|
|
||
| /** Shows the status modal for a bulk action started from Search "Select all", and brings it back after a reload. */ | ||
| function BulkActionStatusManager() { | ||
| const [bulkActions, bulkActionsMetadata] = useOnyx(ONYXKEYS.COLLECTION.BULK_ACTION); | ||
| const [openBulkActionID, setOpenBulkActionID] = useState<string | undefined>(); | ||
| const [isAnyOtherModalActive] = useOnyx(ONYXKEYS.MODAL, {selector: isModalActiveSelector}); | ||
|
|
||
| // A record that already existed when this tab loaded resurfaces after a reload. One started in another tab | ||
| // after that doesn't pop open here until this tab reloads. | ||
| const [recordKeysAtLoad, setRecordKeysAtLoad] = useState<Set<string> | undefined>(undefined); | ||
| if (recordKeysAtLoad === undefined && bulkActionsMetadata.status === 'loaded') { | ||
| setRecordKeysAtLoad(new Set(Object.keys(bulkActions ?? {}))); | ||
| } | ||
|
|
||
| const [surfaceableKey] = | ||
| Object.entries(bulkActions ?? {}).find(([key, bulkAction]) => { | ||
| // Concierge messages the result, so there is nothing to show here. | ||
| if (!bulkAction || bulkAction.shouldSendFromConcierge) { | ||
| return false; | ||
| } | ||
| return !!recordKeysAtLoad?.has(key) || wasBulkActionInitiatedLocally(key.replace(ONYXKEYS.COLLECTION.BULK_ACTION, '')); | ||
| }) ?? []; | ||
| const surfaceableBulkActionID = surfaceableKey?.replace(ONYXKEYS.COLLECTION.BULK_ACTION, ''); | ||
|
|
||
| // Keep the modal open through the switch to shouldSendFromConcierge, and close it once the record is gone. | ||
| // The menu that started the bulk action may still be closing, and iOS can't open a modal on top of it. | ||
| if (!openBulkActionID && surfaceableBulkActionID && !isAnyOtherModalActive) { | ||
| setOpenBulkActionID(surfaceableBulkActionID); | ||
| } | ||
| if (openBulkActionID && !bulkActions?.[`${ONYXKEYS.COLLECTION.BULK_ACTION}${openBulkActionID}`]) { | ||
| setOpenBulkActionID(undefined); | ||
| } | ||
|
|
||
| if (!openBulkActionID) { | ||
| return null; | ||
| } | ||
|
|
||
| const bulkAction = bulkActions?.[`${ONYXKEYS.COLLECTION.BULK_ACTION}${openBulkActionID}`]; | ||
| if (!bulkAction) { | ||
| return null; | ||
| } | ||
|
|
||
| const handleClose = () => { | ||
| if (bulkAction.shouldSendFromConcierge) { | ||
| setOpenBulkActionID(undefined); | ||
| return; | ||
| } | ||
| if (bulkAction.state === CONST.BULK_ACTION.STATE.RUNNING) { | ||
| return; | ||
| } | ||
| clearBulkAction(openBulkActionID, bulkAction); | ||
| setOpenBulkActionID(undefined); | ||
| }; | ||
|
|
||
| return ( | ||
| <BulkActionStatusModal | ||
| key={openBulkActionID} | ||
| bulkActionID={openBulkActionID} | ||
| onClose={handleClose} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| export default BulkActionStatusManager; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,264 @@ | ||
| import useBottomSafeSafeAreaPaddingStyle from '@hooks/useBottomSafeSafeAreaPaddingStyle'; | ||
| import useLocalize from '@hooks/useLocalize'; | ||
| import useOnyx from '@hooks/useOnyx'; | ||
| import useOpenConciergeAnywhere from '@hooks/useOpenConciergeAnywhere'; | ||
| import usePreviousDefined from '@hooks/usePreviousDefined'; | ||
| import useResponsiveLayout from '@hooks/useResponsiveLayout'; | ||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||
|
|
||
| import Navigation from '@libs/Navigation/Navigation'; | ||
| import {buildSearchQueryJSON, buildSearchQueryString} from '@libs/SearchQueryUtils'; | ||
|
|
||
| import {sendBulkActionSummaryFromConcierge} from '@userActions/BulkAction'; | ||
| import {close} from '@userActions/Modal'; | ||
|
|
||
| import CONST from '@src/CONST'; | ||
| import type {TranslationPaths} from '@src/languages/types'; | ||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
| import ROUTES from '@src/ROUTES'; | ||
| import type {BulkActionType} from '@src/types/onyx/BulkAction'; | ||
|
|
||
| import React from 'react'; | ||
| import {View} from 'react-native'; | ||
|
|
||
| import ActivityIndicator from './ActivityIndicator'; | ||
| import Button from './Button'; | ||
| import Modal from './Modal'; | ||
| import Text from './Text'; | ||
|
|
||
| const RUNNING_TITLES = { | ||
|
allgandalf marked this conversation as resolved.
Resolved
allgandalf marked this conversation as resolved.
Resolved
|
||
| [CONST.SEARCH.BULK_ACTION_TYPES.APPROVE]: 'bulkAction.approvingTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.SUBMIT]: 'bulkAction.submittingTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.PAY]: 'bulkAction.payingTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.HOLD]: 'bulkAction.holdingTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.UNHOLD]: 'bulkAction.unholdingTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.REJECT]: 'bulkAction.rejectingTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.DELETE]: 'bulkAction.deletingTitle', | ||
| [CONST.BULK_ACTION.DELETE_EXPENSES]: 'bulkAction.deletingExpensesTitle', | ||
| } as const satisfies Record<BulkActionType, TranslationPaths>; | ||
|
|
||
| const DONE_TITLES = { | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.APPROVE]: 'bulkAction.approvedTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.SUBMIT]: 'bulkAction.submittedTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.PAY]: 'bulkAction.paidTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.HOLD]: 'bulkAction.heldTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.UNHOLD]: 'bulkAction.unheldTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.REJECT]: 'bulkAction.rejectedTitle', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.DELETE]: 'bulkAction.deletedTitle', | ||
| [CONST.BULK_ACTION.DELETE_EXPENSES]: 'bulkAction.deletedExpensesTitle', | ||
| } as const satisfies Record<BulkActionType, TranslationPaths>; | ||
|
|
||
| const FAILED_BODIES = { | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.APPROVE]: 'bulkAction.notApprovedBody', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.SUBMIT]: 'bulkAction.notSubmittedBody', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.PAY]: 'bulkAction.notPaidBody', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.HOLD]: 'bulkAction.notHeldBody', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.UNHOLD]: 'bulkAction.notUnheldBody', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.REJECT]: 'bulkAction.notRejectedBody', | ||
| [CONST.SEARCH.BULK_ACTION_TYPES.DELETE]: 'bulkAction.notDeletedBody', | ||
| [CONST.BULK_ACTION.DELETE_EXPENSES]: 'bulkAction.expensesNotDeletedBody', | ||
| } as const satisfies Record<BulkActionType, TranslationPaths>; | ||
|
|
||
| type BulkActionRunningProps = { | ||
| /** The action that is running */ | ||
| action: BulkActionType | undefined; | ||
|
|
||
| /** Callback when the user asks Concierge to send the result */ | ||
| onSendFromConcierge: () => void; | ||
| }; | ||
|
|
||
| function BulkActionRunning({action, onSendFromConcierge}: BulkActionRunningProps) { | ||
| const styles = useThemeStyles(); | ||
| const {translate} = useLocalize(); | ||
|
|
||
| return ( | ||
| <> | ||
| <View style={[styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter, styles.mb2]}> | ||
| <Text style={[styles.exportDownloadTitle, styles.flexShrink1]}>{translate(RUNNING_TITLES[action ?? CONST.SEARCH.BULK_ACTION_TYPES.PAY])}</Text> | ||
| <ActivityIndicator size="small" /> | ||
| </View> | ||
| <Text style={styles.mb5}>{translate('bulkAction.runningBody')}</Text> | ||
| <Button | ||
| onPress={onSendFromConcierge} | ||
| style={styles.w100} | ||
| > | ||
| <Button.Text>{translate('bulkAction.sendFromConcierge')}</Button.Text> | ||
| </Button> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| type BulkActionConciergeProps = { | ||
| /** Callback when the modal is closed */ | ||
| onClose: () => void; | ||
| }; | ||
|
|
||
| function BulkActionConcierge({onClose}: BulkActionConciergeProps) { | ||
| const styles = useThemeStyles(); | ||
| const {translate} = useLocalize(); | ||
| const {openConciergeAnywhere} = useOpenConciergeAnywhere(); | ||
|
|
||
| return ( | ||
| <> | ||
| <Text style={[styles.exportDownloadTitle, styles.mb2]}>{translate('bulkAction.conciergeTitle')}</Text> | ||
| <Text style={styles.mb5}>{translate('bulkAction.conciergeBody')}</Text> | ||
| <Button | ||
| variant={CONST.BUTTON_VARIANT.SUCCESS} | ||
| onPress={() => close(() => openConciergeAnywhere({forceConcierge: true}))} | ||
| style={styles.w100} | ||
| > | ||
| <Button.Text>{translate('bulkAction.goToConcierge')}</Button.Text> | ||
| </Button> | ||
| <Button | ||
| onPress={onClose} | ||
| style={[styles.w100, styles.mt3]} | ||
| > | ||
| <Button.Text>{translate('common.dismiss')}</Button.Text> | ||
| </Button> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| type BulkActionDoneProps = { | ||
| /** The action that finished */ | ||
| action: BulkActionType | undefined; | ||
|
|
||
| /** How many reports the action ran on */ | ||
| total: number; | ||
|
|
||
| /** The reports the action couldn't update */ | ||
| failedReportIDs: string[]; | ||
|
|
||
| /** Callback when the modal is closed */ | ||
| onClose: () => void; | ||
| }; | ||
|
|
||
| function BulkActionDone({action, total, failedReportIDs, onClose}: BulkActionDoneProps) { | ||
| const styles = useThemeStyles(); | ||
| const {translate} = useLocalize(); | ||
| const doneTitle = | ||
| total === 0 | ||
| ? translate('bulkAction.noReportsTitle') | ||
| : translate(DONE_TITLES[action ?? CONST.SEARCH.BULK_ACTION_TYPES.PAY], {doneCount: total - failedReportIDs.length, count: total}); | ||
|
|
||
| const viewFailedReports = () => { | ||
| const queryJSON = buildSearchQueryJSON(`type:${CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT} ${CONST.SEARCH.SYNTAX_FILTER_KEYS.REPORT_ID}:${failedReportIDs.join(',')}`); | ||
| if (!queryJSON) { | ||
| onClose(); | ||
| return; | ||
| } | ||
|
|
||
| // close() runs the modal's onClose, which clears the record. | ||
| close(() => Navigation.navigate(ROUTES.SEARCH_ROOT.getRoute({query: buildSearchQueryString(queryJSON)}))); | ||
| }; | ||
|
|
||
| return ( | ||
| <> | ||
| <Text style={[styles.exportDownloadTitle, total === 0 || failedReportIDs.length > 0 ? styles.mb2 : styles.mb5]}>{doneTitle}</Text> | ||
| {total === 0 && <Text style={styles.mb5}>{translate('bulkAction.noReportsBody')}</Text>} | ||
| {failedReportIDs.length > 0 && ( | ||
| <> | ||
| <Text style={styles.mb5}>{translate(FAILED_BODIES[action ?? CONST.SEARCH.BULK_ACTION_TYPES.PAY], {count: failedReportIDs.length})}</Text> | ||
| <Button | ||
| variant={CONST.BUTTON_VARIANT.SUCCESS} | ||
| onPress={viewFailedReports} | ||
| style={[styles.w100, styles.mb3]} | ||
| > | ||
| <Button.Text>{translate('bulkAction.viewFailedReports')}</Button.Text> | ||
| </Button> | ||
| </> | ||
| )} | ||
| <Button | ||
| onPress={onClose} | ||
| style={styles.w100} | ||
| > | ||
| <Button.Text>{translate('common.close')}</Button.Text> | ||
| </Button> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| type BulkActionFailedProps = { | ||
| /** Callback when the modal is closed */ | ||
| onClose: () => void; | ||
| }; | ||
|
|
||
| function BulkActionFailed({onClose}: BulkActionFailedProps) { | ||
| const styles = useThemeStyles(); | ||
| const {translate} = useLocalize(); | ||
|
|
||
| return ( | ||
| <> | ||
| <Text style={[styles.exportDownloadTitle, styles.mb2]}>{translate('bulkAction.failedTitle')}</Text> | ||
| <Text style={styles.mb5}>{translate('bulkAction.failedBody')}</Text> | ||
| <Button | ||
| onPress={onClose} | ||
| style={styles.w100} | ||
| > | ||
| <Button.Text>{translate('common.close')}</Button.Text> | ||
| </Button> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| type BulkActionStatusModalProps = { | ||
| /** The bulk action ID to subscribe to */ | ||
| bulkActionID: string; | ||
|
|
||
| /** Callback when the modal is closed */ | ||
| onClose: () => void; | ||
| }; | ||
|
|
||
| /** Shows the progress and result of a bulk action started from Search "Select all". */ | ||
| function BulkActionStatusModal({bulkActionID, onClose}: BulkActionStatusModalProps) { | ||
| const styles = useThemeStyles(); | ||
| // isSmallScreenWidth is needed here because the modal type depends on actual screen width, not layout mode | ||
| // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth | ||
| const {isSmallScreenWidth} = useResponsiveLayout(); | ||
| const bottomSafeAreaPaddingStyle = useBottomSafeSafeAreaPaddingStyle({addBottomSafeAreaPadding: isSmallScreenWidth, addOfflineIndicatorBottomSafeAreaPadding: false, style: styles.m5}); | ||
|
|
||
| const [bulkAction] = useOnyx(`${ONYXKEYS.COLLECTION.BULK_ACTION}${bulkActionID}`); | ||
| const displayedBulkAction = usePreviousDefined(bulkAction); | ||
| if (!bulkAction && !!displayedBulkAction) { | ||
| return null; | ||
| } | ||
|
|
||
| const state = displayedBulkAction?.state; | ||
| const action = displayedBulkAction?.action; | ||
| const shouldSendFromConcierge = !!displayedBulkAction?.shouldSendFromConcierge; | ||
| const isRunning = state === CONST.BULK_ACTION.STATE.RUNNING && !shouldSendFromConcierge; | ||
| const isConcierge = shouldSendFromConcierge && state !== CONST.BULK_ACTION.STATE.DONE; | ||
|
|
||
| return ( | ||
| <Modal | ||
| isVisible | ||
| onClose={isRunning ? () => {} : onClose} | ||
| onBackdropPress={isRunning ? () => {} : undefined} | ||
| shouldTreatModalAsCovering | ||
| type={isSmallScreenWidth ? CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED : CONST.MODAL.MODAL_TYPE.CONFIRM} | ||
| innerContainerStyle={styles.pv0} | ||
| enableEdgeToEdgeBottomSafeAreaPadding | ||
| > | ||
| <View style={bottomSafeAreaPaddingStyle}> | ||
| {isRunning && ( | ||
| <BulkActionRunning | ||
| action={action} | ||
| onSendFromConcierge={() => sendBulkActionSummaryFromConcierge(bulkActionID, displayedBulkAction ?? undefined)} | ||
| /> | ||
| )} | ||
| {isConcierge && <BulkActionConcierge onClose={onClose} />} | ||
| {state === CONST.BULK_ACTION.STATE.DONE && ( | ||
| <BulkActionDone | ||
| action={action} | ||
| total={displayedBulkAction?.total ?? 0} | ||
| failedReportIDs={displayedBulkAction?.failedReportIDs ?? []} | ||
| onClose={onClose} | ||
| /> | ||
| )} | ||
| {!isConcierge && state === CONST.BULK_ACTION.STATE.FAILED && <BulkActionFailed onClose={onClose} />} | ||
| </View> | ||
| </Modal> | ||
| ); | ||
| } | ||
|
|
||
| export default BulkActionStatusModal; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a reload hydrates both a surfaceable export and bulk action (for example, each was started in a different tab),
AuthScreens.tsxrenders the export manager immediately before this one. Both managers latch their IDs during the same React render, before eitherBaseModaleffect publishesONYXKEYS.MODAL, so this condition sees false in both and mounts two global modals at once. On iOS that recreates the presentation-on-top failure this guard is meant to avoid and can leave one status hidden; coordinate the two managers through a shared reservation or queue rather than checking only the already-committed modal flag.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only happens on a reload with an export and a bulk action both started from other tabs, leaving it