Skip to content

[Payment Due 2023-12-21][$500] Web – Chat – Tooltip is out if hover the cursor on the mentioned user you have no conversation #31720

Closed

Description

@kbecciv

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


Version Number: 1.4.2.0
Reproducible in staging?: y
Reproducible in production?: y
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in with any Gmail account.
  3. Go to any chat
  4. Mention any user you have no conversation yet by typing @ in the composer and selecting from the list.
  5. Hover the cursor on the mentioned user.

Expected Result:

The user detail displayed inside the tooltip.

Actual Result:

Tooltip is out if hover the cursor on the mentioned user you have no conversation yet.

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6287369_1700668851348.Tooltip_is_out.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fd8d4190c3d5d7a0
  • Upwork Job ID: 1727358226516967424
  • Last Price Increase: 2023-11-29
  • Automatic offers:
    • ntdiary | Reviewer | 27989202
    • bernhardoj | Contributor | 27989203

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 22, 2023
  2. changed the title [-]Web – Chat – Tooltip is out if hover the cursor on the mentioned user you have no conversation[/-] [+][$500] Web – Chat – Tooltip is out if hover the cursor on the mentioned user you have no conversation[/+] on Nov 22, 2023
  3. melvin-bot commented on Nov 22, 2023

    @melvin-bot
  4. melvin-bot commented on Nov 22, 2023

    @melvin-bot

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

  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 22, 2023
  6. melvin-bot commented on Nov 22, 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
  7. melvin-bot commented on Nov 22, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary (External)

  8. tienifr commented on Nov 22, 2023

    @tienifr
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Tooltip is out if hover the cursor on the mentioned user you have no conversation

    What is the root cause of that problem?

    Because the personal details for that new account was not in Onyx yet and we did not pass the required icon prop here, the tooltip was not rendered:

    if (!props.icon && !userDisplayName && !userLogin) {
    return props.children;
    }

    What changes do you think we should make in order to solve the problem?

    1. Add the required icon prop by using OptionsListUtils.getAvatarsForAccountIDs as we have been using here:
    const icons = OptionsListUtils.getAvatarsForAccountIDs([accountID], props.personalDetails, {[displayNameOrLogin]: accountID})
    1. Use it in MentionUserRenderer:
    <UserDetailsTooltip
        accountID={icons}
        icon={icons[0]}
        fallbackUserDetails={{
            displayName: icons[0].name,
        }}
    >

    What alternative solutions did you explore? (Optional)

    We should check all usages of UserDetailsTooltip to make sure they cover the case of missing user details.

  9. bernhardoj commented on Nov 22, 2023

    @bernhardoj
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    If we mention a user whom we never had a chat with before, hovering over it won't show a tooltip.

    What is the root cause of that problem?

    This is a regression from #30342. For the tooltip to show, we need to have either props.icon, userDisplayName, or userLogin.

    if (!props.icon && !userDisplayName && !userLogin) {
    return props.children;
    }
    return (
    <Tooltip
    shiftHorizontal={props.shiftHorizontal}
    renderTooltipContent={renderTooltipContent}
    renderTooltipContentKey={[userDisplayName, userLogin]}
    shouldHandleScroll
    >
    {props.children}
    </Tooltip>
    );

    For a user mention, we have set a fallback display name (personal detail) that should be used if we don't have the user accountID personal detail (which is true in our case).

    <UserDetailsTooltip
    accountID={accountID}
    fallbackUserDetails={{
    displayName: displayNameOrLogin,
    }}
    >

    const userDetails = lodashGet(personalDetails, props.accountID, props.fallbackUserDetails);
    let userDisplayName = ReportUtils.getDisplayNameForParticipant(props.accountID);

    However, after #30342, the userDisplayName is retrieved from ReportUtils.getDisplayNameForParticipant which has its own logic to get the personal details, so the fallback detail we gave is unused.

    image

    Notice that previously, we get the display name from userDetails which contains the user's personal detail if exists, or the fallback personal detail.

    What changes do you think we should make in order to solve the problem?

    We should fall back to userDetails.displayName if ReportUtils.getDisplayNameForParticipant returns an empty string.

    let userDisplayName = ReportUtils.getDisplayNameForParticipant(props.accountID) || userDetails.displayName;
    
  10. mingybopeep commented on Nov 22, 2023

    @mingybopeep

    Contributor details
    Your Expensify account email: harrymenen@gmail.com
    Upwork Profile Link: https://www.upwork.com/en-gb/freelancers/~0189ace31b95336fbb

    When tagging a non-existent user, the userinfo tool tip fails to render.

    This is caused by the tooltip expecting user details to exist - a hard dependency.

    Solution: When retrieving user data to populate the tooltip, users for whom no user data is returned ought to fall back to placeholder user info. This would solve the issue.

  11. melvin-bot commented on Nov 22, 2023

    @melvin-bot

    📣 @mingybopeep! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  12. 18 remaining items

  13. melvin-bot commented on Dec 6, 2023

    @melvin-bot

    📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

    Offer link
    Upwork job
    Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
    Keep in mind: Code of Conduct | Contributing 📖

  14. bondydaa commented on Dec 6, 2023

    @bondydaa
    Contributor

    the only thing I want make sure is that ReportUtils.getDisplayNameForParticipant doesn't "leak" a user's name / personal details, as long as it just displays the email/login then that should be good.

  15. bernhardoj commented on Dec 7, 2023

    @bernhardoj
    Contributor

    ReportUtils.getDisplayNameForParticipant doesn't "leak" a user's name / personal details,

    ReportUtils.getDisplayNameForParticipant returns the user display name if found. The fallback we add will show the login.

    PR is ready

    cc: @ntdiary

  16. puneetlath commented on Dec 8, 2023

    @puneetlath
    Contributor

    Sorry for the delay, but I agree with the logic.

  17. changed the title [-][$500] Web – Chat – Tooltip is out if hover the cursor on the mentioned user you have no conversation[/-] [+][Payment Due 2023-12-21][$500] Web – Chat – Tooltip is out if hover the cursor on the mentioned user you have no conversation[/+] on Dec 20, 2023
  18. laurenreidexpensify commented on Dec 20, 2023

    @laurenreidexpensify
    Contributor

    This has been on prod since 14 Dec #32632 (comment)

  19. melvin-bot commented on Dec 27, 2023

    @melvin-bot

    @bondydaa, @ntdiary, @bernhardoj, @laurenreidexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  20. laurenreidexpensify commented on Dec 29, 2023

    @laurenreidexpensify
    Contributor

    Payment Summary:

    Contributor; $500 @bernhardoj paid in Upwork
    C+ review: $500 @ntdiary paid in Upwork

    @ntdiary can you please complete a checklist and confirm if we need a regression test? Thanks

  21. ntdiary commented on Dec 29, 2023

    @ntdiary
    Contributor

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    Regression test steps:

    1. Open any chat on web/desktop platforms.
    2. Mention a user that you never chat with before.
    3. Hover the cursor on the mentioned user.
    4. Verify the tooltip shows.

    Considering this is an edge regression case for PR #30342 and a suggestion in Slack regarding regression tests, I personally think it's fine to create a regression test for this issue. :)

    cc @laurenreidexpensify

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions