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] Search - No delete or hold option for expense while offline #46890

Closed
1 of 6 tasks
lanitochka17 opened this issue Aug 6, 2024 · 10 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 6, 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.17-0
Reproducible in staging?: Y
Reproducible in production?: Y
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:
Slack conversation:

Issue found when executing PR #46128

Action Performed:

Break down in numbered steps

Expected Result:

Describe what you think should've happened

Actual Result:

Describe what actually happened

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence

Bug6563206_1722937729089.bandicam_2024-08-06_12-44-19-564.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bae1b9190f8db09f
  • Upwork Job ID: 1821707990411207161
  • Last Price Increase: 2024-08-09
Issue OwnerCurrent Issue Owner: @hoangzinh
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 6, 2024
@FitseTLT
Copy link
Contributor

FitseTLT commented Aug 6, 2024

Edited by proposal-police: This proposal was edited at 2024-08-06 14:16:11 UTC.

Proposal

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

No delete or hold option for expense while offline

What is the root cause of that problem?

We are displaying them with the condition not offline

const shouldShowUnholdOption = !isOffline && selectedTransactionsKeys.every((id) => selectedTransactions[id].canUnhold);

const shouldShowHoldOption = !isOffline && selectedTransactionsKeys.every((id) => selectedTransactions[id].canHold);

const shouldShowDeleteOption = !isOffline && selectedTransactionsKeys.every((id) => selectedTransactions[id].canDelete);

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

We need to remove !isOffline from the conditions and then remove the close modal code in their onSelected like here here and here on all three cases
In addition, it also lacks offline experience so just like putOnHold function here we need to optimistically create the necessary report actions and also put on hold all the transactions in the bulk actions transactionIDList ofcourse we can reuse the logic in putOnHold on both places. We should do similar offline optimistic work for Unhold and delete too

What alternative solutions did you explore? (Optional)

@MuaazArshad
Copy link
Contributor

Proposal

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

No delete or hold option for expense while offline

What is the root cause of that problem?

We are adding a check that the site is not offline

const shouldShowDeleteOption = !isOffline && selectedTransactionsKeys.every((id) => selectedTransactions[id].canDelete);

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

We have to remove this check !isoffline

What alternative solutions did you explore? (Optional)

Copy link

melvin-bot bot commented Aug 6, 2024

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

@FitseTLT
Copy link
Contributor

FitseTLT commented Aug 6, 2024

Updated to add the changes to be made on the onSelected callbacks

@cretadn22
Copy link
Contributor

Same solution here. But we're waiting to confirm the expectations.

@melvin-bot melvin-bot bot added the Overdue label Aug 8, 2024
@anmurali anmurali added the External Added to denote the issue can be worked on by a contributor label Aug 9, 2024
@melvin-bot melvin-bot bot changed the title Search - No delete or hold option for expense while offline [$250] Search - No delete or hold option for expense while offline Aug 9, 2024
Copy link

melvin-bot bot commented Aug 9, 2024

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

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

melvin-bot bot commented Aug 9, 2024

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

@trjExpensify
Copy link
Contributor

I think we might not allow these actions on the Search page offline for the time being. CC: @luacmartins for a second opinion.

@luacmartins
Copy link
Contributor

Correct, this is expected since Search actions can only be taken online.

@trjExpensify
Copy link
Contributor

Cool, closing!

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
No open projects
Status: Done
Development

No branches or pull requests

8 participants