Create v1 Collect workspace Bottom Up flow#30582
Conversation
puneetlath
left a comment
There was a problem hiding this comment.
Looking good! Just some minor feedback.
I 100% did this. I was very careful to save the file given that this was the 3rd test. Maybe there is another line that I need to comment out? |
|
@mountiny Test results with staging server enabled. Video showing fresh accounts (left: admin, right: employee) included. Requesting (employee) user
Requestee (admin) user
30582-web-3.mp4 |
|
Oh, I guess the admin's own workspace chat doesn't seem to have been added. But the employee's does for both. |
Yeah, I assumed we're looking for the workspace's chat room which is different from those. I opened all the reports in the video just to make sure. |
|
It was added optimistically but then disappeared, I think this might be something to do with the Collect policy settings. This would require a change in the backend I have created a follow up to investigate so we do not forget about this #31754 Both users have workspace chat and seems like everything worked so I am going to go ahead with merge. Thanks everyone fore testing and reviewing 🚀 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.3-0 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.3-0 🚀
|
| { | ||
| text: translate('common.businessBankAccount'), | ||
| icon: Expensicons.Building, | ||
| onSelected: () => onItemSelected(CONST.PAYMENT_METHODS.BUSINESS_BANK_ACCOUNT), |
There was a problem hiding this comment.
This caused crash - #31797 as it fallback to throw here:
| Navigation.navigate(ROUTES.BANK_ACCOUNT_WITH_STEP_TO_OPEN.getRoute('', policyID)); | ||
| return; | ||
| } | ||
| Navigation.navigate(this.props.addBankAccountRoute); |
There was a problem hiding this comment.
I think this default might be incorrect. I think this defaults to a personal bank account since we pass it here
There was a problem hiding this comment.
I think this should be correct because we pass it to the SettlementButton in both cases using this method which checks if the parent report is workspace chat or DM
App/src/components/MoneyReportHeader.js
Line 94 in e909316
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.4.3-11 🚀
|
| if (isExpenseReport) { | ||
| buttonOptions.push(paymentMethods[CONST.IOU.PAYMENT_TYPE.VBBA]); | ||
| } | ||
| buttonOptions.push(paymentMethods[CONST.IOU.PAYMENT_TYPE.VBBA]); |
There was a problem hiding this comment.
This change caused duplicated "Pay with Expensify" option
| }, | ||
| }, | ||
| ...(Permissions.canUseWallet(props.betas) | ||
| ...(ReportUtils.isIOUReport(iouReport) |
There was a problem hiding this comment.
Send money case was missing in this condition, which caused #32228
| onSelected: () => { | ||
| props.onItemSelected(CONST.PAYMENT_METHODS.BANK_ACCOUNT); | ||
| }, | ||
| }, |
There was a problem hiding this comment.
This also removed personal bank account option in Wallet page. Issue: #32079
|
|
||
| const optimisticData = [ | ||
| { | ||
| onyxMethod: Onyx.METHOD.MERGE, |
There was a problem hiding this comment.
Coming from #31836.
As there isn't a better way at the moment to update data immediately before navigation, we have fallen back to using the SET method.
There was a problem hiding this comment.
😢 This is multiple times I've seen this used and I think it is a hack and that we should really try to find some other real solution to the problem.
There was a problem hiding this comment.
I did raise that concern in the linked issue, however, no other viable solution has been found in couple of weeks. Then given we already use the SET for classic policy creation (so not part of the bottom up flow), I agree to proceed with using SET.
There was a problem hiding this comment.
Would you be OK with creating a GH issue with a solid problem statement and start getting some proposals for fixing it? I'd like to not just let this one fade away with others continuing to copy the same hack. I have some ideas like:
- If there was just a
merge()then the data should be immediately (and synchronously) available in the Onyx cache. Let's find a way to use it faster - Is the problem because subscribers aren't notified until the next-tick? If so, maybe we can add an option to Onyx to bypass for some scenarios (since it was only added as an optimization)
There was a problem hiding this comment.
I have this saved, but I still did not get around to do this focusing on Ideal nav and waves in general. Noting previous comment from another PR for future.

Details
In this PR we are implementing a basic v1 bottom up flow in which users can:
Fixed Issues
$ #30702
Tests
For testing purposes as Expensify Engineer locally set the
skipGuidesAssignentto true on this line as most likely the guide assignment might not be working well for you locally and it could cause the call to fail.Pay With ExpensifyOffline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari