-
Notifications
You must be signed in to change notification settings - Fork 3k
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] Bulk Invoice Delete doesn't remove the deleted rows from the UI #55680
Comments
Triggered auto assignment to @Christinadobrzyn ( |
I think this can be external |
Job added to Upwork: https://www.upwork.com/jobs/~021882909145340105934 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann ( |
📣 @mac-ad! 📣
|
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
Contributor details ProposalPlease re-state the problem that we are trying to solve in this issue.When a user selects 1 or more transactions to be deleted, they remain on the page until a refresh (sometimes with a delay) What is the root cause of that problem?The deletion is done asynchronously and the UI does not reflect that the items have been deleted until the API request is complete. The transactions are not removed from the UI until they are actually deleted. What changes do you think we should make in order to solve the problem?Ensure the UI is optimistically updated with the selected transaction IDs to be deleted before the async job is complete by ensuring the optimisticData does not include the deleted transaction IDs: App/src/libs/actions/Search.ts Line 355 in b59f23b
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?Go to reports -> invoices Go to reports -> invoices Go to reports -> invoices Go to reports -> invoices |
📣 @samh0lmes! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
Hi @DylanDylann can you please review these proposals when you have a moment? Thank you! |
When deleting money requests on the Search page. We don't remove it optimistically, instead of that we call Search APi again and then update UI. This bug is caused by the Search API taking a long time to respond (or failing). Screen.Recording.2025-01-28.at.00.30.18.mov |
@luacmartins Could you help to dig into this one to find out the best solution for this bug? (this is my investigation) I have two solutions:
|
@DylanDylann oh gotcha yeah then a loading screen would be a simple solution there |
Let's wait for @luacmartins to confirm that |
I don't think we should do this since all Search commands work online only.
This sounds like the way to go here. |
Note for contributors about the expectation
|
Just checking on this, are we waiting for new/revised proposals @DylanDylann? |
📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @FitseTLT 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
I really doubt if showing loading indicator on delete is correct UI pattern. I think it is better to use our existing pattern of striking-through, greying-out/disabling the row. So asking for confirmation @Expensify/design When transactions are deleted from Search it takes a while before the search items are removed so here we are aiming to show some indicator that the items are deleted. Though showing loading indicator has been proposed as an option I didn't like it and it doesn't align with the UI we use for pending delete in other places. So guys what would you suggest us here? |
@dannymcclain I had a question for the design team above ^ And BTW I am not getting a response from the design team after mentioning @Expensify/design in my comment Is there anything I am missing? I see it works for others 😕 |
Hmm, not sure about this but it definitely does not seem to be working. We're asking our internal team about it. |
As for this, I'd love to get @luacmartins in here since I feel like he will have some good insights. Any idea why these can't just animate out optimistically? (And by "animate" I mean the same type of animation we use when adding a row to the reports page) cc @Expensify/design |
The search commands only work online, so it might be a bit odd to animate them optimistically and have them rollback if the command fails. We could run the animation on the |
Ah ok that makes sense. In that case, I'd probably lean into our reduced opacity pattern for this. I don't think we need to strike-through text like in a message since each of these are self-contained and much less free form than a chat message. Here's what I'm thinking: cc @Expensify/design for viz / gut check |
Makes sense to me, also let's get a gut check from our resident Offline expert @trjExpensify :) |
Definitely like the fade out, but keen to hear what Tom thinks too |
Reduced opacity with strikethrough for optimistic delete actions! 🙇 |
Ah do we even do strikethrough if the element is contained within a card, like the expense rows are? |
Nice, precedent! Okay @dannymcclain guess you gotta update the mocks. |
@luacmartins I think we only should strike out or grey out when users are offline (following the offline pattern B). In case waiting for API, should we display a loading indicator for all pages? cc @trjExpensify @Expensify/design |
That's a good point. Because the Search commands only work online, they should follow Pattern C or D, but I don't know how I feel about a loading indicator here. |
Right, I think we usually keep the view with the stale data but refresh it once the request is done. I can see how that'd be a bit unexpected after deleting something and not seeing it not reflect in the table though. I'd lean into the @Expensify/design team for this. |
Yeah I kinda think we should avoid the loading indicator if we can. Can we delete it optimistically? And only show an error dialog or something if the requests fails? |
The loading screen would prevent users from performing other actions until the delete succeeds I don't like it. BTW the search APIs are a bit different from other APIs
@luacmartins I know what you meant by not use optimistic data in search as it is done online. But what if we make an exception in our optimistic approach and instead of setting |
It feels a bit unnecessary since the data removing the transaction would come from the API anyways, but I think that's fine. |
The current issue is caused because Search API is sometimes not executed and the items are not removed unless refreshed this will solve it. |
Oh, if we don't let them take the |
Here's a video of that offline download flow: CleanShot.2025-02-05.at.10.43.18.mp4 |
This issue isn't related to offline mode. 406236629-fcec8183-1488-4d0a-8bd5-4a7ca45abd6d.movWhen we delete rows, the removing action takes a long time to respond. Now we need to look for some ways to display UI while waiting for removing action to give a response |
@luacmartins @FitseTLT @Christinadobrzyn @DylanDylann this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
Yeah that makes sense to me 👍 |
Looks great to me 👍 |
@FitseTLT Let's move forward this issue |
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.89-2
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: @mananjadhav
Slack conversation (hyperlinked to channel name): expensify - bug
Action Performed:
Expected Result:
The deleted invoices should be removed from the UI as soon as they're deleted.
Actual Result:
The selected invoices are still retained in the table even after being deleted. They're removed on refreshing the page.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Recording.920.mp4
web-bulk-delete-invoice.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @DylanDylannThe text was updated successfully, but these errors were encountered: