Skip to content

[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

Closed

Description

@izarutskaya

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open a chat room from LHN
  2. request a money
  3. hover the avatar and click to open the profile

Expected Result:

the profile should be correct

Actual Result:

the wrong profile is opened

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.52-5

Reproducible in staging?: Y

Reproducible in production?: N

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Screenshare.-.2023-08-10.9_43_12.PM.mp4
Recording.1160.mp4

Expensify/Expensify Issue URL:

Issue reported by: @misgana96

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691692716326279

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bdaad0efa1ea99ef
  • Upwork Job ID: 1690773617761824768
  • Last Price Increase: 2023-08-13
  • Automatic offers:
    • spcheema | Contributor | 26150022

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 10, 2023
  2. melvin-bot commented on Aug 10, 2023

    @melvin-bot

    Triggered auto assignment to @MitchExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. melvin-bot commented on Aug 10, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. daordonez11 commented on Aug 10, 2023

    @daordonez11
    Contributor

    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 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?

    1. Implement same as in group header which only shows the tooltips. We could do nothing in the showActorDetails something like:
     const showActorDetails = useCallback(() => {
            if (displayAllActors) {
                return
            }
            if (isWorkspaceActor) {
                showWorkspaceDetails(props.report.reportID);
            } else {
                showUserDetails(props.action.delegateAccountID ? props.action.delegateAccountID : actorAccountID);
            }
        },
    1. Implement a new handler to check which element was clicked in MultipleAvatars and return the details of the clicked user

    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.

    • Create a new method in ReportActionItemSingle showAvatarProfile, which receives the information of an avatar and opens the profile
    const showAvatarProfile = useCallback((avatarInfo) => {
           if (!avatarInfo) {
               return
           }
          showUserDetails(avatarInfo.id);
       },

    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)

  5. spcheema commented on Aug 11, 2023

    @spcheema
    Contributor

    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 MultipleAvatars component is wrapped inside PressableWithoutFeedback and shows the profile of the actorAccountID.

    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)

    • Implement PressableWithoutFeedback component inside the multiple avatars component
    • Add a new prop to multiple avatars component for clickable callback which will showActorDetails

    I won't prefer this approach because MultipleAvatars is used in many places and may cause regression.

    image
    61.New.Expensify.-.14.August.2023.mp4
  6. MitchExpensify commented on Aug 11, 2023

    @MitchExpensify
    Contributor

    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
    image

  7. spcheema commented on Aug 12, 2023

    @spcheema
    Contributor

    @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.

  8. MitchExpensify commented on Aug 13, 2023

    @MitchExpensify
    Contributor

    Cool, I think I'd expect to open a profile anytime I click an avatar but that conversation can be had elsewhere

  9. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 13, 2023
  10. 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
  11. melvin-bot commented on Aug 13, 2023

    @melvin-bot
  12. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 13, 2023
  13. melvin-bot commented on Aug 13, 2023

    @melvin-bot

    Current assignee @MitchExpensify is eligible for the External assigner, not assigning anyone new.

  14. 66 remaining items

  15. MitchExpensify commented on Aug 31, 2023

    @MitchExpensify
    Contributor

    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!

  16. spcheema commented on Aug 31, 2023

    @spcheema
    Contributor

    @MitchExpensify yeah I just noticed it. Do you want me to refund?

  17. pecanoro commented on Sep 1, 2023

    @pecanoro
    Contributor

    @MitchExpensify This issue had a regression, so the amounts are a bit off 🙈

  18. MitchExpensify commented on Sep 1, 2023

    @MitchExpensify
    Contributor

    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 🙇

  19. spcheema commented on Sep 1, 2023

    @spcheema
    Contributor

    image

    @MitchExpensify Done.

    Isn’t regression considered on prod?🧐 or for issues/bugs?

    Since this was more/less like a new feature.

  20. MitchExpensify commented on Sep 4, 2023

    @MitchExpensify
    Contributor

    Isn’t regression considered on prod?🧐 or for issues/bugs?

    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

  21. pecanoro commented on Sep 4, 2023

    @pecanoro
    Contributor

    Isn’t regression considered on prod?🧐 or for issues/bugs?

    It can be either, dev, stag or prod as long as the bug wasn't caught during the PR review process.

  22. MitchExpensify commented on Sep 6, 2023

    @MitchExpensify
    Contributor

    Paid according to this update! Thanks everyone

  23. spcheema commented on Sep 6, 2023

    @spcheema
    Contributor
  24. misgana96 commented on Sep 6, 2023

    @misgana96

    Accepted. Thanks @MitchExpensify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions