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
[Payment Due 2023-12-21][$500] Web – Chat – Tooltip is out if hover the cursor on the mentioned user you have no conversation #31720
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:
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
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).
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.
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;
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.
📣 @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:
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.
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.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
📣 @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 📖
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.
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
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:
[@ntdiary] 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: ** No need **
[@ntdiary] Determine if we should create a regression test for this bug. Yes
[@ntdiary] 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.
[@laurenreidexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Regression test steps:
Open any chat on web/desktop platforms.
Mention a user that you never chat with before.
Hover the cursor on the mentioned user.
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. :)
Activity
[-]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[/+]melvin-bot commentedon Nov 22, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01fd8d4190c3d5d7a0
melvin-bot commentedon Nov 22, 2023
Triggered auto assignment to @laurenreidexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Nov 22, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Nov 22, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary (
External)tienifr commentedon Nov 22, 2023
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
iconprop here, the tooltip was not rendered:App/src/components/UserDetailsTooltip/BaseUserDetailsTooltip.web.js
Lines 83 to 85 in b30b555
What changes do you think we should make in order to solve the problem?
iconprop by usingOptionsListUtils.getAvatarsForAccountIDsas we have been using here:MentionUserRenderer:What alternative solutions did you explore? (Optional)
We should check all usages of
UserDetailsTooltipto make sure they cover the case of missing user details.bernhardoj commentedon Nov 22, 2023
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, oruserLogin.App/src/components/UserDetailsTooltip/BaseUserDetailsTooltip.web.js
Lines 83 to 96 in 856b6e7
For a user mention, we have set a fallback display name (personal detail) that should be used if we don't have the user
accountIDpersonal detail (which is true in our case).App/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js
Lines 75 to 80 in 856b6e7
App/src/components/UserDetailsTooltip/BaseUserDetailsTooltip.web.js
Lines 22 to 23 in 856b6e7
However, after #30342, the
userDisplayNameis retrieved fromReportUtils.getDisplayNameForParticipantwhich has its own logic to get the personal details, so the fallback detail we gave is unused.Notice that previously, we get the display name from
userDetailswhich 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.displayNameifReportUtils.getDisplayNameForParticipantreturns an empty string.mingybopeep commentedon Nov 22, 2023
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.
melvin-bot commentedon Nov 22, 2023
📣 @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:
Format:
18 remaining items
melvin-bot commentedon Dec 6, 2023
📣 @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 📖
bondydaa commentedon Dec 6, 2023
the only thing I want make sure is that
ReportUtils.getDisplayNameForParticipantdoesn't "leak" a user's name / personal details, as long as it just displays the email/login then that should be good.bernhardoj commentedon Dec 7, 2023
ReportUtils.getDisplayNameForParticipant returns the user display name if found. The fallback we add will show the login.
PR is ready
cc: @ntdiary
puneetlath commentedon Dec 8, 2023
Sorry for the delay, but I agree with the logic.
[-][$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[/+]laurenreidexpensify commentedon Dec 20, 2023
This has been on prod since 14 Dec #32632 (comment)
melvin-bot commentedon Dec 27, 2023
@bondydaa, @ntdiary, @bernhardoj, @laurenreidexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
laurenreidexpensify commentedon Dec 29, 2023
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
ntdiary commentedon Dec 29, 2023
Regression test steps:
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