After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773562 - It's possible to drag a list row widget out of the window, making the task unrecoverable but still present
It's possible to drag a list row widget out of the window, making the task un...
Status: RESOLVED FIXED
Product: gnome-todo
Classification: Other
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME To Do maintainer(s)
GNOME To Do maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-10-27 01:00 UTC by Daniel Boles
Modified: 2017-04-09 11:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screencast (469.89 KB, video/webm)
2016-10-27 01:00 UTC, Daniel Boles
  Details
screencast (469.89 KB, video/webm)
2016-10-27 01:05 UTC, Daniel Boles
  Details
[PATCH] GtdTaskRow: Unhide GtdTaskRow when DnD fails (2.48 KB, patch)
2017-04-07 10:27 UTC, Jens Sauer
none Details | Review
task-row: show row when drag fails (2.40 KB, patch)
2017-04-07 17:10 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Daniel Boles 2016-10-27 01:00:33 UTC
Created attachment 338559 [details]
screencast

Please see the attached screencast.

We can grab the DND handle and drag the task row out of the ListBox and window. At first, this seems to follow the convention of several other programs (e.g. word processors removing tabs, Mac OS X Doc removing apps etc) where dragging it away means 'delete me'... However, this is not the case. The sidebar stays open and allows editing the task - or deleting it properly, generating a widget assertion failure. And the task still shows in the List preview on the lists page. But it can't be recovered again to use it.

Dragging out of the listbox should either be impossible (i.e. the widget should not disappear), or it should fully delete the task.
Comment 1 Daniel Boles 2016-10-27 01:05:04 UTC
Created attachment 338560 [details]
screencast

slightly better
Comment 2 Jens Sauer 2017-04-07 10:27:55 UTC
Created attachment 349452 [details] [review]
[PATCH] GtdTaskRow: Unhide GtdTaskRow when DnD fails
Comment 3 Daniel Boles 2017-04-07 10:35:33 UTC
Surely according to my error message, the problem is that the widget is no longer valid, not that it's just hidden?
Comment 4 Jens Sauer 2017-04-07 10:52:27 UTC
I understand what you mean. I can reproduce you behavior with the code from master.

When the drag and drop starts, the task hides itself and is shown again when a
successful DnD was made.
But when the DnD fails (moving task out of the window) it stays hidden as long
as you reopen the task list.

This patch fixes this, and the critical messages does not appear when a task is deleted.
Comment 5 Georges Basile Stavracas Neto 2017-04-07 17:01:03 UTC
Review of attachment 349452 [details] [review]:

Great job! A minor nitpick on the commit message: it doesn't follow GNOME To Do standard. It should be:

"task-row: unhide row when drag fails"

And we don't use "See also".
Comment 6 Georges Basile Stavracas Neto 2017-04-07 17:10:27 UTC
Created attachment 349497 [details] [review]
task-row: show row when drag fails

When a task is being draged out of the window or into the GtdEditPane it
disappears from the task list until the list is reopened.
Comment 7 Georges Basile Stavracas Neto 2017-04-07 17:12:28 UTC
Thanks for the patch!

Attachment 349497 [details] pushed as 59f168e - task-row: show row when drag fails
Comment 8 Georges Basile Stavracas Neto 2017-04-08 22:28:21 UTC
I just want to state that, while the commit message needed a minor tweak, the code was a high-quality piece. Good job!
Comment 9 Mohammed Sadiq 2017-04-09 01:47:53 UTC
There are situations where the dragging will succeed, but still shouldn't be removed from ToDo list.

Say for example, it is possible to dnd some item to gnome-calendar, which will succeed, and thus the item will be hidden (removed?) from gnome-todo, which shouldn't happen. So if the the event is successfully dragged to some other application, only a copy of the item should be drag and dropped.

Thanks
Comment 10 Jens Sauer 2017-04-09 10:27:08 UTC
(In reply to Georges Basile Stavracas Neto from comment #8)
> I just want to state that, while the commit message needed a minor tweak,
> the code was a high-quality piece. Good job!

Thanks a lot for this.

Sorry for messing up the commit message. I did not made that much research on
how you write the identifier... Shame on me.
Many guides recommend to capitalize the first letter of the commit message, even
after a lower case identifier.
In my opinion the reading of: "task-row: Show row when drag fails" is easier than
"task-row: show row when drag fails".

For the next patches I will remember your convention on the commit message.

About the "See also": I just wanted to state, that this patch possibly fixes both
issues, because it might be a duplicate.
Comment 11 Jens Sauer 2017-04-09 10:43:15 UTC
(In reply to Mohammed Sadiq from comment #9)
> There are situations where the dragging will succeed, but still shouldn't be
> removed from ToDo list.
> 
> Say for example, it is possible to dnd some item to gnome-calendar, which
> will succeed, and thus the item will be hidden (removed?) from gnome-todo,
> which shouldn't happen. So if the the event is successfully dragged to some
> other application, only a copy of the item should be drag and dropped.
> 
> Thanks

Can you please give more details on how you make a successful drag and drop to gnome-calendar?

I can reproduce the hiding on gnome-todo 3.22.1 but not with this patch applied.
Comment 12 Mohammed Sadiq 2017-04-09 10:52:49 UTC
(In reply to Jens Sauer from comment #11)
> Can you please give more details on how you make a successful drag and drop
> to gnome-calendar?
> 

Sure. Follow the steps to reproduce:
1. Open gnome-todo and gnome-calendar 
2. switch gnome-calendar to month view (or some other view)
3. open some list in gnome-todo
4. drag some task from gnome-todo to some month column (say April 9) in gnome-calendar.

Result:
That task goes hidden in gnome-todo
Comment 13 Jens Sauer 2017-04-09 11:01:45 UTC
(In reply to Mohammed Sadiq from comment #12)
> Sure. Follow the steps to reproduce:
> 1. Open gnome-todo and gnome-calendar 
> 2. switch gnome-calendar to month view (or some other view)
> 3. open some list in gnome-todo
> 4. drag some task from gnome-todo to some month column (say April 9) in
> gnome-calendar.
> 
> Result:
> That task goes hidden in gnome-todo

Ok, but the task does not appear as a calendar item in gnome-calendar right?
It just disappears from gnome-todo.

I can not reproduce your described issue with the patch applied, I consider it as fixed.