-
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
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 |
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!
*/ | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 1320 to 1323 in 653926d
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}`, {}) || {}; | |
} |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore all my comments, I just noticed that you only moved this!
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.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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
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