feat: fix the logic for generating optimistic personal details#22401
Conversation
|
@narefyev91 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] |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromeandroid-web.movMobile Web - Safariios-web.movDesktopdesktop.moviOS8mb.video-Hiv-3G3anNuR.mp4Androidandroid.mov |
narefyev91
left a comment
There was a problem hiding this comment.
LGTM!
🎀 👀 🎀 C+ reviewed
|
@narefyev91 I think you need to |
Beamanator
left a comment
There was a problem hiding this comment.
Overall code is looking good, but maybe we could use a bit more comments - especially in the createSplitsAndOnyxData changes
| } else { | ||
| const existingChatReport = ReportUtils.getChatByParticipants([accountID]); | ||
| isNewOneOnOneChatReport = !existingChatReport; | ||
| createOptimisticPersonalDetails = isNewOneOnOneChatReport; |
There was a problem hiding this comment.
Can we rename this shouldCreateOptimisticPersonalDetails since this is a bool?
|
Also @allroundexperts I think you need to add tests for the |
|
@Beamanator Added test case for the change. I couldn't add much comments as I was unsure which exact part is unclear to you. Do you have suggestions? |
Beamanator
left a comment
There was a problem hiding this comment.
Please undo the podfile change since i don't believe you need it here :D
And thanks for adding an automated test! I was actually meaning a manual test for QA as well :D
|
@Beamanator Removed podfile changes and added test steps for request money flow as well. |
Beamanator
left a comment
There was a problem hiding this comment.
Thanks @allroundexperts !
|
✋ 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/Beamanator in version: 1.3.40-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.40-5 🚀
|
| } else { | ||
| const existingChatReport = ReportUtils.getChatByParticipants([accountID]); | ||
| isNewOneOnOneChatReport = !existingChatReport; | ||
| shouldCreateOptimisticPersonalDetails = isNewOneOnOneChatReport; |
There was a problem hiding this comment.
Great work to improve the previous logic here 👍 . But we need to also check if the personal details exist before optimistic creates a new one here. Otherwise, it will cause this issue #29024
Details
This PR fixes the logic to create optimistic personal details object while splitting a bill.
Fixed Issues
$ #22104
PROPOSAL: #22104 (comment)
Tests
Split bill flow:
owes reporttext since the beginning.Request money flow
owestext.Offline tests
Same as above
QA Steps
Same as test steps.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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 */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)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
Web
Screen.Recording.2023-07-07.at.11.28.46.AM.mov
Mobile Web - Chrome
Screen.Recording.2023-07-07.at.3.15.00.PM.mov
Mobile Web - Safari
Screen.Recording.2023-07-07.at.3.12.14.PM.mov
Desktop
Screen.Recording.2023-07-07.at.2.59.26.PM.mov
iOS
Screen.Recording.2023-07-07.at.3.19.52.PM.mov
Android
Screen.Recording.2023-07-07.at.3.19.05.PM.mov