-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
More safely delete files #2569
More safely delete files #2569
Conversation
ca095c0
to
a6518db
Compare
# Conflicts: # src/main/java/net/sf/jabref/gui/fieldeditors/FileListEditor.java
|
||
int userConfirm = JOptionPane.showConfirmDialog(null, Localization.lang("Are you sure you want to delete this file?"), Localization.lang("Warning"), JOptionPane.YES_NO_OPTION); | ||
if (userConfirm == JOptionPane.YES_OPTION) { |
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.
Please don't use simple YES/NO Buttons:
http://www.uxdesignedge.com/2010/06/are-you-sure-how-to-write-effective-confirmations/
Better add explicit named Buttons Delete file permanently and Cancel:
As I just did this yesterday for another case, here is a sample code:
String[] options = {Localization.lang("Move file"), Localization.lang("Cancel")};
int dialogResult = JOptionPane.showOptionDialog(frame, "Move file to file directory" + fileDir.get(),
"Move",
JOptionPane.INFORMATION_MESSAGE, JOptionPane.YES_NO_CANCEL_OPTION, null, options, options[0]);
if (dialogResult == JOptionPane.YES_OPTION) {
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.
Hm, one can argue if this really adds so much value. I think the functionality is clear with the question Do you really want to delete this file?
. It just adds more Strings that need to be translated. However, I'm OK with implementing this.
In general, what do @JabRef/developers think about this?
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.
There are just a few more Strings, but it really helps to improve usability a lot! Here is a more detailed explanation . http://ux.stackexchange.com/questions/756/what-are-some-alternatives-to-the-phrase-are-you-sure-you-want-to-xyz-in-confi
See also JabRef#149
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 understand it, tho not sure if I really agree 😄
1ae2814
to
d8086bd
Compare
See #245