-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
🎀 👀 🎀 C+ reviewed
@narefyev91 I think you need to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall code is looking good, but maybe we could use a bit more comments - especially in the createSplitsAndOnyxData
changes
src/libs/actions/IOU.js
Outdated
} else { | ||
const existingChatReport = ReportUtils.getChatByParticipants([accountID]); | ||
isNewOneOnOneChatReport = !existingChatReport; | ||
createOptimisticPersonalDetails = isNewOneOnOneChatReport; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename this shouldCreateOptimisticPersonalDetails
since this is a bool?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 report
text since the beginning.Request money flow
owes
text.Offline tests
Same as above
QA Steps
Same as test steps.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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