-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Added a ProgressBar to display while uploading Pics/Files #3443
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the callback approach, however i think the solution is not yet fully developed.
I agree that we need to show the loading progress in the chat, but we should introduce placeholder messages for that, which is a bit more work.
With the current solution, the loading bar now floats above all messages which is a bit irritating, especially when uploads take longer. It is not obvious that it is the upload progress but it feels more like there are problems loading the chat.
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 |
fileUri, | ||
room, | ||
currentConversation?.displayName!!, | ||
metaData | ||
) | ||
) { showProgressBar: Boolean -> | ||
binding.idprogressbar.visibility = if (showProgressBar) View.VISIBLE else View.GONE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
binding.idprogressbar.visibility = if (showProgressBar) View.VISIBLE else View.GONE | |
binding.idprogressbar.visibility = if (showProgressBar) View.VISIBLE else { | |
chatViewModel.refreshChatParams( | |
setupFieldsForPullChatMessages( | |
true, | |
globalLastKnownFutureMessageId, | |
true | |
) | |
) | |
View.GONE | |
} |
Breaks with the recent refactoring of ChatActivity
. Insert this line to fix it, so that uploaded files show up after sending.
d543a7b
to
fc5e43a
Compare
Signed-off-by: Smarshal21 <lcb2021048@iiitl.ac.in> Added ProgressBar Signed-off-by: Smarshal21 <lcb2021048@iiitl.ac.in> Added ProgressBar Signed-off-by: Smarshal21 <lcb2021048@iiitl.ac.in> added progress bar Signed-off-by: Smarshal21 <lcb2021048@iiitl.ac.in>
Signed-off-by: Smarshal21 <lcb2021048@iiitl.ac.in>
just rebased to origin/master and fixed some conflicts. Did not test or improve anything. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
fc5e43a
to
aa6a42b
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3443-talk.apk |
Hello there, 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! |
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:
WorkManager Integration:
Observing WorkManager State:
🏁 Checklist
/backport to stable-xx.x