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.1k stars 2.6k forks source link

[HOLD for payment 2024-07-02] Web - Book travel - There is hover effect on "Save money on ..." and "Get realtime updates.." #44211

Closed lanitochka17 closed 19 hours ago

lanitochka17 commented 1 week 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.1-0 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4661870 Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to FAB > Book travel
  3. Hover over "Save money on your bookings" and "Get realtime updates and alerts"

Expected Result:

There will be no hover effect on "Save money on your bookings" and "Get realtime updates and alerts" (production behavior)

Actual Result:

There is hover effect on "Save money on your bookings" and "Get realtime updates and alerts"

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/655bed1e-4483-416b-b9ae-12f251bcfcee

View all open jobs on GitHub

melvin-bot[bot] commented 1 week ago

Triggered auto assignment to @luacmartins (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions[bot] commented 1 week ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
Krishna2323 commented 1 week ago

Proposal

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

Web - Book travel - There is hover effect on "Save money on ..." and "Get realtime updates.."

What is the root cause of that problem?

The background is updated whenever isHovered && !pressed is true. https://github.com/Expensify/App/blob/425804aa005c6299ff0f59ff596764c429e19abd/src/components/MenuItem.tsx#L515-L517

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

We should also check if the item is interactive or not on both places where we update the hover styles.

!focused && interactive &&  (isHovered || pressed) && hoverAndPressStyle,
shouldGreyOutWhenDisabled && disabled && styles.buttonOpacityDisabled,
isHovered && interactive && !pressed && styles.hoveredComponentBG,

What alternative solutions did you explore? (Optional)

ishpaul777 commented 1 week ago

Proposal

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

Book travel - There is hover effect on "Save money on ..." and "Get realtime updates.."

What is the root cause of that problem?

Offending PR -https://github.com/Expensify/App/pull/43987/files

Here hover hoveredComponentBG is applied when isHovered && !pressed but there is no consideration when component is not interactive

https://github.com/Expensify/App/blob/425804aa005c6299ff0f59ff596764c429e19abd/src/components/MenuItem.tsx#L515-L517

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

In <Hoverable> component we can pass a prop isDisabled={!interactive} to disable hover.

https://github.com/Expensify/App/blob/425804aa005c6299ff0f59ff596764c429e19abd/src/components/MenuItem.tsx#L500

rojiphil commented 1 week ago

Thanks all for the help here by tagging the offending PR and sharing the insights on the issue. Fixing this issue here at #44219 since this is a regression from #43987 cc @MonilBhavsar

melvin-bot[bot] commented 1 week ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 1 week ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.1-19 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-07-02. :confetti_ball:

melvin-bot[bot] commented 20 hours ago

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

luacmartins commented 19 hours ago

Payment will be handled in https://github.com/Expensify/App/issues/41901. Closing.