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

Bulk unsubscribe page: delete/archive all emails from sender in one click #176

Closed
elie222 opened this issue Mar 27, 2024 · 2 comments
Closed
Assignees

Comments

@elie222
Copy link
Owner

elie222 commented Mar 27, 2024

What has to happen here:

  • When user clicks the expand button, they see buttons like open in gmail. Put 2 buttons next to it that say Archive All and Delete All.
  • Let's start with Archive first. It's a quick copy and paste to make it work for delete too once the code has been approved for Archive.
  • When the buttons are clicked, we should run a bulk archive or delete. This should use archiveEmails([]) from QueueProvider.
  • If a user decides to close the page when we're still processing the batch, warn them that the bulk archive process hasn't finished yet. We can use beforeunload to do this. Even if the user does close the page though, we have the tasks stored in localStorage, so it will resume once they next visit the page.
  • Not all emails will be loaded by our UI, so this bulk script should be able to keep loading more and more emails to delete. Imagine there are 1500 emails from a heavy sender, and we've load them 500 at a time. We should keep archiving all of them till none remain. Take a look at app/api/user/bulk-archive/route.ts which can help here. But I think we can just load the thread ids into the client and rely on the existing queue there. To run the task on the server will require setting up a queueing system for that, which I don't want to touch this second.
  • When the Delete All button is clicked, make sure the user first confirms the action. Use confirm() for this.

Video of this task:
https://www.loom.com/share/eec51a620d004114a403dd0e9f324a50

@Deeptanshu-sankhwar
Copy link

I would like to take this issue up @elie222

@elie222
Copy link
Owner Author

elie222 commented May 14, 2024

Hey. This feature was added this week.

@elie222 elie222 closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants