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. |
puneetlath
left a comment
There was a problem hiding this comment.
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 🚀
|
|
|
||
| // 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.
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.
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 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 */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
Mobile Web - Chrome
android.web.mp4
Mobile Web - Safari
ios.web.mp4
Desktop
desktop.mp4
iOS
ios.mp4
Android
android.mp4