active_admin_import icon indicating copy to clipboard operation
active_admin_import copied to clipboard

Proposal: live processing feedback using rails 5 action cables.

Open shivgarg5676 opened this issue 4 years ago • 1 comments

Some time ago, I wrote a plugin for active admin to handle large excel uploads. The problem with the large uploads is that it blocks the main thread if we are processing things synchronously. If we process large files using some worker process, the user does not get any feedback after the processing is done. My proposal is for the second approach. One good way to give feedback to the user is by emailing after the processing is complete. But that is a traditional solution and the user has to migrate away from the tool.

Another good approach is to use action cables to give live feedback to the users. I have a basic implementation here. https://github.com/shivgarg5676/active_admin_excel_upload

Can something similar to this be useful here? I would like to spend some time bringing a new functionality for this and will start writing a detailed proposal.

shivgarg5676 avatar Oct 08 '19 15:10 shivgarg5676

I can't speak for the other maintainers, but here is my point of view...

The idea with Action Cable is good for User Experience. I've always wanted this feature. But there are a few things you/we should be aware of:

  • Compatibility with Rails 4 should remain (without Action Cable)
  • Writing new tests for such feature is mandatory
  • The code-complexity may increase significantly
  • If there would be very complex/extensive changes then, perhaps, it would be better to make it as a separate Gem(it may depend on active_admin_import, no restrictions / MIT license)

It wouldn't be easy, if you @shivgarg5676 are ready for this challenge then go for it 🚀 🌚 🎉

workgena avatar Oct 08 '19 18:10 workgena