Repository navigation
[HOLD for payment 2024-12-19] [$250] Accounting - Unnecessary tooltip showing the same icon on export page #51656
Description
Activity
- addedDailyKSv2KSv2BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.
on Oct 29, 2024 Triggered auto assignment to @bfitzexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.@bfitzexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Proposal
Please re-state the problem that we are trying to solve in this issue.
Accounting - Unnecessary tooltip showing the same icon on export page
What is the root cause of that problem?
Inside ReportDetailsExportPage, we use the UserListItem component to render the items
App/src/pages/home/report/ReportDetailsExportPage.tsx
Lines 104 to 110 in b05ae2f
<SelectionScreen<ExportType> policyID={policyID ?? ''} accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN, CONST.POLICY.ACCESS_VARIANTS.PAID]} featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED} displayName={ReportDetailsExportPage.displayName} sections={[{data: exportSelectorOptions}]} listItem={UserListItem}
However we did not set the showTooltip to false, because inside UserListItem when rendering the icon
App/src/components/SelectionList/UserListItem.tsx
Lines 110 to 128 in b05ae2f
{!!item.icons && (item.shouldShowSubscript ? ( <SubscriptAvatar mainAvatar={item.icons.at(0) ?? fallbackIcon} secondaryAvatar={item.icons.at(1)} showTooltip={showTooltip} backgroundColor={hovered && !isFocused ? hoveredBackgroundColor : subscriptAvatarBorderColor} /> ) : ( <MultipleAvatars icons={item.icons} shouldShowTooltip={showTooltip} secondAvatarStyle={[ StyleUtils.getBackgroundAndBorderStyle(theme.sidebar), isFocused ? StyleUtils.getBackgroundAndBorderStyle(focusedBackgroundColor) : undefined, hovered && !isFocused ? StyleUtils.getBackgroundAndBorderStyle(hoveredBackgroundColor) : undefined, ]} /> ))}
We set the default showTooltip to true if the value is undefined
App/src/components/SubscriptAvatar.tsx
Line 62 in b05ae2f
showTooltip = true, What changes do you think we should make in order to solve the problem?
We should pass showTooltip false inside ReportDetailsExportPage
function ExportListItems(props) { return <UserListItem showTooltip={false} {...props} /> } ... <SelectionScreen<ExportType> policyID={policyID ?? ''} accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN, CONST.POLICY.ACCESS_VARIANTS.PAID]} featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED} displayName={ReportDetailsExportPage.displayName} sections={[{data: exportSelectorOptions}]} listItem={ExportListItems}
What alternative solutions did you explore? (Optional)
Edited by proposal-police: This proposal was edited at 2024-10-29 13:45:40 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Accounting - Unnecessary tooltip showing the same icon on export page
What is the root cause of that problem?
- We haven't passed the
shouldRenderprop insideMultipleAvatarscomponent.
App/src/components/MultipleAvatars.tsx
Lines 150 to 155 in b05ae2f
<UserDetailsTooltip accountID={Number(icons.at(0)?.id)} icon={icons.at(0)} fallbackUserDetails={{ displayName: icons.at(0)?.name, }}
App/src/components/MultipleAvatars.tsx
Lines 190 to 196 in b05ae2f
<UserDetailsTooltip key={`stackedAvatars-${icon.id}`} accountID={Number(icon.id)} icon={icon} fallbackUserDetails={{ displayName: icon.name, }}
App/src/components/MultipleAvatars.tsx
Lines 257 to 262 in b05ae2f
<UserDetailsTooltip accountID={Number(icons.at(0)?.id)} icon={icons.at(0)} fallbackUserDetails={{ displayName: icons.at(0)?.name, }}
App/src/components/MultipleAvatars.tsx
Lines 279 to 285 in b05ae2f
<UserDetailsTooltip accountID={Number(icons.at(1)?.id)} icon={icons.at(1)} fallbackUserDetails={{ displayName: icons.at(1)?.name, }} >
What changes do you think we should make in order to solve the problem?
- Pass
shouldRender={shouldShowTooltip}to all 4UserDetailsTooltipcomponents insideMultipleAvatars. - We should also check for similar issues in components like
MultipleAvatars.
What alternative solutions did you explore? (Optional)
Result
- We haven't passed the
Proposal
Please re-state the problem that we are trying to solve in this issue.
Unnecessary tooltip showing the same icon on export page
What is the root cause of that problem?
The integration icons are rendered by
MultipleAvatars.tsx. Show Tooltips is passed asfalseto MultipleAvatars, but the value is not referenced when rendering the tooltip here:
App/src/components/MultipleAvatars.tsx
Lines 150 to 155 in b05ae2f
<UserDetailsTooltip accountID={Number(icons.at(0)?.id)} icon={icons.at(0)} fallbackUserDetails={{ displayName: icons.at(0)?.name, }} What changes do you think we should make in order to solve the problem?
We will pass the
shouldRenderprop toUserDetailsTooltipon the page as:shouldRender={shouldShowTooltips}
Additionally
- We will fix other tooltips, while checking if change doesn't cause a regression, fixing if it does.
- We will check other list items that may have this behaviour.
PROPOSAL UPDATED
- I mistakenly wrote
shouldRender={false}instead of shouldRender={shouldShowTooltip}. I've now updated the pseudocode. Sorry for that. The RCA and solution is the same.
- I mistakenly wrote
- addedExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributor
on Oct 29, 2024 - changed the title
[-]Accounting - Unnecessary tooltip showing the same icon on export page[/-][+][$250] Accounting - Unnecessary tooltip showing the same icon on export page[/+]on Oct 29, 2024 Job added to Upwork: https://www.upwork.com/jobs/~021851328333556408802
- addedHelp WantedApply this label when an issue is open to proposals by contributorsApply this label when an issue is open to proposals by contributors
on Oct 29, 2024 26 remaining items
- addedWeeklyKSv2KSv2Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to production
on Dec 12, 2024 - changed the title
[-][$250] Accounting - Unnecessary tooltip showing the same icon on export page[/-][+][HOLD for payment 2024-12-19] [$250] Accounting - Unnecessary tooltip showing the same icon on export page[/+]on Dec 12, 2024 Reviewinglabel has been removed, please complete the "BugZero Checklist".The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.74-8 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 2024-12-19. 🎊
For reference, here are some details about the assignees on this issue:
- @parasharrajat requires payment through NewDot Manual Requests
- @Krishna2323 requires payment automatic offer (Contributor)
@parasharrajat @bfitzexpensify @parasharrajat The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
BugZero Checklist:
- [Contributor] Classify the bug:
Bug classification
Source of bug:
- 1a. Result of the original design (eg. a case wasn't considered)
- 1b. Mistake during implementation
- 1c. Backend bug
- 1z. Other:
Where bug was reported:
- 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
- 2b. Reported on staging (eg. found during regression or PR testing)
- 2d. Reported on a PR
- 2z. Other:
Who reported the bug:
- 3a. Expensify user
- 3b. Expensify employee
- 3c. Contributor
- 3d. QA
- 3z. Other:
-
[Contributor] 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: https://github.com/Expensify/App/pull/20276/files#r1881466332
-
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: NA
-
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
-
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
- A workspace with QBO or any accounting integration connected
- An expense created and paid
Test:
Test 1
- Go to transaction thread of the paid expense
- Click on header > Export
- Hover over the icon
- Verify no tooltip is shown
Test 2
- Go to LHN and check that tooltips are showing properly where they are supposed to be on avatars.
Do we agree 👍 or 👎
Payment summary:
@Krishna2323 paid $250 via Upwork for contributor work ✅
@parasharrajat to be paid $250 via ND request for C+ workPayment requested as per #51656 (comment)
$250 approved for @parasharrajat
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
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: 9.0.55-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+nl732@applause.expensifail.com
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Expected Result:
No tooltip should be shown
Actual Result:
Tooltip is shown showing the exact same icon that is already visible
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6649198_1730200163454.bandicam_2024-10-29_14-06-29-290.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @bfitzexpensify