Revert "refactored ConfirmModal usage to useConfirmModal"#79150
Revert "refactored ConfirmModal usage to useConfirmModal"#79150roryabraham wants to merge 1 commit intomainfrom
Conversation
|
@roryabraham |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 210d7b8ef3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| <ConfirmModal | ||
| title={translate('workspace.exportAgainModal.title')} | ||
| onConfirm={confirmExport} | ||
| onCancel={() => setModalStatus(null)} | ||
| prompt={translate('workspace.exportAgainModal.description', {reportName: report?.reportName ?? '', connectionName})} |
There was a problem hiding this comment.
Preserve back-button handling for confirm modal
This confirm dialog replaced useConfirmModal, which always set shouldHandleNavigationBack: true via the modal context. The inline ConfirmModal here doesn’t pass that flag, and Modal only registers the back/popstate handler when it’s true (src/components/Modal/index.tsx). As a result, on web/Android pressing the back button while this export-again confirmation is open will navigate away instead of just dismissing the modal, bypassing the intended confirm/cancel flow. Consider setting shouldHandleNavigationBack (and related back-handler props) to keep the prior behavior.
Useful? React with 👍 / 👎.
Reverts #77945. Straight revert.
Fixed issues
$ #79129
$ #79128
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.