Repository navigation
Conversation
…rom the camera button Co-authored-by: Garrett Knight <garrettmknight@users.noreply.github.com>
Contributor
Author
Contributor
Author
|
🤖 Android test steps verification results: ✅ pass The PR's Tests section is still a TODO, so I ran the expected-result steps from the linked issue. On Android, the bottom-tab camera button pre-fills the default workspace, the workspace row on Confirm details can be changed, and the submitted expense lands in the chosen workspace's chat.
|
Merged
45 tasks done
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.





Explanation of Change
The bottom-tab camera button (and the desktop floating receipt button) starts a scan with the active workspace chat as the route
reportID, instead of a generated one like FAB → Create expense → Scan. Because of that,useResetIOUTypesetsisFromGlobalCreate: falseon the draft, anduseParticipantSectiononly lets the user edit the workspace row whenisFromGlobalCreateis true. So users couldn't switch workspaces on the confirmation page.Both flows already go through
navigateGlobalCreateafter the receipt is captured, which assigns the draft to the default workspace chat. This PR also setsisFromGlobalCreate: trueon the drafts there. That way:reportID, and submission uses those, so the expense goes to the chosen workspace.isRestrictedToPreferredPolicyand test-receipt locks inuseParticipantSectionstill apply.iouTypeSUBMIT/TRACK/SPLIT with an existing report, so they never reachnavigateGlobalCreate. The FAB scan and receipt drop flows already haveisFromGlobalCreate: true, so this is a no-op for them.Added unit tests in
tests/unit/NavigateGlobalCreateTest.tsxfor both branches ofnavigateGlobalCreate(default workspace and preserved participants).Fixed Issues
$ #102764
PROPOSAL: #102764
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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