prevent showing green dot with archived parent report#27833
Conversation
34b6009 to
f593278
Compare
|
@0xmiroslav 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] |
|
@0xmiroslav PR is ready for review! Please have a look, ty 😄 |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
| */ | ||
| function getReport(reportID) { | ||
| // Deleted reports are set to null and lodashGet will still return null in that case, so we need to add an extra check | ||
| return lodashGet(allReports, `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {}) || {}; |
There was a problem hiding this comment.
why do we prefer {} instead of null for missing reports? I think null or undefined is much more obvious for showing that a report is missing.
There was a problem hiding this comment.
Lines 1320 to 1323 in 653926d
Im not sure why this function is showing as a diff if it is already present in ReportUtils.js in main. Did you duplicate it?
There was a problem hiding this comment.
Ignore all my comments, I just noticed that you only moved this!
There was a problem hiding this comment.
@aldo-expensify This is not related to this PR (I just moved it above to use for avoiding eslint warning), but if we return null here, it will lead to a crash when you re-visit a thread of a left room. More detail here:
#26256
#26256 (comment)
There was a problem hiding this comment.
yes, no problem. Changing it to return null would definitely need updates everywhere this function is used and is totally out of the scope of this PR.
|
✋ 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/aldo-expensify in version: 1.3.74-0 🚀
|
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.74-3 🚀
|
Details
Fix: prevent showing green dot with archived parent report
Fixed Issues
$ #27348
PROPOSAL: #27348 (comment)
Tests
Offline tests
Same as Tests.
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
nnzmzmn2312d.mov
Mobile Web - Chrome
Screen.Recording.2023-09-20.at.16.44.25.mov
Mobile Web - Safari
Screen.Recording.2023-09-20.at.16.43.17.mov
Desktop
nnzmzmn2312d.mov
iOS
Screen.Recording.2023-09-20.at.16.45.53.mov
Android
Screen.Recording.2023-09-20.at.16.51.30.mov