-
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
Fix task owner and assignee custom avatar aren't showing #32113
Fix task owner and assignee custom avatar aren't showing #32113
Conversation
@alitoshmatov 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] |
Reviewing |
if (itemFullReport.ownerAccountID > 0) { | ||
participants.push(itemFullReport.ownerAccountID); | ||
} |
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 add comment explaining this part of the logic. And I couldn't find where this logic is coming from. Is there any documentation or indication of owner account id being 0 for non-task reports
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.
From my observation, ownerAccountID
of 0 means the report doesn't have an ownerAccountID
, for example, DM.
I just checked OptionsListUtils.getPersonalDetailsForAccountIDs
and it already ignores falsy account id.
App/src/libs/OptionsListUtils.js
Lines 163 to 167 in f65f38d
_.each(accountIDs, (accountID) => { | |
const cleanAccountID = Number(accountID); | |
if (!cleanAccountID) { | |
return; | |
} |
Should we just include it in the array without checking it? (it would be cleaner)
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, that makes sense
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
Reviewer Checklist
Screenshots/VideosAndroid: Nativeavatar-android.movAndroid: mWeb Chromeavatar-mweb.moviOS: Nativeavatar-ios.mp4iOS: mWeb Safariavatar-safari.mp4MacOS: Chrome / Safariavatar-web.movMacOS: Desktopavatar-desktop.mov |
@bernhardoj Can you resolve conflicts. When you done ping me, I will complete the review |
@alitoshmatov the code on
which only handles money request for now Lines 4102 to 4116 in 2e8de3f
Should we just remove the
These new changes will change the member list at the report details. |
@bernhardoj As we discussed earlier we don't want to affect members section in report details. Can we just apply current approach to this, like: const participants = [ReportUtils.getParticipantsIDs(itemFullReport), itemFullReport.ownerAccountID];
const participantsPersonalDetails = OptionsListUtils.getPersonalDetailsForAccountIDs(participants, personalDetails); The disadvantage of this is having duplicate of ownerAccountID, right? |
That should work. I think it won't be duplicated because App/src/libs/OptionsListUtils.js Lines 180 to 182 in 27fd4e2
|
@alitoshmatov Updated |
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.
Thank you, looks good and tests well
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@@ -118,7 +118,9 @@ function LHNOptionsList({ | |||
const transactionID = lodashGet(itemParentReportAction, ['originalMessage', 'IOUTransactionID'], ''); | |||
const itemTransaction = transactionID ? transactions[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`] : {}; | |||
const itemComment = draftComments[`${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${reportID}`] || ''; | |||
const participantsPersonalDetails = OptionsListUtils.getPersonalDetailsForAccountIDs(ReportUtils.getParticipantsIDs(itemFullReport), personalDetails); | |||
const participants = [ReportUtils.getParticipantsIDs(itemFullReport), itemFullReport.ownerAccountID]; |
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.
There's mistake here.
const participants = [ReportUtils.getParticipantsIDs(itemFullReport), itemFullReport.ownerAccountID]; | |
const participants = [...ReportUtils.getParticipantsIDs(itemFullReport), itemFullReport.ownerAccountID]; |
@bernhardoj are you able to raise quick fix?
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.
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.
My bad. Here is the PR.
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.
Thanks
🚀 Cherry-picked to staging by https://github.com/yuwenmemon in version: 1.4.7-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.4.8-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.8-3 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.8-3 🚀
|
Details
Fixed Issues
$ #31372
PROPOSAL: #31372 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
User A and User B have a custom avatar
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)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
Android: Native
Screen.Recording.2023-11-28.at.20.46.20.mov
Android: mWeb Chrome
Screen.Recording.2023-11-28.at.20.50.35.mov
iOS: Native
Screen.Recording.2023-11-28.at.20.45.17.mov
iOS: mWeb Safari
Screen.Recording.2023-11-28.at.20.46.02.mov
MacOS: Chrome / Safari
Screen.Recording.2023-11-28.at.20.37.54.mov
MacOS: Desktop
Screen.Recording.2023-11-28.at.20.44.42.mov