-
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
Remove all uses of actorEmail
as part of personalDetails migration
#21874
Conversation
actorEmail
@puneetlath 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] |
actorEmail
actorEmail
actorEmail
actorEmail
as part of personalDetails migration
@puneetlath addressed comments & fixed merge conflicts! |
reviewing as per request |
@0xmiroslav @puneetlath ready for re-review 🙏 |
@0xmiroslav please take the first pass. |
@@ -74,7 +74,7 @@ function ReportActionItemSingle(props) { | |||
const actorAccountID = props.action.actorAccountID; | |||
let {displayName} = props.personalDetailsList[actorAccountID] || {}; | |||
const {avatar, pendingFields} = props.personalDetailsList[actorAccountID] || {}; | |||
let actorHint = lodashGet(props.action, 'actorEmail', '').replace(CONST.REGEX.MERGED_ACCOUNT_PREFIX, ''); | |||
let actorHint = displayName.replace(CONST.REGEX.MERGED_ACCOUNT_PREFIX, ''); |
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.
Should we get email here from personal details list and if email is not present then fallback to login?
I think here we are trying to remove prefix from merged accounts emails
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.
Juuuust to be clear @MonilBhavsar do you mean, we should check the login
from personalDetailsList
first - and if that doesn't exist, we fall back to displayName
?
If that's what you meant, then yes I agree :D
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.
displayName
from personalDetailsList
always fallback to login
if display name is not set, isn't 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.
do you mean, we should check the login from personalDetailsList first - and if that doesn't exist, we fall back to displayName?
Yes correct! Exactly what I mean :D
displayName from personalDetailsList always fallback to login if display name is not set, isn't it?
Yes, in case display name is set it won't be login. And in that line we specifically want to process login(email). So we can first check if login exists, if not we can fallback to displayName.
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.
Updated!
displayName from personalDetailsList always fallback to login if display name is not set, isn't it?
Technically no, not always - for example in OpenPublicProfilePage
we won't default their displayName to login since you shouldn't know that at that point
Conflict arrived |
Conflict fixed, @MonilBhavsar addressed your comment 👍 |
Followed by lint failure 😁 |
Lint fixed 😅 Hopefully tests pass 🙏 |
Yep checks look happy, @MonilBhavsar @puneetlath @MariaHCD any of y'all wanna approve & merge? 🙏 |
@@ -251,7 +259,7 @@ function reopenTask(taskReportID, taskTitle) { | |||
statusNum: CONST.REPORT.STATUS.OPEN, | |||
lastVisibleActionCreated: reopenedTaskReportAction.created, | |||
lastMessageText: message, | |||
lastActorEmail: reopenedTaskReportAction.actorEmail, | |||
lastActorEmail: currentUserEmail, |
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.
NAB, I think we should still keep it as reopenedTaskReportAction.actorEmail
In case we change ReportUtils::buildOptimisticTaskReportAction()
in future and reopenedTaskReportAction
get's updated, this direct reference might introduce some bugs.
Same below
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.
Hmm I'm keen to completely get rid of actorEmail
AND we're getting rid of lastActorEmail
in this PR: #22008
So I think we'll keep it like this for now 🙏
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
The App is crashing on main when requesting money from a new user with the error below: Fix here |
🚀 Deployed to staging by https://github.com/Beamanator in version: 1.3.37-0 🚀
|
This caused a regression. See #22286 (comment) |
This is a good example why we should always retest after merging from main. |
@Beamanator I closed my fix PR since we're reverting this |
Welp looks like this was fixed in #22269 so I'll make an un-revert & add @luacmartins 's changes to make sure we're good to go on the next one 🙏 Thanks everyone! |
Re-do PR is up here: #22327 |
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.37-7 🚀
|
cc @puneetlath - this is just another step along our way to completely remove email addresses from reportActions
Details
As part of the personalDetails migration, I removed any uses of
reportAction_*.actorEmail
.actorAccountID
Fixed Issues
$ Related to #19007
Tests
The changes in this PR are mainly to tests or generic changes. Other changes were mainly related to threads & tasks so I'll focus on testing those for this PR.
Offline 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
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android