Refactor HoldSubmitterEducationalModal to use CenteredModalLayout#94432
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85c188b423
ℹ️ 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".
| children?: ReactNode; | ||
| }; | ||
|
|
||
| function BaseHoldSubmitterEducationalModal({onDismiss, children}: BaseHoldSubmitterEducationalModalProps) { |
There was a problem hiding this comment.
Handle route removal for hold education
When this modal screen is removed via browser/native back navigation, neither onBackdropPress nor FeatureTrainingContent's onClose runs. The deleted component called useBeforeRemove(onClose), so this refactor now skips handleDismiss in both the single and bulk hold flows in that scenario; submitters who back out of the educational route won't set the dismissed NVP or continue to the hold action/reason page, so the hold attempt silently aborts.
Useful? React with 👍 / 👎.
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.
|
Explanation of Change
Fixed Issues
$ #90475
PROPOSAL:
Tests
Pre requisite:
It's easiest to start with a fresh account.
A. Single modal:
B. Bulk modal:
Dev tip:
to reset the modal
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari