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
[$1000] Web - User details tooltip in workspace members list is different #22062
Tooltip should show display name in bold and login in gray
Actual Result:
Only login is shown in gray, no display name
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.35-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
The icons prop is passed to <OptionRow/> which passes the data in icons prop to <MultipleAvatar/> component which finally renders the <UserDetailsTooltip/>
<UserDetaisTooltip/> fetches the display name using the accountID which it expects in its icons prop.
So when we don't pass accountID in the icons prop of <OptionRow/>, missing id field finally lands in <UserDetailsTooltip/> because of which it fails to render the display name.
What changes do you think we should make in order to solve the problem?
As explained above, icons prop expects an id field which carries accountID for that member, so we need to provide that.
We are using item object to render details of each member which already has the accountID stored in it. We are also using that accountID to fetch the avatar of that member. So along with that, we can pass it to icons prop too to solve our issue.
changed the title [-]Web - User details tooltip in workspace members list is different[/-][+][$1000] Web - User details tooltip in workspace members list is different[/+]on Jul 4, 2023
Please re-state the problem that we are trying to solve in this issue.
The tooltip in the WorkspaceMembersPage is missing displayName
What is the root cause of that problem?
Coming from the PR #21696, where I explain the PR that introduced this issue. I included the fix of searching by ID in MultipleAvatars in my previous PR, but the actual issue is not sending the id, the real issue here is the inconsistency between different pages and components and duplicated code. My original issue was in the search page. Even though sending the id is a workaround, the problem is not reusing the code that already exists for solving this: getIcons in the ReportUtils class, in the future someone could change the code and cause a side effect like this again. Hence, avoiding the anti-pattern of duplicating code is my suggestion. In the future if we want to change how the icon information is loaded we only have to change a single place for easier refactors. The root cause is this commit where getDisplayNameForParticipant was updated to depend on accountID instead of login, that change introduced this issue.
What changes do you think we should make in order to solve the problem?
Remove the manual creation of the icons in WorkspaceMembersPage
Hello all,
These bugs were fixed by another pr but I proposed the solutions weeks before, also I was assigned the issue too?
And delay was due to proposal review process.
Activity
melvin-bot commentedon Jul 2, 2023
Triggered auto assignment to @dylanexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 2, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)kbecciv commentedon Jul 2, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
user details tooltip in workspace members list is different, display name is not present
What is the root cause of that problem?
Root cause of the issue is the missing accountID in the icons prop of
<OptionRow/>hereApp/src/pages/workspace/WorkspaceMembersPage.js
Lines 323 to 340 in c0ece67
The icons prop is passed to
<OptionRow/>which passes the data in icons prop to<MultipleAvatar/>component which finally renders the<UserDetailsTooltip/><UserDetaisTooltip/>fetches the display name using the accountID which it expects in its icons prop.App/src/components/MultipleAvatars.js
Line 83 in c0ece67
So when we don't pass accountID in the icons prop of
<OptionRow/>, missing id field finally lands in<UserDetailsTooltip/>because of which it fails to render the display name.What changes do you think we should make in order to solve the problem?
As explained above, icons prop expects an
idfield which carries accountID for that member, so we need to provide that.We are using item object to render details of each member which already has the accountID stored in it. We are also using that accountID to fetch the avatar of that member. So along with that, we can pass it to icons prop too to solve our issue.
Results
bandicam.2023-07-01.15-17-29-480.mp4
What alternative solutions did you explore? (Optional)
None
[-]Web - User details tooltip in workspace members list is different[/-][+][$1000] Web - User details tooltip in workspace members list is different[/+]melvin-bot commentedon Jul 4, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01c11ba48600bf6205
melvin-bot commentedon Jul 4, 2023
Current assignee @dylanexpensify is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jul 4, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)daordonez11 commentedon Jul 5, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The tooltip in the
WorkspaceMembersPageis missingdisplayNameWhat is the root cause of that problem?
Coming from the PR #21696, where I explain the PR that introduced this issue. I included the fix of searching by ID in
MultipleAvatarsin my previous PR, but the actual issue is not sending the id, the real issue here is the inconsistency between different pages and components and duplicated code. My original issue was in the search page. Even though sending the id is a workaround, the problem is not reusing the code that already exists for solving this:getIconsin theReportUtilsclass, in the future someone could change the code and cause a side effect like this again. Hence, avoiding the anti-pattern of duplicating code is my suggestion. In the future if we want to change how the icon information is loaded we only have to change a single place for easier refactors. The root cause is this commit wheregetDisplayNameForParticipantwas updated to depend on accountID instead of login, that change introduced this issue.What changes do you think we should make in order to solve the problem?
Remove the manual creation of the icons in
WorkspaceMembersPageApp/src/pages/workspace/WorkspaceMembersPage.js
Lines 323 to 340 in 7e908b1
And reuse the util code in
ReportUtilsVideo of solution working:
New.Recording.-.4_7_2023.19_37_59.webm
What alternative solutions did you explore? (Optional)
Just proposing to avoid code duplication no other alternatives explored.
53 remaining items
melvin-bot commentedon Jul 30, 2023
@amyevans @rushatgabhane @chiragxarora @dylanexpensify this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:
Thanks!
melvin-bot commentedon Jul 30, 2023
Current assignee @rushatgabhane is eligible for the Internal assigner, not assigning anyone new.
dylanexpensify commentedon Jul 31, 2023
bump @chiragxarora
amyevans commentedon Jul 31, 2023
@dylanexpensify this bug was fixed elsewhere, can you pay the $250 reporting bonus and then we can close this out?
chiragxarora commentedon Jul 31, 2023
Hello all,
These bugs were fixed by another pr but I proposed the solutions weeks before, also I was assigned the issue too?
And delay was due to proposal review process.
cc @grgia @0xmiroslav
chiragxarora commentedon Jul 31, 2023
Also, there are 2 bug reports not one😅
This and #22376
Both of these were present before any of the tool tip refactoring happened
dylanexpensify commentedon Aug 3, 2023
Yes! @chiragxarora will pay out for both
dylanexpensify commentedon Aug 3, 2023
Done!