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

[$250] Accounting - Unnecessary tooltip showing the same icon on export page #51656

Open
1 of 8 tasks
lanitochka17 opened this issue Oct 29, 2024 · 18 comments
Open
1 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 29, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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): [email protected]
Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

  • A workspace with QBO or any accounting integration connected
  • An expense created and paid
  1. Go to transaction thread of the paid expense
  2. Click on header > Export
  3. Hover over the icon

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?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

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
  • Upwork Job URL: https://www.upwork.com/jobs/~021851328333556408802
  • Upwork Job ID: 1851328333556408802
  • Last Price Increase: 2024-11-12
  • Automatic offers:
    • Krishna2323 | Contributor | 104866520
Issue OwnerCurrent Issue Owner: @parasharrajat
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 29, 2024
Copy link

melvin-bot bot commented 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.

@lanitochka17
Copy link
Author

@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

@NJ-2020
Copy link
Contributor

NJ-2020 commented Oct 29, 2024

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

<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
{!!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
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)

@Krishna2323
Copy link
Contributor

Krishna2323 commented Oct 29, 2024

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?

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


  • Pass shouldRender={shouldShowTooltip} to all 4 UserDetailsTooltip components inside MultipleAvatars.
  • We should also check for similar issues in components like MultipleAvatars.

What alternative solutions did you explore? (Optional)

Result

@neonbhai
Copy link
Contributor

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 as false to MultipleAvatars, but the value is not referenced when rendering the tooltip here:

<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 shouldRender prop to UserDetailsTooltip on 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.

@Krishna2323
Copy link
Contributor

Krishna2323 commented Oct 29, 2024

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.

@bfitzexpensify bfitzexpensify added the External Added to denote the issue can be worked on by a contributor label Oct 29, 2024
@melvin-bot melvin-bot bot changed the title Accounting - Unnecessary tooltip showing the same icon on export page [$250] Accounting - Unnecessary tooltip showing the same icon on export page Oct 29, 2024
Copy link

melvin-bot bot commented Oct 29, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 29, 2024
Copy link

melvin-bot bot commented Oct 29, 2024

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

@parasharrajat
Copy link
Member

Reviewing shortly.

@parasharrajat
Copy link
Member

Back from festive holidays. I will check it now.

Copy link

melvin-bot bot commented Nov 5, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@parasharrajat
Copy link
Member

@Krishna2323's proposal looks good to me. We will have to carefully check that this does not cause any issues as MultipleAvatar component is a generic component.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Nov 7, 2024

Triggered auto assignment to @thienlnam, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

Copy link

melvin-bot bot commented Nov 12, 2024

@parasharrajat @thienlnam @bfitzexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Nov 12, 2024
Copy link

melvin-bot bot commented Nov 12, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@parasharrajat
Copy link
Member

@Krishna2323 Bump

@melvin-bot melvin-bot bot removed the Overdue label Nov 12, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 12, 2024
Copy link

melvin-bot bot commented Nov 12, 2024

📣 @Krishna2323 🎉 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 📖

@Krishna2323
Copy link
Contributor

@parasharrajat, PR ready for review ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Development

No branches or pull requests

7 participants