-
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
Make sure reportRecepient exists before rendering ParticipantLocalTime #19650
Make sure reportRecepient exists before rendering ParticipantLocalTime #19650
Conversation
@jasperhuangg @rushatgabhane One of you needs to 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] |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
@@ -929,7 +929,7 @@ class ReportActionCompose extends React.Component { | |||
style={this.props.isComposerFullSize ? styles.chatItemFullComposeRow : {}} | |||
contentContainerStyle={this.props.isComposerFullSize ? styles.flex1 : {}} | |||
> | |||
{shouldShowReportRecipientLocalTime && <ParticipantLocalTime participant={reportRecipient} />} | |||
{shouldShowReportRecipientLocalTime && !!reportRecipient && <ParticipantLocalTime participant={reportRecipient} />} |
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.
@Thanos30 could we please not use the double !!
It could be confusing for others
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.
Sure @rushatgabhane , the other way is to create a function to check if reportRecipient
exists, since I can't put it inline without the !!
. I saw the !!
used in another place too in the code, that's why I used it here.
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.
Can you just use Boolean(reportRecipient)
?
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.
Hey @jasperhuangg , the reason I don't use Boolean(reportRecipient)
is because an empty Object will come up as true
in Boolean. I believe in the case of an empty object we still don't want to show it, correct me if I am wrong though.
@rushatgabhane I created the |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-05-30.at.20.45.44.movMobile Web - ChromeWhatsApp.Video.2023-05-30.at.20.52.35.mp4Mobile Web - SafariScreen.Recording.2023-05-30.at.20.47.52.movDesktopScreen.Recording.2023-05-30.at.20.52.37.moviOSScreen.Recording.2023-05-30.at.20.42.16.movAndroidWhatsApp.Video.2023-05-30.at.20.24.31.1.mp4 |
almost done |
@rushatgabhane I am sorry if this is off-topic, am I still eligible for the bonus payment if everything goes smooth the next 7 days? I posted the PR a few hours after I got hired and made an extra push with what we discussed a day later, but it's been 4 days now. Thank you |
@Thanos30 don't worry about it. It's 3 business days and still eligible for bonus assuming it's merged by tomorrow. |
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.
@jasperhuangg LGTM! 🚀
✋ 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/jasperhuangg in version: 1.3.22-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.22-1 🚀
|
2 similar comments
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.22-1 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.22-1 🚀
|
Details
Added a check to make sure
reportRecipient
exists before showingParticipantLocalTime
Fixed Issues
$ #18979
$ #18979 (comment)
Tests
The title of the issue might be a little misleading, my proposal explains the issue.
<user> owes <amount>
messageThe above is not available to reproduce on other platforms, since it's not possible to sign out while in Request IOU on mobile devices.
Offline tests
The above steps work as they should in all types of network connections.
QA Steps
<user> owes <amount>
messagePR 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
Screen.Recording.2023-05-26.at.4.47.26.AM.mov
Mobile Web - Chrome
Screen.Recording.2023-05-26.at.5.02.22.AM.mov
Mobile Web - Safari
Screen.Recording.2023-05-26.at.5.02.22.AM.mov
Desktop
Screen.Recording.2023-05-26.at.4.56.47.AM.mov
iOS
Not Available
Android
Not Available