Fix: close expense creation RHP when clicking outside the open recipient list#94544
Fix: close expense creation RHP when clicking outside the open recipient list#94544MelvinBot wants to merge 2 commits into
Conversation
…list Co-authored-by: thelullabyy <thelullabyy@users.noreply.github.com>
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.
|
|
🤖 Fixed the failing PR Author Checklist / checklist check. It wasn't failing on unchecked boxes — it was crashing with Fix: Restored the standard The check now runs correctly and reports the normal "PR Author Checklist is not completely filled out" state — All other checks (tests, typecheck, ESLint, Prettier, build, etc.) are passing; the |
|
@MelvinBot Please merge main. After that replace all |
…PickerBackdropClose Co-authored-by: thelullabyy <thelullabyy@users.noreply.github.com>
|
@thelullabyy Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🤖 Done, @thelullabyy:
|
Explanation of Change
In the new manual expense flow (gated behind the
NEW_MANUAL_EXPENSE_FLOWbeta), the recipient list ("To" field) is rendered as a separateRIGHT_DOCKEDModal(ParticipantPicker) stacked on top of the expense-creation RHP. Clicking outside the panel only fired the picker'sonClose, which just flips the picker's local visibility state — it never dismissed the underlying expense-creation RHP. So an outside click closed only the recipient list and left the expense RHP open, contradicting standard RHP behavior (clicking outside an RHP closes it).This was the root cause of the deploy blocker originally surfaced when the beta was removed in #94134 (since reverted by #94312). The flow still has the bug behind the beta, so this PR fixes it directly.
Fix: The
Modalcomponent already exposes a backdrop handler (onBackdropPress) that is distinct from the back button. This PR:onBackdropPressprop toParticipantPickerand forwards it to itsModal. When omitted, theModalfalls back toonClose, so existing behavior is unchanged for any other usage.IOURequestStepConfirmation, wiresonBackdropPresstoNavigation.dismissModal()so an outside/backdrop click dismisses the entire expense-creation RHP.The header back button (
onBackButtonPress→onClose) is intentionally left untouched, so pressing the back arrow still returns to the confirmation form, while clicking outside now closes the whole flow as expected.Fixed Issues
$ #94246
PROPOSAL: #94246 (comment)
Tests
NEW_MANUAL_EXPENSE_FLOWbeta.Offline tests
Same as tests (this is a navigation/UI-only change with no network dependency).
QA Steps
NEW_MANUAL_EXPENSE_FLOWbeta.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
MacOS: Desktop