-
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
fix: replace new report with preexisting #24320
fix: replace new report with preexisting #24320
Conversation
893223a
to
0527492
Compare
@mananjadhav 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] |
Thanks for this @pasyukevich. Can you help me understand conceptually the difference between |
Also, looks like your commits need to be signed. |
Sure,
'UP' is already used over the app and make replace action Currently, it is not possible to run 'UP' in some cases, cause the previous statement is |
0527492
to
f5a6293
Compare
f5a6293
to
f9583c7
Compare
Got it, thanks for the explanation. @mananjadhav can you give it the first review? Also @pasyukevich looks like you have a conflict. |
Signed-off-by: Yauheni Pasiukevich <pasyukevich@live.com>
Signed-off-by: Yauheni Pasiukevich <pasyukevich@live.com>
f9583c7
to
b915573
Compare
Conflict resolved |
Thanks, I am going to be reviewing this today. |
@pasyukevich I had done a partial review, earlier and I see we're force pushing the changes everytime. Any specific reason we're force pushing the changes? |
Checked the code, and I also tested this on the Web works fine. Finishing other platforms now. |
Reviewer Checklist
Screenshots/VideosWebweb-preexisting-chat-report-id.movMobile Web - Chromemweb-chrome-preexisting-chat-report-id.movMobile Web - Safarimweb-safari-preexisting-chat-report-id.movDesktopdesktop-preexisting-chat-report-id.moviOSios-preexisting-chat-report-id.movAndroidandroid-preexisting-chat-report-id.mov |
But quick question @pasyukevich @puneetlath, the flow works good overall but do you feel the transition is a bit janky? There is no feedback to the user who's being redirected to another page. I am not sure how relevant is it for the end users? |
I agree it's a bit abrupt, but I think that's ok for now. We can always provide more visual feedback if we think it's needed in the future. |
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.
Looks good! Just a couple suggestions to try and make the comments clearer.
@mananjadhav There wasn't any specific reason, just to resolve conflict without additional commits Regarding transition, I also agree that it can be improved in future |
Signed-off-by: Yauheni Pasiukevich <pasyukevich@live.com>
✋ 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/puneetlath in version: 1.3.55-0 🚀
|
🚀 Deployed to staging by https://github.com/puneetlath in version: 1.3.56-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
@@ -849,6 +849,20 @@ function handleReportChanged(report) { | |||
return; | |||
} | |||
|
|||
// It is possible that we optimistically created a DM/group-DM for a set of users for which a report already exists. | |||
// In this case, the API will let us know by returning a preexistingReportID. | |||
// We should clear out the optimistically created report and re-route the user to the preexisting report. |
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.
Where does this happen: We should clear out the optimistically created report and re-route the user to the preexisting report.
? I've made use of the preexistingReportID
to navigate the user to an existing report after creating a money request, but the stale optimistic report does not get removed for me. I had to add Onyx.merge(
${ONYXKEYS.COLLECTION.REPORT}${report?.reportID}, null);
after the navigation line
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.
Hm, good question. I'm not seeing it either. Maybe we forgot to do it?
Details
This PR handles the case where the client attempts to create a new DM/group-DM with users they already have a DM/group-DM with. This can happen if:
Fixed Issues
$ #15511
Tests
Offline tests
This cannot be done offline since it requires an API response. However if you create the report while offline, once you come back online, step 4 from above should still happen.
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
Web
Mobile Web - Chrome
android.web.mp4
Mobile Web - Safari
ios.web.mp4
Desktop
desktop.mp4
iOS
ios.mp4
Android
android.mp4