-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
prevent optimisticID creation for a user already existing in personal details #29279
prevent optimisticID creation for a user already existing in personal details #29279
Conversation
@hoangzinh 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] |
@cubuspl42 because you have Offline tests in GH description, could you include offline test recordings in Screenshots/Videos? (To prove it works when network is offline) Thanks |
oops, wrong mention @cubuspl42. I'm really sorry. I meant @c3024 |
My bad. All steps cannot be done offline. Removed them. @hoangzinh |
src/libs/actions/IOU.js
Outdated
@@ -1055,19 +1055,19 @@ function createSplitsAndOnyxData(participants, currentUserLogin, currentUserAcco | |||
let oneOnOneChatReport; | |||
let isNewOneOnOneChatReport = false; | |||
let shouldCreateOptimisticPersonalDetails = false; | |||
|
|||
const personalDetailExists = _.has(allPersonalDetails, accountID); |
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.
We should use lodash util instead of underscore https://expensify.slack.com/archives/C01GTK53T8Q/p1687477811950459
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 but there are other places in this file with _.has. I did not change them.
@@ -1055,19 +1056,19 @@ function createSplitsAndOnyxData(participants, currentUserLogin, currentUserAcco | |||
let oneOnOneChatReport; | |||
let isNewOneOnOneChatReport = false; | |||
let shouldCreateOptimisticPersonalDetails = false; | |||
|
|||
const personalDetailExists = lodashHas(allPersonalDetails, accountID); |
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.
NAB, I think we should keep an empty line as previously, I recall we have a rule that it should have an empty space before a comment.
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.
Hmm. I'll add. Prettier and lint didn't object so I didn't mind.
Could you explain the reason why we can't test offline for this fix? Thanks |
Split bill option in the + menu in composer for #announce room appears only when we invite the user when online. |
@c3024 does it make sense if we do step 1->3 online, and do offline from step 4? |
I'll split steps into online and offline with as many offline steps as feasible and update the offline instructions. |
Updated offline steps and videos @hoangzinh |
Thanks @c3024 I'm appreciate it |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-10-11.at.22.43.40.-.web.movMobile Web - ChromeScreen.Recording.2023-10-11.at.23.07.38.-.android.chrome.mp4Mobile Web - SafariScreen.Recording.2023-10-11.at.22.56.43.-.ios.safari.mp4DesktopScreen.Recording.2023-10-11.at.22.48.44.-.desktop.moviOSScreen.Recording.2023-10-11.at.23.03.09.-.ios.mp4AndroidScreen.Recording.2023-10-11.at.23.11.59.-.android.mp4 |
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
cc @Gonals for code review |
✋ 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/Gonals in version: 1.3.85-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.85-4 🚀
|
🚀 Deployed to staging by https://github.com/Gonals in version: 1.3.86-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.86-5 🚀
|
Details
Fixed Issues
$ #29024
PROPOSAL: #29024 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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
Android: Native
androidMissingMember-compressed.mp4
Offline
androidMissingMemberOffline.mp4
Android: mWeb Chrome
mWebAndroidMissingMember-compressed.mp4
Offline
mWebMissingMemberOffline.mp4
iOS: Native
iOSNativeMissingMember.mp4
Offline
iOSNativeMissingMemberOffline.mp4
iOS: mWeb Safari
SafariMissingMember.mp4
Offline
iOSMissingMemberOffline.mp4
MacOS: Chrome / Safari
webMissingMember.mp4
Offline
webMissingNumberOffline.mp4
MacOS: Desktop
desktopMissingMember.mp4
Offline
desktopMissingMemberOffline.mp4