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.56k stars 2.9k forks source link

[HOLD for payment 2024-11-11] [$250] Search - "Saved" text in search has a slight delay after deleting the term #51028

Closed lanitochka17 closed 1 week ago

lanitochka17 commented 1 month 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.50-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+en@applause.expensifail.com Issue reported by: Applause - Internal Team

Action Performed:

  1. Access staging.new.expensify.com
  2. Sign into a valid account
  3. Tap "Search" at the bottom > Apply a Filter > Save the filter
  4. Delete the Saved filter by click on the 3 dot menu > Delete
  5. Observe the "Saved" text

Expected Result:

User expects that when the filter is deleted, the text disappears immediately

Actual Result:

The "Saved" text still appears for a couple of seconds after the filter was deleted

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/9b5f448b-2f25-4d23-a664-7c78976e9704

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021849069011992742790
  • Upwork Job ID: 1849069011992742790
  • Last Price Increase: 2024-10-23
  • Automatic offers:
    • dukenv0307 | Reviewer | 104578163
    • daledah | Contributor | 104578164
Issue OwnerCurrent Issue Owner: @sonialiap
melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @sonialiap (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 commented 1 month ago

@sonialiap 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

lanitochka17 commented 1 month ago

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

Krishna2323 commented 1 month ago

Proposal


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

Search - "Saved" text in search has a slight delay after deleting the term

What is the root cause of that problem?

When checking for the saved search length we are not filtering saved search with pending action delete. https://github.com/Expensify/App/blob/62302d5cacb2ff307b2e3a2bfc267a858a79bb4d/src/pages/Search/SearchTypeMenu.tsx#L261

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


Filtering out saved search with pending action delete and then calculate the length.

const hasVisibleSavedSearch = !!Object.values(savedSearches ?? {}).filter((s) => s.pendingAction !== 'delete').length;

NOTE: We need to do the same in SearchTypeMenuNarrow.

What alternative solutions did you explore? (Optional)

Result

daledah commented 1 month ago

Edited by proposal-police: This proposal was edited at 2024-10-17 14:42:39 UTC.

Proposal

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

The "Saved" text still appears for a couple of seconds after the filter was deleted

What is the root cause of that problem?

We don't filter out the pending action

https://github.com/Expensify/App/blob/62302d5cacb2ff307b2e3a2bfc267a858a79bb4d/src/pages/Search/SearchTypeMenu.tsx#L261

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

We should filter out the pending action if users are in online mode

    const {isOffline} = useNetwork();
const shouldShow = Object.values(savedSearches ?? {}).filter((s) => s.pendingAction !== 'delete' || isOffline).length > 0;

What alternative solutions did you explore? (Optional)

NA

melvin-bot[bot] commented 3 weeks ago

@sonialiap Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] commented 3 weeks ago

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

melvin-bot[bot] commented 3 weeks ago

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

dukenv0307 commented 3 weeks ago

@daledah's proposal LGTM

🎀👀🎀 C+ reviewed

melvin-bot[bot] commented 3 weeks ago

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

dangrous commented 3 weeks ago

yep that looks good!

melvin-bot[bot] commented 3 weeks ago

📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 3 weeks ago

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

daledah commented 3 weeks ago

@dukenv0307 PR is ready.

melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.56-9 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-11-11. :confetti_ball:

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

melvin-bot[bot] commented 2 weeks ago

@dukenv0307 @sonialiap 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]

sonialiap commented 2 weeks ago

Payment summary: @dukenv0307 $250 upwork - please complete the checklist (fun new form if you have the K2 extension haha) @daledah $250 upwork

dukenv0307 commented 2 weeks ago

BugZero Checklist:

Bug classification Source of bug: - [ ] 1a. Result of the original design (eg. a case wasn't considered) - [x] 1b. Mistake during implementation - [ ] 1c. Backend bug - [ ] 1z. Other: Where bug was reported: - [x] 2a. Reported on production - [ ] 2b. Reported on staging (deploy blocker) - [ ] 2c. Reported on a PR - [ ] 2z. Other: Who reported the bug: - [ ] 3a. Expensify user - [ ] 3b. Expensify employee - [ ] 3c. Contributor - [x] 3d. QA - [ ] 3z. Other:
Regression Test Proposal Template

Regression Test Proposal

Test:

  1. Create a saved search
  2. Delete the search filter
  3. Verify that: "Saved" text dissapears immediately.

Do we agree 👍 or 👎

dukenv0307 commented 2 weeks ago

@sonialiap I completed the checklist

sonialiap commented 1 week ago

Payments completed