After import, change default action to "keep" instead of "delete".
ClosedPublic

Authored by bdevries on Oct 23 2019, 8:48 AM.

Details

Summary

After importing photos, a dialog pops up which asks whether to
delete or keep the photos on the device/folder from which they
were imported. Currently, "delete" is the default action.
However, this is quite dangerous for users that don't pay
attention. Better to present "keep" as the default action.

FEATURE: 337651
FIXED-IN: 19.12.0

Diff Detail

Repository
R260 Gwenview
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bdevries created this revision.Oct 23 2019, 8:48 AM
Restricted Application added a project: Gwenview. · View Herald TranscriptOct 23 2019, 8:48 AM
bdevries requested review of this revision.Oct 23 2019, 8:48 AM

While this fixes the bug, I'm not quite sure it's the best way. Switching to KMessageBox::Dangerous seems inaccurate because even though there is indeed a dangerous action here, the dialog itself isn't about a dangerous action.

You could just swap the order of the buttons instead. And baybe rename "Delete" to say "Discard" while you're at it. But more generally... does this dialog even make sense? Presumably you wanted to import the items because you just took a conscious action to do so; does make any sense to interrupt the proceedings to offer an option to destroy all of that?

The purpose of this dialog box is to ask the user what should be done with the original files on the source device that the photos were imported from. I.e. deleting them on the source device, e.g. the camera or smartphone. Only the photos that were imported successfully are then deleted from the source device (so not the ones that failed or were not selected to be imported).
BTW, the dialog box pops up after the import itself has been done.

It means that this dialog box is asking about deleting the original source files. So I would say that this is a dangerous action since it will delete original source files. During testing I accidentally deleted my source test files a couple of times due to "delete" being the default.

Having said that, it could make sense to just swap the button around, but then I would say the two options clash with the original intent of the dialog box: "keep" would map to "yes" and "delete" would map to "no".
--> To be honest I don't have a very strong opinion on this. Telll me whathever implementation you think is most suited, and I will update.

PS: Taking a step back, there are other ways of handling this. Other existing photo importers (across OSes) use different UI approaches. I've seen a few that handle this as part of the settings, offering a choice: "always keep", "always delete", "always ask". Others offer a checkbox "delete after import" on the photo import selection dialog.
Could be something for a future update.

Having said that, it could make sense to just swap the button around, but then I would say the two options clash with the original intent of the dialog box: "keep" would map to "yes" and "delete" would map to "no".

This isn't really a problem. The "yes" and "no" values are only visible in the code, not in the UI as the user experiences it. Let's do this.

PS: Taking a step back, there are other ways of handling this. Other existing photo importers (across OSes) use different UI approaches. I've seen a few that handle this as part of the settings, offering a choice: "always keep", "always delete", "always ask". Others offer a checkbox "delete after import" on the photo import selection dialog.

That makes sense to me!

bdevries updated this revision to Diff 68908.Oct 28 2019, 8:24 PM

Swap keep and delete buttons. This makes keep the default action.

ngraham edited the summary of this revision. (Show Details)Oct 28 2019, 9:44 PM
ngraham accepted this revision.Oct 28 2019, 9:48 PM
This revision is now accepted and ready to land.Oct 28 2019, 9:48 PM

PS: Taking a step back, there are other ways of handling this. Other existing photo importers (across OSes) use different UI approaches. I've seen a few that handle this as part of the settings, offering a choice: "always keep", "always delete", "always ask". Others offer a checkbox "delete after import" on the photo import selection dialog.

That makes sense to me!

And feel free to implement this if you feel like it.

This revision was automatically updated to reflect the committed changes.

I'll certainly consider it.
Let's see if I can find the time. :-)