-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Find LHN lastActorDetails from global personal details rather than the participants list #14008
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
Conversation
|
@eVoloshchak @joelbettner 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] |
| } | ||
|
|
||
| const lastActorDetails = personalDetailMap[report.lastActorEmail] || null; | ||
| const lastActorDetails = personalDetails[report.lastActorEmail] || null; |
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.
This is the actual change that fixes the issue - the rest of the changes are just renaming variables in an attempt to make them more clear.
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 a little fuzzy on why we are doing some of this.
- Why do we bother building the
participantPersonalDetailListif we already have all that information in thepersonalDetails? - If we build
participantPersonalDetailListbecause thegetPersonalDetailsForLoginsmethod gets personal details that might not currently be inpersonalDetails, shouldn't we useparticipantPersonalDetailListfor getting thelastActorDetailsas well? We knowreport.lastActorEmailwill be inparticipantPersonalDetailList, how do we know thatreport.lastActorEmailwill always be inpersonalDetails?
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 bother building the participantPersonalDetailList if we already have all that information in the personalDetails?
Answered in the above comment!
If we build participantPersonalDetailList because the getPersonalDetailsForLogins method gets personal details that might not currently be in personalDetails, . . .
Ah, that's not correct - take a look at the implementation for getPersonalDetailsForLogins - all that method is doing is pulling the Personal Details we want from the pesonalDetails object in Onyx. So, all Personal Details in participantPersonalDetailList will be in personalDetails.
|
@eVoloshchak @joelbettner bump! |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-01-09.at.20.23.14.movMobile Web - ChromeScreen_Recording_20230109-202728_Chrome.mp4Mobile Web - SafariScreen.Recording.2023-01-09.at.20.24.54.movDesktopScreen.Recording.2023-01-09.at.20.22.18.moviOSScreen.Recording.2023-01-09.at.20.25.54.movAndroidScreen_Recording_20230109-202849_New.Expensify.mp4 |
eVoloshchak
left a 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.
Looks good
| } | ||
|
|
||
| const lastActorDetails = personalDetailMap[report.lastActorEmail] || null; | ||
| const lastActorDetails = personalDetails[report.lastActorEmail] || null; |
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 a little fuzzy on why we are doing some of this.
- Why do we bother building the
participantPersonalDetailListif we already have all that information in thepersonalDetails? - If we build
participantPersonalDetailListbecause thegetPersonalDetailsForLoginsmethod gets personal details that might not currently be inpersonalDetails, shouldn't we useparticipantPersonalDetailListfor getting thelastActorDetailsas well? We knowreport.lastActorEmailwill be inparticipantPersonalDetailList, how do we know thatreport.lastActorEmailwill always be inpersonalDetails?
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
|
🚀 Deployed to staging by @joelbettner in version: 1.2.52-4 🚀
|
|
🚀 Deployed to staging by @joelbettner in version: 1.2.52-4 🚀
|
1 similar comment
|
🚀 Deployed to staging by @joelbettner in version: 1.2.52-4 🚀
|
|
🚀 Deployed to production by @Julesssss in version: 1.2.52-4 🚀
|
cc @tgolen
Details
We were unnecessarily grabbing personal details from the list of participants in the report. So if a user was removed from the report this would mean we would not be able to find their personal details. At the same time we already had the global
personalDetailsmap in scope. So, just use that instead.Fixed Issues
$ #13858
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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.Screenshots/Videos
Web
Kapture.2023-01-04.at.18.08.06.mp4
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android