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-07-10] [$1000] Web - Tooltip is not displayed if hovered the users which are down the list #21099
changed the title [-]Web - Tooltip is not displayed if hovered the users which are down the list[/-][+][$1000] Web - Tooltip is not displayed if hovered the users which are down the list[/+]on Jun 20, 2023
Please re-state the problem that we are trying to solve in this issue.
For some elements in the search (personalDetails) the tooltip is not displayed if hovering the image
What is the root cause of that problem?
The searchPage has a list of OptionRows, each element uses a component called MultipleAvatars to render de image, even though the prop of shouldOptionShowTooltip is calculated right this line calculates the tooltip content: const tooltipTexts = props.shouldShowTooltip ? _.pluck(props.icons, 'name') : []; using the property name in the icons array.
For the section of personalDetails in the searchPage the icons are calculated using the method getIcons in ReportUtils.js
Since there are no reports the method only returns the source of the image.
What changes do you think we should make in order to solve the problem?
Update getIcons and include a new parameter called defaultName
Image of solution working in personalDetails section:
Video of solution working in all list:
Tooltip.working.in.whole.search.results.webm
What alternative solutions did you explore? (Optional)
At the beginning, I thought this was a backend issue but after seeing Onyx I found that it was about handling the data stored.
Other solution might work is in OptionRow component preprocess the data of the row and force the inclusion of name on each icon using the information that arrives in props. Something like including this.props.option.text as the name in each element of this.props.icons. It just seems like a lot of single resp code instead of tackling directly in the root.
Please re-state the problem that we are trying to solve in this issue.
Web - Tooltip is not displayed if hovered the users which are down the list
What is the root cause of that problem?
Easy step to reproduce this bug is - Create a workspace invite non-existent user, after that try creating the group ( the new user will appear) and it will not have tooltip.
The root cause of this problem is that some rows doesn't have UserDetailTooltip wrapped around them.
This mainly happens because when we send option prop to OptionRow it has icons field, and in that - name is empty.
While calculating the icons -
That's why name for icon being empty - we don't wrap it with UserDetailTooltip.
What changes do you think we should make in order to solve the problem?
We need to handle the case for getting the icons when the report is empty, using result.participantsList, we have a method getIconsForParticipants() we can pass result.participantList (it will be array of accountID) and personalDetails and get the icons.
This will ensure that all the users have the correct set of icons.
Example -
result.icons = report ? <get icons by given way> : <use geticonsForParticipants()>
What alternative solutions did you explore? (Optional)
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:
[@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
Probably this PR or might have caused by some PR involving accountID migration.
[@sobitneupane] 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:
[@sobitneupane] Determine if we should create a regression test for this bug.
Yes.
[@sobitneupane] 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.
@daordonez11 - what's your profile in Upwork? I can't find you there. @priyeshshah11 - what's your profile in Upwork? I can't find you there. @sobitneupane - I sent you an offer in Upwork!
@sobitneupane, I don't see a payment request from you in Upwork, please accept the offer I sent you today, and I will process the payment thorough Upwork.
Activity
melvin-bot commentedon Jun 20, 2023
Triggered auto assignment to @isabelastisser (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jun 20, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)isabelastisser commentedon Jun 20, 2023
I can reproduce this!
[-]Web - Tooltip is not displayed if hovered the users which are down the list[/-][+][$1000] Web - Tooltip is not displayed if hovered the users which are down the list[/+]melvin-bot commentedon Jun 20, 2023
Job added to Upwork: https://www.upwork.com/jobs/~018ca8b2c30604ca26
melvin-bot commentedon Jun 20, 2023
Current assignee @isabelastisser is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jun 20, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (
External)daordonez11 commentedon Jun 21, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
For some elements in the search (personalDetails) the tooltip is not displayed if hovering the image
What is the root cause of that problem?
The searchPage has a list of OptionRows, each element uses a component called MultipleAvatars to render de image, even though the prop of
shouldOptionShowTooltipis calculated right this line calculates the tooltip content:const tooltipTexts = props.shouldShowTooltip ? _.pluck(props.icons, 'name') : [];using the propertynamein the icons array.For the section of personalDetails in the searchPage the icons are calculated using the method getIcons in ReportUtils.js
Since there are no reports the method only returns the source of the image.
What changes do you think we should make in order to solve the problem?
Update getIcons and include a new parameter called defaultName
So it can be sent in this line
Image of solution working in personalDetails section:
Video of solution working in all list:
Tooltip.working.in.whole.search.results.webm
What alternative solutions did you explore? (Optional)
At the beginning, I thought this was a backend issue but after seeing Onyx I found that it was about handling the data stored.
Other solution might work is in OptionRow component preprocess the data of the row and force the inclusion of name on each icon using the information that arrives in props. Something like including
this.props.option.textas the name in each element ofthis.props.icons. It just seems like a lot of single resp code instead of tackling directly in the root.BhuvaneshPatil commentedon Jun 21, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web - Tooltip is not displayed if hovered the users which are down the list
What is the root cause of that problem?
Easy step to reproduce this bug is - Create a workspace invite non-existent user, after that try creating the group ( the new user will appear) and it will not have tooltip.
The root cause of this problem is that some rows doesn't have
UserDetailTooltipwrapped around them.This mainly happens because when we send
optionprop toOptionRowit hasiconsfield, and in that -nameis empty.While calculating the icons -
App/src/libs/OptionsListUtils.js
Lines 514 to 521 in 0b7455f
We call
getIcons()method - And if the user hasn't take a part in any conversation the report is null or probablypolicyExpenseChartApp/src/libs/ReportUtils.js
Lines 715 to 815 in 0b7455f
We return -
App/src/libs/ReportUtils.js
Lines 716 to 720 in 0b7455f
as it never reaches the -
App/src/libs/ReportUtils.js
Line 814 in 0b7455f
That's why
namefor icon being empty - we don't wrap it withUserDetailTooltip.What changes do you think we should make in order to solve the problem?
We need to handle the case for getting the icons when the report is empty, using
result.participantsList, we have a methodgetIconsForParticipants()we can passresult.participantList(it will be array ofaccountID) andpersonalDetailsand get the icons.This will ensure that all the users have the correct set of icons.
Example -
What alternative solutions did you explore? (Optional)
48 remaining items
sobitneupane commentedon Jul 10, 2023
Probably this PR or might have caused by some PR involving accountID migration.
https://expensify.slack.com/archives/C049HHMV9SM/p1688977644296659
Yes.
#21099 (comment)
sobitneupane commentedon Jul 10, 2023
Regression Test Proposal:
Do we agree 👍 or 👎
sobitneupane commentedon Jul 10, 2023
Payment Requested on Expensify.
isabelastisser commentedon Jul 10, 2023
@sobitneupane I will review and process the payment by EOD.
isabelastisser commentedon Jul 11, 2023
@daordonez11 - what's your profile in Upwork? I can't find you there.
@priyeshshah11 - what's your profile in Upwork? I can't find you there.
@sobitneupane - I sent you an offer in Upwork!
priyeshshah11 commentedon Jul 11, 2023
I think you might have wrongly tagged me instead of @priya-zha
sobitneupane commentedon Jul 11, 2023
@isabelastisser I have requested payment and will be paid through Expensify App.
isabelastisser commentedon Jul 11, 2023
@priya-zha, I sent you an offer in Upwork.
@sobitneupane, I don't see a payment request from you in Upwork, please accept the offer I sent you today, and I will process the payment thorough Upwork.
isabelastisser commentedon Jul 11, 2023
https://github.com/Expensify/Expensify/issues/299030
daordonez11 commentedon Jul 11, 2023
@isabelastisser https://www.upwork.com/freelancers/~01e96b8da58232f028 here is my link! thanks
anmurali commentedon Jul 11, 2023
Paid @sobitneupane
isabelastisser commentedon Jul 11, 2023
All set!