Skip to content
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

[HOLD for payment 2023-08-01] [$1000] [HOLD #20512] Web - Mentions don't show the new tooltip on hover #21683

Closed
6 tasks done
kbecciv opened this issue Jun 27, 2023 · 38 comments
Closed
6 tasks done
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jun 27, 2023

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 the app.
  2. Open a chat.
  3. Mention a user using the @ symbol. Send the message.
  4. Hover over the mention. It shows the old tooltip with only email.

Expected Result:

Hovering on mentions should show the new tooltip with email, avatar and display name.

Actual Result:

Hovering on mentions shows the old tooltip with only email.

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: 1.3.30-5
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
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-06-23.at.2.39.46.PM.2.mov
Desktop.2023.06.26.-.18.09.42.15.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Nikhil-Vats
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687512682797759

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0123436a96eaad8d30
  • Upwork Job ID: 1679594587000627200
  • Last Price Increase: 2023-07-13
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 27, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 27, 2023

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

@Nikhil-Vats
Copy link
Contributor

Nikhil-Vats commented Jun 27, 2023

Proposal

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

Mentions don't show new tooltip on hover.

What is the root cause of that problem?

We still use the old tooltip component for mentions.

<Tooltip text={loginWithoutLeadingAt}>
<TextLink
// eslint-disable-next-line react/jsx-props-no-spreading
{...defaultRendererProps}
href={ROUTES.getDetailsRoute(loginWithoutLeadingAt)}
style={[_.omit(props.style, 'color'), StyleUtils.getMentionStyle(isOurMention), {color: StyleUtils.getMentionTextColor(isOurMention)}]}
onPress={() => showUserDetails(loginWithoutLeadingAt)}
// Add testID so it is NOT selected as an anchor tag by SelectionScraper
testID="span"
>
<TNodeChildrenRenderer tnode={props.tnode} />
</TextLink>
</Tooltip>

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

Use the new UserDetailsTooltip in MentionUserRenderer and pass accountID to it.

accountID is not available in MentionUserRenderer so to get accountID from login use getAccountIDsByLogins from PersonalDetailsUtils -

const accountID = PersonalDetailsUtils.getAccountIDsByLogins([loginWithoutLeadingAt])[0];

We can also make a new function for getting accountID from login for a single user -

function getAccountIDByLogin(login) {
  const currentDetail = _.find(personalDetails, (detail) => detail.login === login);
  if (!currentDetail) {
      // generate an account ID because in this case the detail is probably new, so we don't have a real accountID yet
      return UserUtils.generateAccountID();
  }
  return Number(currentDetail.accountID);
}

Then, to keep code DRY we can use this function in getAccountIDsByLogins.

What alternative solutions did you explore? (Optional)

NA

Result -

Screen.Recording.2023-06-27.at.7.07.11.PM.mov

@alitoshmatov
Copy link
Contributor

Proposal

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

Web - Mentions don't show the new tooltip on hover

What is the root cause of that problem?

We are using simple tooltip rather than UserDetailsTooltip

<Tooltip text={loginWithoutLeadingAt}>
<TextLink
// eslint-disable-next-line react/jsx-props-no-spreading
{...defaultRendererProps}
href={ROUTES.getDetailsRoute(loginWithoutLeadingAt)}
style={[_.omit(props.style, 'color'), StyleUtils.getMentionStyle(isOurMention), {color: StyleUtils.getMentionTextColor(isOurMention)}]}
onPress={() => showUserDetails(loginWithoutLeadingAt)}
// Add testID so it is NOT selected as an anchor tag by SelectionScraper
testID="span"
>
<TNodeChildrenRenderer tnode={props.tnode} />
</TextLink>
</Tooltip>

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

We should use UserDetailsTooltip but since it is mentions we don't have accountID available for us to supply to tooltip, but it is planned to migrate to accountID based mentions which then solves this issue we can put this issue on hold for this migration and then solve this issue. If we have to till then we can provide fallbackUserDetails for UserDetailsTooltip with following values

           {
                login,
                displayName: login,
                avatar: UserUtils.getDefaultAvatar(),
            }

What alternative solutions did you explore? (Optional)

@Christinadobrzyn
Copy link
Contributor

Might be fixed with this job- #20716 (comment) - asking

@Nikhil-Vats
Copy link
Contributor

@Christinadobrzyn this issue is for the missing tooltip for mentions in chat messages.

The issue that you referenced is for missing tooltip for chats in LHN.

I think both are different.

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Jun 27, 2023

There are some big changes to tooltip happening in this GH -#20512 (related to threads here - https://github.com/Expensify/Expensify/issues/290271)

I'm going to put on hold to see if it's resolved after this

@Christinadobrzyn Christinadobrzyn changed the title Web - Mentions don't show the new tooltip on hover [HOLD #20512] Web - Mentions don't show the new tooltip on hover Jun 27, 2023
@Christinadobrzyn Christinadobrzyn added Weekly KSv2 and removed Daily KSv2 labels Jun 27, 2023
@Christinadobrzyn
Copy link
Contributor

still on hold for #20512

@melvin-bot melvin-bot bot added the Overdue label Jul 12, 2023
@Christinadobrzyn
Copy link
Contributor

This is almost in production - #20512 - moving to daily

@melvin-bot melvin-bot bot removed the Overdue label Jul 12, 2023
@Christinadobrzyn Christinadobrzyn added Daily KSv2 and removed Weekly KSv2 labels Jul 12, 2023
@Christinadobrzyn
Copy link
Contributor

#20512 in production - testing this again it's still happening. Adding External

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Jul 13, 2023
@melvin-bot melvin-bot bot changed the title [HOLD #20512] Web - Mentions don't show the new tooltip on hover [$1000] [HOLD #20512] Web - Mentions don't show the new tooltip on hover Jul 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 13, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0123436a96eaad8d30

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 13, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 13, 2023

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

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Jul 14, 2023

I'm going to be ooo until July 31st so going to unassign and assign a new teammate.

At this time, we're receiving and reviewing proposals. I'll take this back when I'm back if it's still open

@Christinadobrzyn Christinadobrzyn removed the Bug Something is broken. Auto assigns a BugZero manager. label Jul 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

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

Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

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

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 📖

@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

📣 @Nikhil-Vats 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Upwork job

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 20, 2023
@Nikhil-Vats
Copy link
Contributor

Contributor details
Your Expensify account email: whivats5499@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~015012a47c23b056bc

@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 25, 2023
@melvin-bot melvin-bot bot changed the title [$1000] [HOLD #20512] Web - Mentions don't show the new tooltip on hover [HOLD for payment 2023-08-01] [$1000] [HOLD #20512] Web - Mentions don't show the new tooltip on hover Jul 25, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.44-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-08-01. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

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:

  • [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
  • [@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@mollfpr] Determine if we should create a regression test for this bug.
  • [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@tjferriss / @Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@tjferriss
Copy link
Contributor

Offers have been sent to everyone via Upworks. @mollfpr can you get started on the checklist when you have time?

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jul 31, 2023
@Christinadobrzyn
Copy link
Contributor

I'm back from ooo - happy to take this back @tjferriss - even though we're close to done - whatever is best for you!

@tjferriss
Copy link
Contributor

tjferriss commented Aug 1, 2023

@Christinadobrzyn I can finish this one up. All that's left is the payments and checklist.

@tjferriss
Copy link
Contributor

All payments have been made via Upworks. @mollfpr can you complete the checklist?

@mollfpr
Copy link
Contributor

mollfpr commented Aug 2, 2023

@tjferriss Thank you! Completing it now 🚀

@mollfpr
Copy link
Contributor

mollfpr commented Aug 2, 2023

[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

No offending PR. It's not caught while working on the new user detail tooltip component.

[@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

In general, this is not a bug but rather an improvement for the tooltip to show the user detail. So the regression step should be enough.

[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Only testable on the desktop or web

  1. Open the app
  2. Go to any chat
  3. Mention any user by typing @ in the composer and selecting anyone from the list
  4. Hover the cursor on the mentioned user
  5. Verify that the user detail displayed inside the tooltip
  6. Now mention someone not in the mention suggestion by typing their full email like - @unexistingperson@gmail.com
  7. Hover the cursor on the mentioned user
  8. Verify that the user detail displayed inside the tooltip
  9. 👍 or 👎

@tjferriss
Copy link
Contributor

I've submitted the regression test. We're good to close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants