GTG

Merge lp:~kiddo/gtg/pretty-delete-confirmation into lp:~gtg/gtg/old-trunk

Proposed by Jeff Fortin Tam
Status: Rejected
Rejected by: Luca Invernizzi
Proposed branch: lp:~kiddo/gtg/pretty-delete-confirmation
Merge into: lp:~gtg/gtg/old-trunk
Diff against target: 88 lines (+13/-12)
2 files modified
GTG/taskbrowser/browser.py (+6/-3)
GTG/taskbrowser/taskbrowser.glade (+7/-9)
To merge this branch: bzr merge lp:~kiddo/gtg/pretty-delete-confirmation
Reviewer Review Type Date Requested Status
Luca Invernizzi (community) Disapprove
Bertrand Rousseau (community) Disapprove
Review via email: mp+16294@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jeff Fortin Tam (kiddo) wrote :

Fixed the various usability issues I saw with the current delete confirmation dialog.

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote :

Thanks for your patch! I have 2 small remarks:

1 - in browser.py, around line 1364, could you rename variable self.tasks_to_delete as self.del_tasks_cnt (or similar), just to make clear that it is not a list of tasks but an integer. It looks a bit confusing.

2 - could update CHANGELOG and AUTHORS by mentioning your changes and listing you as a contributor for the current version?

Thanks!

review: Needs Fixing
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

I don't agree. I don't understand why we should remove the title of removed tags. We should at least list the first one because removing a task also remove the subtasks and, without some titles, you might click OK without checking.

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote :

Hmm, I didn't see that change. You're right, it should stay, but I also think it should also be changed since displaying all the deleted tasks in the dialog text also clutters it. We probably should adopt a behavior similar to gedit's when you close it with several unsaved documents: having a small treeview inside the the dialog when several tasks are going to be removed. By using this, we allow scrolling and we maintain dialog sizes to sane values. But that's another discussion that requires to open a bug. As far as this patch is concerned, this removal forces me to disapprove the patch.

review: Disapprove
Revision history for this message
Jeff Fortin Tam (kiddo) wrote :

I did not see this as a problem, as it 1) mentions that there are
multiple tasks selected 2) the user just made the *explicit* action of
selecting them.

Since the user just took the time to manually select which tasks to
delete, I can pretty much guarantee you that he/she is supposed to know
what he just selected. Bringing the list up to his face a second time
will *not* make him/her double-check, it will just annoy the user. Why
would the user need to see this stuff twice? Does the gnome trash show
you the "list" of files you are permanently deleting when you empty it?
Nope :)

The reasons I see for the existence of this dialog are:
1) prevent accidents resulting from hitting the Delete key on the
keyboard, or the wrong toolbar button (since there's no undo)
2) warn the user that there is no undo
3) warn the user that there is/isn't more than one item selected

It's not like gedit's unsaved document feature. There's no concept of
save vs unsaved here. It's not a "did you forget?", it's a "warning, was
it you that triggered this action or was it your cat walking on your
keyboard?"

The user wants to friggin' delete them :) keep it simple!

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote :

It could also happen that you choose to delete a parent thinking it's
ok, then you realise that there's a chid task you still need to keep.
It happened to me once, I was relieved having this list remembering me
this task before I deleted it.

On Thu, Dec 17, 2009 at 9:18 PM, Jean-François Fortin Tam
<email address hidden> wrote:
> I did not see this as a problem, as it 1) mentions that there are
> multiple tasks selected 2) the user just made the *explicit* action of
> selecting them.
>
> Since the user just took the time to manually select which tasks to
> delete, I can pretty much guarantee you that he/she is supposed to know
> what he just selected. Bringing the list up to his face a second time
> will *not* make him/her double-check, it will just annoy the user. Why
> would the user need to see this stuff twice? Does the gnome trash show
> you the "list" of files you are permanently deleting when you empty it?
> Nope :)
>
> The reasons I see for the existence of this dialog are:
> 1) prevent accidents resulting from hitting the Delete key on the
> keyboard, or the wrong toolbar button (since there's no undo)
> 2) warn the user that there is no undo
> 3) warn the user that there is/isn't more than one item selected
>
> It's not like gedit's unsaved document feature. There's no concept of
> save vs unsaved here. It's not a "did you forget?", it's a "warning, was
> it you that triggered this action or was it your cat walking on your
> keyboard?"
>
> The user wants to friggin' delete them :) keep it simple!
>
> --
> https://code.launchpad.net/~kiddo/gtg/pretty-delete-confirmation/+merge/16294
> You are reviewing the proposed merge of lp:~kiddo/gtg/pretty-delete-confirmation into lp:gtg.
>

--
Bertrand Rousseau

Revision history for this message
Jeff Fortin Tam (kiddo) wrote :

Oooh, I see your point now. Well perhaps what could be done is to show
the list if there's only a parent selected, with a third message along
the lines of "hey, it's a parent task, all the following subtasks will
also be deleted: ...". But then this would be beyond my skills and I
wouldn't be able to implement such a listview as you folks suggested.

Other commits in that branch (such as spacing fixes and button label
fixes) might also be of use though.

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote :

We might consider having two different dialogs, yes. Maybe one when
deleting a parent task having uncompleted child tasks (with treeview),
and another for the other cases similar to yours. I'd like to hear
from other people what they think about that.

On Thu, Dec 17, 2009 at 9:30 PM, Jean-François Fortin Tam
<email address hidden> wrote:
> Oooh, I see your point now. Well perhaps what could be done is to show
> the list if there's only a parent selected, with a third message along
> the lines of "hey, it's a parent task, all the following subtasks will
> also be deleted: ...". But then this would be beyond my skills and I
> wouldn't be able to implement such a listview as you folks suggested.
>
> Other commits in that branch (such as spacing fixes and button label
> fixes) might also be of use though.
>
> --
> https://code.launchpad.net/~kiddo/gtg/pretty-delete-confirmation/+merge/16294
> You are reviewing the proposed merge of lp:~kiddo/gtg/pretty-delete-confirmation into lp:gtg.
>

--
Bertrand Rousseau

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

What about :

You asked to remove X tasks but this will result in also deleting Y subtasks listed here:
-
-
-

(btw, I like Gedit approach)

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

I agree that we could have a better delete-dialog, but I don't think that this is the right way.
Since no consensus has been reached, I'll close this bug request for now, as two different discussions on the same matter are ongoing here and in bug #497798 (please move the discussion there).

review: Disapprove

Unmerged revisions

484. By Jeff Fortin Tam

HIG: "Between labels and associated components, leave 12 horizontal pixels."

483. By Jeff Fortin Tam

Cleanup button labels, this also makes them fit better with singular/plural

482. By Jeff Fortin Tam

Create a set of singular/plural labels that simply mention the number of tasks that may be deleted

481. By Jeff Fortin Tam

Tweak the spacing values a little bit

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'GTG/taskbrowser/browser.py'
2--- GTG/taskbrowser/browser.py 2009-12-17 11:09:37 +0000
3+++ GTG/taskbrowser/browser.py 2009-12-17 16:24:15 +0000
4@@ -1364,15 +1364,18 @@
5 else:
6 self.tids_todelete = [tid]
7 #We must at least have something to delete !
8- if len(self.tids_todelete) > 0:
9+ self.tasks_to_delete = len(self.tids_todelete)
10+ if self.tasks_to_delete > 0:
11 label = self.builder.get_object("label1")
12 label_text = label.get_text()
13- label_text = label_text[0:label_text.find(":") + 1]
14 # I find the tasks that are going to be deleted
15 titles_list = [self.req.get_task(tid).get_title() \
16 for tid in self.tids_todelete]
17 titles = reduce (lambda x, y: x + "\n - " + y, titles_list)
18- label.set_text("%s %s" % (label_text, titles))
19+ if self.tasks_to_delete == 1:
20+ label.set_text(_("Do you want to permanently delete this task? This operation cannot be undone."))
21+ else:
22+ label.set_text(_("Do you want to permanently delete those %i tasks? This operation cannot be undone.") % (self.tasks_to_delete))
23 delete_dialog = self.builder.get_object("confirm_delete")
24 delete_dialog.run()
25 delete_dialog.hide()
26
27=== modified file 'GTG/taskbrowser/taskbrowser.glade'
28--- GTG/taskbrowser/taskbrowser.glade 2009-12-17 07:57:00 +0000
29+++ GTG/taskbrowser/taskbrowser.glade 2009-12-17 16:24:15 +0000
30@@ -621,7 +621,7 @@
31 <object class="GtkVBox" id="dialog-vbox1">
32 <property name="visible">True</property>
33 <property name="orientation">vertical</property>
34- <property name="spacing">2</property>
35+ <property name="spacing">12</property>
36 <child>
37 <object class="GtkHBox" id="hbox3">
38 <property name="visible">True</property>
39@@ -633,27 +633,25 @@
40 </object>
41 <packing>
42 <property name="fill">False</property>
43- <property name="padding">16</property>
44+ <property name="padding">12</property>
45 <property name="position">0</property>
46 </packing>
47 </child>
48 <child>
49 <object class="GtkLabel" id="label1">
50 <property name="visible">True</property>
51- <property name="label" translatable="yes">&lt;span weight="bold" size="large"&gt;Are you sure you want delete these tasks?&lt;/span&gt;
52-
53-Deleting a task cannot be undone, and will delete the following tasks: </property>
54+ <property name="label" translatable="yes">Do you want to permanently delete those %i tasks? This operation cannot be undone. (note: this text label is overwritten in the code)</property>
55 <property name="use_markup">True</property>
56 <property name="wrap">True</property>
57 </object>
58 <packing>
59- <property name="padding">16</property>
60+ <property name="padding">12</property>
61 <property name="position">1</property>
62 </packing>
63 </child>
64 </object>
65 <packing>
66- <property name="padding">16</property>
67+ <property name="padding">12</property>
68 <property name="position">1</property>
69 </packing>
70 </child>
71@@ -683,7 +681,7 @@
72 <object class="GtkLabel" id="label2">
73 <property name="visible">True</property>
74 <property name="xalign">0</property>
75- <property name="label" translatable="yes">_Keep selected tasks</property>
76+ <property name="label" translatable="yes">_Keep</property>
77 <property name="use_underline">True</property>
78 </object>
79 <packing>
80@@ -721,7 +719,7 @@
81 <child>
82 <object class="GtkLabel" id="label3">
83 <property name="visible">True</property>
84- <property name="label" translatable="yes">Permanently _remove tasks</property>
85+ <property name="label" translatable="yes">Permanently _remove</property>
86 <property name="use_underline">True</property>
87 </object>
88 <packing>

Subscribers

People subscribed via source and target branches

to status/vote changes: