Fix/72129c - No checkmark displayed for selected recipient in choose recipient page#83344
Fix/72129c - No checkmark displayed for selected recipient in choose recipient page#83344dmkt9 wants to merge 5 commits intoExpensify:mainfrom
Conversation
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: 18115d04bf
ℹ️ 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".
| // P2P chats don't support negative amounts, so in cases where there is no default workspace when the amount is negative, we will remove the selected transaction participants. | ||
| else if (iouType === CONST.IOU.TYPE.CREATE && isP2PChat && isNegativeAmount && isReturningFromConfirmationPage) { | ||
| setTransactionReport(transactionID, {reportID: undefined}, true); | ||
| setMoneyRequestParticipants(transactionID, [], true).then(() => { |
There was a problem hiding this comment.
Do not flag cleared participants as test transaction
Passing true as the third argument to setMoneyRequestParticipants here marks the draft as a test/global-create transaction (setMoneyRequestParticipants treats that parameter as isTestTransaction and sets isFromGlobalCreate in src/libs/actions/IOU/index.ts:1503-1508). In this negative-amount P2P recovery path, that mutates normal drafts (including flows started inside an existing report) into global-create semantics, which can change downstream submit/navigation behavior after the user reselects a participant.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I used the condition iouType === CONST.IOU.TYPE.CREATE to apply only to expenses created using the global create button
Explanation of Change
The follow-up PR #78354
Fixes the issue where the checkmark does not appear for the selected recipient on the "Choose Recipient" page during expense request creation.
Self DM is marked as selected in recipient list when submitting track distance from self DM #82515: Because when creating a transaction draft using
createDraftTransaction, we don’t reset theparticipantsproperty here.Invoice - "Hidden" is selected on recipient list instead of invoice chat #82459: We are missing information for the invoice room when restarting the invoice creation flow here.
Invoice - After changing invoice chat from confirm page, the previous invoice chat disappears #82468: Because
selectedOptionsholds stale data from the previously selected option, the invoice room option gets excluded here.To fix this issue: since
selectedOptionsis not used inCONST.SEARCH_SELECTOR.SELECTION_MODE_SINGLEmode (specifically outside IOU split), we will remove thesetSelectedOptionslogic inMoneyRequestParticipantsSelectorthat was added in PR Fix/72129b - No checkmark displayed for selected recipient in choose recipient page #78354, and passinitialSelectedasundefinedin this case.Fixed Issues
$ #72129
PROPOSAL: #72129 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Test 1:
Test 2:
Precondition:
Test 3:
Test 4:
Precondition:
Test 5:
Precondition: Log in with new account and do not create workspace.
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.Screenshots/Videos
Test 1:
Android: Native
android.native.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.native.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
mac.safari.mp4
Test 2:
mac.test1.mp4
Test 3:
mac.test2.mp4
Test 4:
mac.test3.mp4
Test 5:
Test-6.mp4