You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-09-06] [HOLD for payment 2023-09-04] [$1000] Web - Request a money - Clicking on the avatar open a wrong profile #24389
Please re-state the problem that we are trying to solve in this issue.
Clicking on the avatar opens a different profile.
What is the root cause of that problem?
In ReportActionItemSingle the MultipleAvatars component is inside a PressableWithoutFeedback even if you click outside the avatars you get the same result because it always calls showActorDetailswhich uses actorAccountID and in this case, we could use secondaryUserDetails information.
What changes do you think we should make in order to solve the problem?
Implement same as in group header which only shows the tooltips. We could do nothing in the showActorDetails something like:
Update 2: after Rocio's clarify we can leave the generic handler but here instead of showing user details we can send directly to the getParticipants path but leave the rest generic if any parent component requires specific implementation.
Create a new callback in MultipleAvatars called onAvatarClicked, when an element of the component is clicked we can send back the information of the icon using props.icons[i].
Create a handler in Avatar to check when it is clicked and send back the information
Finally remove the PressableWithoutFeedback from ReportActionItemSingle to avoid double click interaction.
What alternative solutions did you explore? (Optional)
I feel like if we fix this we should fix it everywhere at once if possible. For example I'd expect to open up the correct profile depending on the avatar I click in the header of a request too
@MitchExpensify for IOU report clicking the header doesn't show the profile/details page instead opens the chat report of the From. I believe it's expected behavior.
changed the title [-]Web - Request a money - Clicking on the avatar open a wrong profile[/-][+][$1000] Web - Request a money - Clicking on the avatar open a wrong profile[/+]on Aug 13, 2023
Activity
melvin-bot commentedon Aug 10, 2023
Triggered auto assignment to @MitchExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Aug 10, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)daordonez11 commentedon Aug 10, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Clicking on the avatar opens a different profile.
What is the root cause of that problem?
In
ReportActionItemSingletheMultipleAvatarscomponent is inside aPressableWithoutFeedbackeven if you click outside the avatars you get the same result because it always callsshowActorDetailswhich uses actorAccountID and in this case, we could use secondaryUserDetails information.What changes do you think we should make in order to solve the problem?
Update: After reviewing Mitch response the idea would be to solve the opening of a wrong profile here is my proposal on how to solve it.
ReportActionItemSingleshowAvatarProfile, which receives the information of an avatar and opens the profileUpdate 2: after Rocio's clarify we can leave the generic handler but here instead of showing user details we can send directly to the getParticipants path but leave the rest generic if any parent component requires specific implementation.
MultipleAvatarscalled onAvatarClicked, when an element of the component is clicked we can send back the information of the icon usingprops.icons[i].Avatarto check when it is clicked and send back the informationPressableWithoutFeedbackfromReportActionItemSingleto avoid double click interaction.What alternative solutions did you explore? (Optional)
spcheema commentedon Aug 11, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Clicking on the avatar opens a different profile.
What is the root cause of that problem?
The
MultipleAvatarscomponent is wrapped insidePressableWithoutFeedbackand shows the profile of theactorAccountID.So no matter what avatar is clicked, results is the same.
What changes do you think we should make in order to solve the problem?
In the case of iou report having multiple avatars, we can redirect to the details page similar to the multiple participant route.
Update showActorDetails call back to show multiple participants
const showActorDetails = useCallback(() => { if (isWorkspaceActor) { showWorkspaceDetails(props.report.reportID); } else { + if (displayAllActors) + { + Navigation.navigate(ROUTES.getReportParticipantsRoute(props.iouReport.reportID)); + return + } showUserDetails(props.action.delegateAccountID ? props.action.delegateAccountID : actorAccountID); } }, [isWorkspaceActor, props.report.reportID, actorAccountID, props.action.delegateAccountID]);On multiple participant pages check the report type and show owner details along with
props.action.delegateAccountID.const getAllParticipants = (report, personalDetails, translate) => { - const {participantAccountIDs} = report; + let participantAccountIDs = report.participantAccountIDs; + + if (ReportUtils.isIOUReport(report)) + { + participantAccountIDs = [report.ownerAccountID, ...participantAccountIDs]; + }What alternative solutions did you explore? (Optional)
PressableWithoutFeedbackcomponent inside the multiple avatars componentshowActorDetailsI won't prefer this approach because
MultipleAvatarsis used in many places and may cause regression.61.New.Expensify.-.14.August.2023.mp4
MitchExpensify commentedon Aug 11, 2023
I feel like if we fix this we should fix it everywhere at once if possible. For example I'd expect to open up the correct profile depending on the avatar I click in the header of a request too

spcheema commentedon Aug 12, 2023
@MitchExpensify for IOU report clicking the header doesn't show the profile/details page instead opens the chat report of the
From. I believe it's expected behavior.MitchExpensify commentedon Aug 13, 2023
Cool, I think I'd expect to open a profile anytime I click an avatar but that conversation can be had elsewhere
[-]Web - Request a money - Clicking on the avatar open a wrong profile[/-][+][$1000] Web - Request a money - Clicking on the avatar open a wrong profile[/+]melvin-bot commentedon Aug 13, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01bdaad0efa1ea99ef
melvin-bot commentedon Aug 13, 2023
Current assignee @MitchExpensify is eligible for the External assigner, not assigning anyone new.
66 remaining items
MitchExpensify commentedon Aug 31, 2023
I realize I issued payment too early, my mistake. Hopefully no regressions occur and we can sort out anything after the fact. Sorry about that!
spcheema commentedon Aug 31, 2023
@MitchExpensify yeah I just noticed it. Do you want me to refund?
pecanoro commentedon Sep 1, 2023
@MitchExpensify This issue had a regression, so the amounts are a bit off 🙈
MitchExpensify commentedon Sep 1, 2023
Gah, thanks @pecanoro. Just my luck that the only issue I've ever paid too early had a regression and the payment was wrong 😆
@spcheema yes if you could refund while I sort this out that would be great. Sorry for the bother 🙇
spcheema commentedon Sep 1, 2023
@MitchExpensify Done.
Isn’t regression considered on prod?🧐 or for issues/bugs?
Since this was more/less like a new feature.
MitchExpensify commentedon Sep 4, 2023
I'm not sure I follow this question. Mind rephrasing?
Seeing as we reduce C and C+ payment by 50% for regressions, and this issue had this regression, the updated payment summary is:
Reporting: @misgana96 $250 (Upwork)
C: @spcheema $500 (Upwork)
C+: @narefyev91 NA - Contractor
pecanoro commentedon Sep 4, 2023
It can be either, dev, stag or prod as long as the bug wasn't caught during the PR review process.
MitchExpensify commentedon Sep 6, 2023
Paid according to this update! Thanks everyone
spcheema commentedon Sep 6, 2023
Thanks @MitchExpensify
misgana96 commentedon Sep 6, 2023
Accepted. Thanks @MitchExpensify