-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Always download if image is unsupported #13534
Conversation
Thanks for your contribution!
|
545a914
to
a7b6d0d
Compare
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.
Thank you for this contribution.
I do believe that a simple toggle in the preferences is a suitable solution for this problem. However, I would like to involve @nextcloud/designers in this discussion.
In my testing everything worked as expected. I've made suggestions for some minor improvements.
}.show() | ||
(requireActivity() as PreviewImageActivity).let { parentImageActivity -> | ||
if (parentImageActivity.preferences.shouldDownloadUnsupportedImage) { | ||
parentImageActivity.requestForDownload(file) |
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.
In my opinion this call should be moved to the calling function. As this function is called setErrorPreviewMessage()
, one would not expect for it do start a download. Alternatively, this function could be renamed to some thing like handleUnsupportedImage
or unsupportedImageCallback
.
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.
To refer to our design guidelines from https://nextcloud.com/design/
Software should get out of the way.
Do things automatically instead of offering configuration options.
So in this case, what is the option supposed to do, and what is the default:
- If it’s off by default, only a tiny fraction of people will enable it anyway
- If it’s on by default, why don’t we just make it so, without the option?
@parneet-guraya what do you think?
EDIT: Also reading the original issue at #8017, the root cause does not seem to be best solved by introducing a setting, but rather by just doing it. :)
@jancborchardt hi 👋 ,
By default we ask for the resized image from the backend instead of full resolution (and only fallback to download full resolution if not supported), to save user's bandwidth. I introduced this preference just to keep the current default. But, if we keep it Let me know what you think. |
@parneet-guraya thanks for the explanation. :)
Yes, I would say that is fine – because people want to view the images. They don’t even know that we normally show only a resized version. So we should not expose implementation details to them and just load it. |
I also agree with Jan's comment: always on 👍 |
|
a7b6d0d
to
8b03727
Compare
@ZetaTom , I pushed the change and as discussed in the comments, unsupported image will always be downloaded. |
8b03727
to
a44abe7
Compare
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.
Thank you for implementing the suggested changes.
Everything worked as expected.
app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.kt
Show resolved
Hide resolved
a44abe7
to
480f9ae
Compare
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.
During my testing, these changes worked as expected. However, the preview of the actual image didn't work until I re-opened the file. As this behaves the same for me on master, I think that we can go ahead and merge anyway and address the issue of not loading at another date.
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! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Signed-off-by: parneet-guraya <[email protected]>
480f9ae
to
6b5e3e9
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/13534.apk |
@jancborchardt The toggle is no longer visible on the settings screen, and the default action is to always download if the image is unsupported. |
Toggle not visible in the settings screen and default action is always download if image is unsupported.
Fix: #8055