talk-android icon indicating copy to clipboard operation
talk-android copied to clipboard

Added a ProgressBar to display while uploading Pics/Files

Open Smarshal21 opened this issue 1 year ago • 6 comments

Resolves #2500

Overview

This pull request introduces a ProgressBar to enhance the user experience during file uploads. The ProgressBar provides visual feedback on the upload progress, making it more intuitive for users.

Changes Made:

Upload Functionality:

  • Modified the upload function to handle ProgressBar visibility.
  • The ProgressBar is set to VISIBLE during the upload process and GONE when the upload is complete.

WorkManager Integration:

  • Utilized WorkManager for managing the background file upload task.
  • Enqueued unique work to ensure proper handling of the upload task.

Observing WorkManager State:

  • Implemented an observer for the WorkManager to track the state of the file upload.
  • The ProgressBar is hidden once the upload is completed, and appropriate notifications are displayed.

🏁 Checklist

  • [x] ⛑️ Tests (unit and/or integration) are included or not needed
  • [x] 🔖 Capability is checked or not needed
  • [x] 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • [x] 📅 Milestone is set
  • [x] 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

Smarshal21 avatar Nov 14 '23 14:11 Smarshal21

Placeholder messages seem to be necessary for this one. There should be a shimmer effect in place while the file is loading. We're already using this loading library in some of our xml.

We could have it so that when the file message is sent, a temporary placeholder message is added to the chat list, before being removed when the file message arrives from the server.

This also allows us a bit of freedom when it comes to design. We could implement a custom Nextcloud themed loading animation in the future, if we ever need to.

rapterjet2004 avatar Nov 17 '23 13:11 rapterjet2004

Placeholder messages seem to be necessary for this one. There should be a shimmer effect in place while the file is loading. We're already using this loading library in some of our xml.

We could have it so that when the file message is sent, a temporary placeholder message is added to the chat list, before being removed when the file message arrives from the server.

This also allows us a bit of freedom when it comes to design. We could implement a custom Nextcloud themed loading animation in the future, if we ever need to.

what would be better @mahibi @rapterjet2004 ? use the existing shimmer which appears while loading the chat or a custom shimmer for uploading ?

Smarshal21 avatar Feb 13 '24 16:02 Smarshal21

Placeholder messages seem to be necessary for this one. There should be a shimmer effect in place while the file is loading. We're already using this loading library in some of our xml. We could have it so that when the file message is sent, a temporary placeholder message is added to the chat list, before being removed when the file message arrives from the server. This also allows us a bit of freedom when it comes to design. We could implement a custom Nextcloud themed loading animation in the future, if we ever need to.

what would be better @mahibi @rapterjet2004 ? use the existing shimmer which appears while loading the chat or a custom shimmer for uploading ?

i would say a loading circle (spinner) inside a placeholder message.

Fyi i rebased on master and fixed minor merge conflicts

mahibi avatar Mar 05 '24 13:03 mahibi

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3443-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

github-actions[bot] avatar Mar 29 '24 20:03 github-actions[bot]

Codacy

Lint

TypemasterPR
Warnings8181
Errors1010

SpotBugs

CategoryBaseNew
Bad practice66
Correctness88
Dodgy code110110
Internationalization33
Malicious code vulnerability33
Performance66
Security11
Total137137

github-actions[bot] avatar Mar 29 '24 20:03 github-actions[bot]

Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

github-actions[bot] avatar Mar 31 '24 02:03 github-actions[bot]