Spoke icon indicating copy to clipboard operation
Spoke copied to clipboard

Bulk Send Batch Progress UI

Open codygordon opened this issue 2 years ago • 0 comments

Description

Replaces bulk send batch console logs with a progress UI as well as error handling in the client.

I also went ahead and just completely refactored this component to be functional w/ hooks. I figure it's probably best to write any new components this way if we can as this is the current standard way of creating doing things with React, and in this case it was pretty straightforward to convert it to be fully component-state-based and replace the while loop with a useEffect hook.

If there's an error it will show it as a snackbar alert for 6 seconds if not clicked off, then end sending and reset to be able to show the button again. I still can't figure out how to bubble up actual error messages to the client, and the docs for the old Apollo express package we're using are now offline. That's is something else to note: Apollo packages should be updated soon as we are on a version that is EOL as of this month.

Also noting, we might want to start adding some custom ESLint overrides as we have so many errors/warnings in the codebase they just get ignored. I added our first override in this PR to allow any console output except log, the reasoning being it's sometimes desirable to leave permanent logs in with info, warn, or error, and with this setting it allows those but you can still get warnings if you have a temporary debugging log in there that you actually want to remove, so you don't forget to do that, and any permanent non-error/warning logging can use info.

Anyway, here are a couple screenshots showing how this UI implementation looks:

Screen Shot 2023-10-08 at 4 34 41 PM

Screen Shot 2023-10-08 at 4 33 27 PM

Checklist:

  • [x] I have manually tested my changes on desktop and mobile
  • [x] The test suite passes locally with my changes
  • [x] If my change is a UI change, I have attached a screenshot to the description section of this pull request
  • [x] My change is 300 lines of code or less, or has a documented reason in the description why it’s longer
  • [ ] I have made any necessary changes to the documentation
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] My PR is labeled [WIP] if it is in progress

codygordon avatar Oct 09 '23 00:10 codygordon