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

[HOLD for payment 2024-10-11] Search - Expenses are not highlighted when selected #50046

Closed
6 tasks done
IuliiaHerets opened this issue Oct 2, 2024 · 23 comments
Closed
6 tasks done
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 2, 2024

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.43-0
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): applausetester+kh300901@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

Precondition:

  • There are at least two expenses submitted to the other user.
  1. Go to staging.new.expensify.com
  2. Go to Search.
  3. Select the expenses via checkbox.
  4. Note that the selected expenses are not highlighted.
  5. Go to Outstanding.
  6. Select all expenses via checkbox.
  7. Note that the report header for the group expenses is not highlighted.

Expected Result:

The expenses will be highlighted when selected (production behavior).

Actual Result:

In Step 4, the selected expenses in All tab are not highlighted.
In Step 7, the report header for the group expenses is not highlighted.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6622006_1727865495202.high.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @Christinadobrzyn
@IuliiaHerets IuliiaHerets added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 2, 2024
Copy link

melvin-bot bot commented Oct 2, 2024

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

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-control

@nkdengineer
Copy link
Contributor

Proposal

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

In Step 4, the selected expenses in All tab are not highlighted.
In Step 7, the report header for the group expenses is not highlighted.

What is the root cause of that problem?

We override the focused background and selected background style here and here

It's only applied when we hover over the report item.

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

We should move the style here and here above the selected background and focused background style here and here

What alternative solutions did you explore? (Optional)

@Krishna2323
Copy link
Contributor

Regression from #49192

cc: @ikevin127 @ishpaul777

@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment and removed Daily KSv2 labels Oct 2, 2024
Copy link

melvin-bot bot commented Oct 2, 2024

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

Copy link
Contributor

github-actions bot commented Oct 2, 2024

👋 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.

@ishpaul777
Copy link
Contributor

Not worth blocking IMO, @ikevin127 or me can raise a follow up PR or handle in #50028

cc @luacmartins

@Julesssss
Copy link
Contributor

Removing blocker label. I commented here and I'll await a response before moving forward.

@luacmartins
Copy link
Contributor

Thanks! @ishpaul777 will work on a PR to address this.

@ikevin127

This comment was marked as outdated.

@ikevin127
Copy link
Contributor

ikevin127 commented Oct 2, 2024

@luacmartins ✅ I confirm that this issue is indeed a regression of PR #49192 and I'm working on a follow-up PR to fix it right now since this is still in the regression period.

Actually, looks like the offending PR's reviewer will open a follow-up with the fix and I will review (see comments below).

@ishpaul777
Copy link
Contributor

https://github.com/Expensify/App/pull/50089/files I have a draft PR here just confirming the fix on all platforms

@ikevin127 Can you review ?

@ikevin127
Copy link
Contributor

🟢 Sure, I can review since this is in the regression period and I think we'd like to keep it contained.

@ishpaul777 Sorry, didn't know you started working on the fix. This would've been my diff (added some comments for clarity), and I think your version with styles.bgTransparent is cleaner 👍

diff --git a/src/components/SelectionList/Search/ReportListItem.tsx b/src/components/SelectionList/Search/ReportListItem.tsx
index ea36ba44ccc..df196a8d4e3 100644
--- a/src/components/SelectionList/Search/ReportListItem.tsx
+++ b/src/components/SelectionList/Search/ReportListItem.tsx
@@ -75,11 +75,13 @@ function ReportListItem<TItem extends ListItem>({
         styles.pv1half,
         styles.ph0,
         styles.overflowHidden,
-        item.isSelected && styles.activeComponentBG,
-        isFocused && styles.sidebarLinkActive,
-        // Removing some of the styles because they are added to the parent OpacityView via animatedHighlightStyle
+        // We unset backgroundColor and reset marginHorizontal because the styles
+        // are handled by parent OpacityView via animatedHighlightStyle
         {backgroundColor: 'unset'},
         styles.mh0,
+        // These should be at the end because otherwise the item won't highlight when selected
+        item.isSelected && styles.activeComponentBG,
+        isFocused && styles.sidebarLinkActive,
     ];
 
     const handleOnButtonPress = () => {
diff --git a/src/components/SelectionList/Search/TransactionListItem.tsx b/src/components/SelectionList/Search/TransactionListItem.tsx
index 39172711516..bd9fceb5a5c 100644
--- a/src/components/SelectionList/Search/TransactionListItem.tsx
+++ b/src/components/SelectionList/Search/TransactionListItem.tsx
@@ -27,11 +27,13 @@ function TransactionListItem<TItem extends ListItem>({
         styles.selectionListPressableItemWrapper,
         styles.pv3,
         styles.ph3,
-        item.isSelected && styles.activeComponentBG,
-        isFocused && styles.sidebarLinkActive,
-        // Removing some of the styles because they are added to the parent OpacityView via animatedHighlightStyle
+        // We unset backgroundColor and reset marginHorizontal because the styles
+        // are handled by parent OpacityView via animatedHighlightStyle
         {backgroundColor: 'unset'},
         styles.mh0,
+        // These should be at the end because otherwise the item won't highlight when selected
+        item.isSelected && styles.activeComponentBG,
+        isFocused && styles.sidebarLinkActive,
     ];
 
     const listItemWrapperStyle = [

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 2, 2024
@luacmartins
Copy link
Contributor

Thanks! I assigned you as reviewer @ikevin127

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 4, 2024
@melvin-bot melvin-bot bot changed the title Search - Expenses are not highlighted when selected [HOLD for payment 2024-10-11] Search - Expenses are not highlighted when selected Oct 4, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

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

Copy link

melvin-bot bot commented Oct 4, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.44-12 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-10-11. 🎊

For reference, here are some details about the assignees on this issue:

  • @ikevin127 requires payment (Needs manual offer from BZ)
  • @ishpaul777 requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Oct 4, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@ikevin127 / @ishpaul777] The PR that introduced the bug has been identified. Link to the PR:
  • [@ikevin127 / @ishpaul777] 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:
  • [@ikevin127 / @ishpaul777] A discussion in #expensify-bugs 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:
  • [@ikevin127 / @ishpaul777] Determine if we should create a regression test for this bug.
  • [@ikevin127 / @ishpaul777] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@ikevin127
Copy link
Contributor

Regression Test Proposal

  1. Navigate to the Search page.
  2. Select expenses via the checkbox.
  3. Verify that the selected expenses are highlighted.
  4. Go to Outstanding expenses.
  5. Select all expenses via checkbox.
  6. Verify that the report header for the expense group is highlighted.

Do we agree 👍 or 👎.

@Julesssss
Copy link
Contributor

I don't think we need a specific regression test for this small fix.

@Christinadobrzyn
Copy link
Contributor

Payouts due in a few days

Let me know if anything needs to be changed about the payment summary.

@ishpaul777
Copy link
Contributor

No payment here for C ad C+, this came from a PR under regression period

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 11, 2024
Copy link

melvin-bot bot commented Oct 11, 2024

Payment Summary

Upwork Job

BugZero Checklist (@Christinadobrzyn)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@melvin-bot melvin-bot bot added the Overdue label Oct 14, 2024
@Christinadobrzyn
Copy link
Contributor

Ah, okay. Thanks for letting me know, @ishpaul777.

I closed the Upwork contracts for you and @ikevin127 without payment. No regression test based on this comment.

Closing this out as complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

8 participants