-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat(mobile): separate delete buttons #4505
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
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.
looks good to me!
maybe we should add a warning if the user wants to delete assets from device that are not yet backed-up
That'd be good. But I'm not sure where to include this since we might need to handle this in normal deletions as well. In recent versions of android, the user already receives Immich confirmation dialog, followed by the System's dialog for deleting a local asset. Adding one more confirmation would really make sure that the user knows what they're doing, but three confirmations for deletion seems too much |
true, three confirm dialogs is too much (two are already weird). we could add an option (toggle/switch) in the first delete dialog with "delete only assets backed-up successfully" that is enabled by default. if a user want's to remove non-backed assets, the user can easily disable that toggle/switch |
Hello, thank you for working on this. I noticed that the slider of "Delete only backed up assets" doesn't do anything. Can you help me explain the functionality of it? |
The "Delete from device" button is primarily used to remove the assets only from the current device. The toggle is used to prevent users from removing a local asset that is not yet backed up. With the toggle on, we filter out local only assets and use only those that are already backed up to the Immich server (i.e, merged assets). Turning off the toggle will allow us to delete local assets that are not backed up yet as well as the local file of the merged assets. You can try selecting three assets, one that is both available locally and in server, one available only in the server and one available only in the device and tap "Delete from device". If you press "Delete" with the toggle on, only the local file of the asset that is available in both the device and the server will be removed and the asset will become remote only. If you turn the toggle off, the local only file will be removed as well. |
Hi all, |
This is also a good solution. We need to make it clear that the dialog on the right is a potentially dangerous operation. Maybe, we can add a big warning icon somewhere? |
Updated the previous reply with the new change. Changed the button to "delete anyway" and updated the color of the content to red to let users know that it is a potentially dangerous operation. |
Is there still an option to delete only backed-up assets, or was it removed with 1270086? I think that option would be really useful! I'm just not sure where to put the setting slider/checkbox. Or then it could be a separate button: "delete only backed up assets"? |
Agree with @vinicentus, the original toggle for "Delete only backed up assets" automates building the list of images/videos that can be safely deleted 👍 Changing this PR to require the user to manually verify which images are safe to delete from the device prior to using the "Delete from device" feature is a step backwards IMHO |
@alextran1502 since there are opposing views on how to handle the UI, maybe you want to chime in? |
We could keep the current implementation, but instead of a toggle, we can display three buttons when the selection contains non-backed up assets as well?
|
I think the latest changes from @shenlong-tanwen is good and straightforward. Maybe we can rephrase the dialog to make it a bit clearer "These items will be permanently removed from your device but still available on the Immich server" |
f153d29
to
b7ac861
Compare
This seems like a good solution, at least for now. |
I'm excited to have this in prod soon! 😍 |
1114a3c
to
8a6f0f2
Compare
Deploying with
|
Latest commit: |
a29e4c3
|
Status: | ✅ Deploy successful! |
Preview URL: | https://a81eb385.immich.pages.dev |
Branch Preview URL: | https://feat-mobile-delete-local-onl.immich.pages.dev |
Hi @shenlong-tanwen, I spotted a few issues while making the table. Let me know what you think about them
|
I love the table @alextran1502 , you show exactly the behavior of different ACTIONS ("Delete from Immich" or "Delete from device"). The table content is fine, but the header reminds something else for me. The previous dialog uses the term "Delete Permanently" without emphasizing what the ACTION is performed, which makes me quite nervous to think again whether the user presses the correct button. Even if I read that demo figure, I still have to read the full description in the dialog carefully to understand what will be performed. Here are my thoughts about this feature, hope these may help:
With such descriptions, I think users can easily choose which ACTION is their desired one (hide photos by Move or freeing up space by Delete). Also, a classic scenario is: "I want to free up some space on my phone, so let's [Delete from local device]. (Immich pops up a dialog for the user to choose BLUE[Delete after uploading] or RED[Delete right now]) Oh, I forgot to upload it to the server first, thanks Immich". For such a scenario, We can also use another intuitive implementation that applies BLUE and RED on the four choices above. BLUE for safe choices, RED for choices that will cause photos lost, and GRAY for unavailable choices (like some selected photos are not presented on the server). |
Does this solve the situation when I want to remove remote uploaded asset and keep the local asset not trashed (un-upload)? When I click to Delete from cloud button, it trashes asset on web and locally as well, that's not intuitive. |
That behavior is not changed and it does not have anything to do with the delete buttons at all. The asset is still available in Immich server under Trash. Showing it in the timeline with a crossed cloud icon would mean that the asset is unavailable in Immich, but in reality, it does and can be restored easily from the Trash. Deleting it from the trash will however, bring the asset back to the timeline with the crossed cloud icon though.
It is not possible to download the asset to the original folder since Immich do not store the original path of the asset. I'm not sure how feasible this is as well. |
We do not show any prompt to the user unless the action is destructive. i.e, no prompts eill be displayed for trashing / deleting already backed up local assets. However, if you are trying to remove a non-backed local asset or trying to remove assets from the trash, a prompt will be displayed.
We do not have prompt for trashing yet. When we do, we will consider this
Our prompt should inform them that there are non-backed up assets. Users can then upload the selected local assets using the upload button and proceed to remove their local only files which would not display the prompt now. This should already be intuitive enough. Thanks a lot for the detailed suggestions :) |
That't not entirely true, deleting it from Trash from device deletes it for good, it doesn't bring it back, it has to be done from web side though. This is confusing, that a single action does different things. The ui shall be intuitive and user needs to know what action a button does. If it removes an asset to trash, then the button cannot be named "Delete from [cloud]" on the mobile, that button caption implies that an asset is deleted from cloud an local copy stays in device. Btw. such functionality is missing currently, right? |
Thank you for your valuable feed-backs, and yes, it would indeed be confusing to the users when there is a difference in behavior on how a feature behaves in the mobile app and in the web app.
Again, Thanks a lot for your suggestions :)
This current PR adds three separate buttons for asset removal. One will remove only the local part and leave the remote part. The other would remove only the remote part and will leave the local part. The last would remove both of them. However, if trash is enabled, the remote part is always moved to the Immich trash. If you still want to permanently remove an asset without putting it in the trash, then this PR might be useful for you where long-pressing the button will permanently remove it, instead of trashing it: |
Closes #2190 , #4453
Changes made in this PR
Note
photo_manager
plugin. Updating to it will permanently remove the assets instead of trashing themScreenshots