Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.52k stars 2.87k forks source link

First QAB missing tooltip for new user #51987

Open m-natarajan opened 7 hours ago

m-natarajan commented 7 hours ago

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.57-0 Reproducible in staging?: y Reproducible in production?: y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: 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: @ishpaul777 Slack conversation (hyperlinked to channel name): Expensify-bugs

Action Performed:

Sign up with new account Open FAB, complete scan receipt flow Open FAB again

Expected Result:

you see a QAB with tooltip

Actual Result:

you see a QAB without tooltip

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

Add any screenshot/video evidence https://github.com/user-attachments/assets/2ce97674-a251-4918-a6d0-d20ab2935310 Expected tooltip: ![Screenshot 2024-11-04 at 10 43 24 PM (1)](https://github.com/user-attachments/assets/dc0451d9-824d-45d0-8344-15bd9a8a054c)

View all open jobs on GitHub

melvin-bot[bot] commented 7 hours ago

Triggered auto assignment to @mallenexpensify (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.

Nodebrute commented 6 hours ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

First QAB missing tooltip for new user

What is the root cause of that problem?

This issue began after the changes in this PR. In this PR, we updated EducationalTooltip by adding a new variable, shouldShow, which included two additional checks: !modal?.willAlertModalBecomeVisible && !modal?.isVisible. https://github.com/Expensify/App/blob/a84cb3181161b1d3fdb1efcf9c2e375884606667/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx#L26

The problem arises because when we open the FAB, willAlertModalBecomeVisible is set to true, which causes shouldShow to be evaluated as false, preventing the tooltip from displaying.

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

We can change the condition so when isPopover is true we ignore these !modal?.willAlertModalBecomeVisible && !modal?.isVisible https://github.com/Expensify/App/blob/a84cb3181161b1d3fdb1efcf9c2e375884606667/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx#L26

we can do something like this

const shouldShow = shouldRender && (modal?.isPopover || (!modal?.willAlertModalBecomeVisible && !modal?.isVisible));

Note: This is just pseudo code. We can achieve the same results by passing props

What alternative solutions did you explore? (Optional)

We can remove !modal?.willAlertModalBecomeVisible from here https://github.com/Expensify/App/blob/a84cb3181161b1d3fdb1efcf9c2e375884606667/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx#L26