Bug 498228 - Trace deletion confirmation dialog is not a native confirmation dialog
Summary: Trace deletion confirmation dialog is not a native confirmation dialog
Status: NEW
Alias: None
Product: Tracecompass
Classification: Tools
Component: TMF (show other bugs)
Version: 2.1.0   Edit
Hardware: PC Linux
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Project Inbox CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-20 14:49 EDT by Alexandre Montplaisir CLA
Modified: 2016-07-21 15:17 EDT (History)
1 user (show)

See Also:


Attachments
Trace deletion confirmation dialog (13.40 KB, image/png)
2016-07-20 14:50 EDT, Alexandre Montplaisir CLA
no flags Details
Experiment deletion confirmation dialog (13.55 KB, image/png)
2016-07-20 14:51 EDT, Alexandre Montplaisir CLA
no flags Details
Bookmark deletion confirmation (15.03 KB, image/png)
2016-07-20 15:26 EDT, Alexandre Montplaisir CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Montplaisir CLA 2016-07-20 14:49:42 EDT
The confirmation dialog that is popped up when attempting to delete a trace presents [Yes] and [No] buttons, from left to right in this order, no matter the platform. On Gnome/GTK, typically confirmation dialogs will show [Cancel] first, then [OK]. This makes this dialog inconsistent with the rest of the platform.

For reference, the "Delete experiment" dialog uses the correct type of dialog and shows the buttons in the platform-defined order. See attached screenshots.
Comment 1 Alexandre Montplaisir CLA 2016-07-20 14:50:51 EDT
Created attachment 263220 [details]
Trace deletion confirmation dialog
Comment 2 Alexandre Montplaisir CLA 2016-07-20 14:51:15 EDT
Created attachment 263221 [details]
Experiment deletion confirmation dialog
Comment 3 Marc-André Laperle CLA 2016-07-20 14:52:13 EDT
It was changed so that we could control it in SWTBot. We could change the one for experiments too.
Comment 4 Alexandre Montplaisir CLA 2016-07-20 14:56:55 EDT
> It was changed so that we could control it in SWTBot. We could change the one 
> for experiments too.

Please no! The dialog should follow the platform guidelines, the experiment one is the correct one here.
Comment 5 Marc-André Laperle CLA 2016-07-20 14:57:08 EDT
I think the order and the text of the buttons were like that before though (when it was native). But we can change them.
Comment 6 Marc-André Laperle CLA 2016-07-20 14:59:28 EDT
I think there's a way to let JFace use the platform's order of buttons, I'll have to double check.
Comment 7 Alexandre Montplaisir CLA 2016-07-20 15:26:03 EDT
Created attachment 263222 [details]
Bookmark deletion confirmation

By chance, I found a dialog that seems to do what we want: [Yes][No] but order by the platform order. It appears when we attempt to delete a bookmark.

Although [No] should the option selected by default!
Comment 8 Marc-André Laperle CLA 2016-07-21 11:07:45 EDT
(In reply to Alexandre Montplaisir from comment #7)
> Although [No] should the option selected by default!

About that, I was looking for such a dialog in gnome "apps", to use as comparison to make sure we're doing things right. I've found shift-delete in Nautilus... but it actually defaults to "Delete" not cancel! Do you know other ones?
Comment 9 Alexandre Montplaisir CLA 2016-07-21 15:11:01 EDT
I'm basing myself off their design guidelines:

https://developer.gnome.org/hig/stable/buttons.html.en

> In a dialog, one button may be made the default button, which is shown
> with a different border and is activated by pressing Return. Often this
> will be the OK or equivalent button. However, if pressing this button by
> mistake could cause a loss of data, do not set a default button for the
> window.

I think we can consider deleting a trace (and its configuration, supplementary files, etc.) to be a "loss of user data".

It seems Nautilus isn't even following the Gnome guidelines!

And it's not just Gnome, even the "big guys" have similar rules:

https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/WindowDialogs.html

> Don’t use a default button if the user’s most likely action is dangerous.
> An example of a dangerous action is one that causes a loss of user data.
> ...
Comment 10 Marc-André Laperle CLA 2016-07-21 15:17:53 EDT
(In reply to Alexandre Montplaisir from comment #9)
> I'm basing myself off their design guidelines:
> 
> https://developer.gnome.org/hig/stable/buttons.html.en

Thanks, that's what I was looking for.