Bug 212967 - sorting of query nodes and archive categories in the task list
Summary: sorting of query nodes and archive categories in the task list
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 3.2   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted, noteworthy
Depends on:
Blocks: 217530 231336
  Show dependency tree
 
Reported: 2007-12-13 22:01 EST by Eugene Kuleshov CLA
Modified: 2009-05-21 22:26 EDT (History)
3 users (show)

See Also:


Attachments
patch (15.83 KB, patch)
2009-03-01 02:36 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (5.75 KB, application/octet-stream)
2009-03-01 02:36 EST, Frank Becker CLA
no flags Details
updated patch for 3.2 (15.84 KB, patch)
2009-03-21 16:09 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (6.71 KB, application/octet-stream)
2009-03-21 16:09 EDT, Frank Becker CLA
no flags Details
patch no presentation Combo added in sortdialog (21.91 KB, patch)
2009-05-06 17:00 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (3.61 KB, application/octet-stream)
2009-05-06 17:00 EDT, Frank Becker CLA
no flags Details
updated patch (11.82 KB, patch)
2009-05-07 15:03 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (4.51 KB, application/octet-stream)
2009-05-07 15:03 EDT, Frank Becker CLA
no flags Details
next iteration (14.43 KB, patch)
2009-05-08 00:43 EDT, Steffen Pingel CLA
no flags Details | Diff
next patch version (26.79 KB, patch)
2009-05-08 17:44 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (6.27 KB, application/octet-stream)
2009-05-08 17:44 EDT, Frank Becker CLA
no flags Details
patch with new UI (54.65 KB, patch)
2009-05-17 17:03 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (10.97 KB, application/octet-stream)
2009-05-17 17:03 EDT, Frank Becker CLA
no flags Details
screenshot for UI review (17.92 KB, image/png)
2009-05-19 02:31 EDT, Steffen Pingel CLA
no flags Details
updated UI patch (58.14 KB, patch)
2009-05-20 18:12 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (11.30 KB, application/octet-stream)
2009-05-20 18:12 EDT, Frank Becker CLA
no flags Details
updated patch (60.38 KB, patch)
2009-05-21 21:39 EDT, Steffen Pingel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Kuleshov CLA 2007-12-13 22:01:37 EST
Currently all Archive categories are placed at the end of the task list. In result, active category can be far apart from the actual query node. 

I suggest, to change default sorting order and use the following rules:

-- All local categories should be at the top of the Taks List view
-- The rest of the task list should be sorted using the following order:
   -- repository (same order as in Repositories view)
   -- query nodes sorted alphabetically by query name
   -- Archive category for this repository should be placed at the end of the list
   
For example:

- My Tasks
- Uncategorized
- Eclipse/aj [Eclipse.org]
- Eclipse/Mylyn [Eclipse.org]
- Archive [Eclipse.org]
- m2eclipse [Codehaus]
- Archive [Codehaus]
- Subclipse [Subclipse]
- Archive [Subclipse]

This way it should be easier to see if query hits are dropped from queries and moved into the Archive
Comment 1 Steffen Pingel CLA 2009-01-03 08:07:15 EST
Frank, this is related to your work on bug 231336. To resolve this bug I would suggest to add an additional combo selection for sorting of root nodes that allows choosing between alphabetical sorting and by repository sorting. TaskRepositoriesSorter contains the implementation that is used by the repository selection wizard page and if possible the code should be extracted and reused.
Comment 2 Frank Becker CLA 2009-01-03 09:11:44 EST
(In reply to comment #1)
> Frank, this is related to your work on bug 231336. To resolve this bug I would
> suggest to add an additional combo selection for sorting of root nodes that
> allows choosing between alphabetical sorting and by repository sorting.
> TaskRepositoriesSorter contains the implementation that is used by the
> repository selection wizard page and if possible the code should be extracted
> and reused.
> 

Steffen, I think that we have three ways for sort here:

1) see bug #231336
  this is sorting first by types and then  alphabetical sorting of the names
2) alphabetical sorting of the names and for same names then by types
3) repository sorting and then by types (see description)

with the following type:
-  Uncategorized [Inbox]
-  Unsubmitted [Drafts]
-  Categories 
-  Queries
-  TaskGroup
-  Unmatched [Archive]

What do you think?
Comment 3 Steffen Pingel CLA 2009-01-06 00:50:01 EST
That sounds good. Here are examples to make sure we mean the same thing:

1)  Grouped by Categories and Queries

Uncategorized
Unsubmitted [Eclipse]
Unsubmitted [Other]
Category
An Eclipse Query
Other Query
Unmatched [Eclipse]
Unmatched [Other]

2) No grouping

Uncategorized
Unsubmitted [Eclipse]
Unsubmitted [Other]
An Eclipse Query
Category
Other Query
Unmatched [Eclipse]
Unmatched [Other]

3)  Grouped by Categories and Repositories

Uncategorized
Category
An Eclipse Query
Unsubmitted [Eclipse]
Unmatched [Eclipse]
Other Query
Unsubmitted [Other]
Unmatched [Other]
Comment 4 Frank Becker CLA 2009-03-01 02:36:19 EST
Created attachment 127099 [details]
patch

New Task Presentation are defined to support this. If you dont like the names feel free to change them.
Comment 5 Frank Becker CLA 2009-03-01 02:36:23 EST
Created attachment 127100 [details]
mylyn/context/zip
Comment 6 Frank Becker CLA 2009-03-21 16:09:18 EDT
Created attachment 129524 [details]
updated patch for 3.2

this is the updated patch
Comment 7 Frank Becker CLA 2009-03-21 16:09:25 EDT
Created attachment 129525 [details]
mylyn/context/zip
Comment 8 Steffen Pingel CLA 2009-05-05 18:04:23 EDT
Would it be possible to add this as an option to the Sort dialog? I think adding additional presentations adds more complexity and this feature seems to be closely related to sorting.
Comment 9 Frank Becker CLA 2009-05-06 17:00:22 EDT
Created attachment 134695 [details]
patch no presentation Combo added in sortdialog

(In reply to comment #8)
> Would it be possible to add this as an option to the Sort dialog? I think adding
> additional presentations adds more complexity and this feature seems to be
> closely related to sorting.

Yes here is an posible implementation. Sorry the cleanup of the not used presentations is not done.
Comment 10 Frank Becker CLA 2009-05-06 17:00:33 EDT
Created attachment 134696 [details]
mylyn/context/zip
Comment 11 Frank Becker CLA 2009-05-07 15:03:26 EDT
Created attachment 134832 [details]
updated patch

cleand up version of attachment 134695 [details]
Comment 12 Frank Becker CLA 2009-05-07 15:03:29 EDT
Created attachment 134833 [details]
mylyn/context/zip
Comment 13 Steffen Pingel CLA 2009-05-08 00:43:23 EDT
Created attachment 134916 [details]
next iteration
Comment 14 Steffen Pingel CLA 2009-05-08 00:45:37 EDT
I generalized the implementation slightly to avoid some code duplication. Frank, can you take a look and let me know if that makes sense? I noticed that the setting does not get persisted at the moment. Could you add that to TaskListView using GroupBy.name() and GroupBy.valueOf()?
Comment 15 Frank Becker CLA 2009-05-08 17:44:08 EDT
Created attachment 135034 [details]
next patch version

next iteration was veryfied and the change from comment#14 are included.
Comment 16 Frank Becker CLA 2009-05-08 17:44:10 EDT
Created attachment 135035 [details]
mylyn/context/zip
Comment 17 Mik Kersten CLA 2009-05-14 19:15:22 EDT
Good stuff.  Steffen and I did a UI review and came up with the following simple changes, which Steffen may be able to implement.  It would be nice if the "Theny by" didn't enable themselves until the thing above them had a selection

pre.. 
-- Queries and Categories ----
| Group by: 	[    ]         |
------------------------------

-- Tasks ---------------------
| Sort by: 		[    ] (x) ... |
| Then by:    [    ] (x) ... |
| Then by:    [    ] (x) ... |
------------------------------
Comment 18 Frank Becker CLA 2009-05-17 17:03:49 EDT
Created attachment 136130 [details]
patch with new UI

layout from comment 17 is now supported.
Comment 19 Frank Becker CLA 2009-05-17 17:03:53 EDT
Created attachment 136131 [details]
mylyn/context/zip
Comment 20 Steffen Pingel CLA 2009-05-19 02:31:07 EDT
Created attachment 136261 [details]
screenshot for UI review
Comment 21 Steffen Pingel CLA 2009-05-19 02:31:14 EDT
The patch looks really good. I like the refactoring that you made. The code reuse is much better now. Can you add a simple test case that makes sure the preference migration works?

One oddity I noticed is that Ascending/Descending would sometimes change if I selected a sort key in the sort dialog that had already been selected in another combo box. Also the enablement for Ascending/Descending doesn't seem to work if I select a sort key in the last combo box. Can you check that?
Comment 22 Frank Becker CLA 2009-05-20 18:12:01 EDT
Created attachment 136585 [details]
updated UI patch

(In reply to comment #21)
> The patch looks really good. I like the refactoring that you made. The code
> reuse is much better now. Can you add a simple test case that makes sure the
> preference migration works?
> 
> One oddity I noticed is that Ascending/Descending would sometimes change if I
> selected a sort key in the sort dialog that had already been selected in another
> combo box.
This was not a Bug, it was a Feature which is commented out now.
> Also the enablement for Ascending/Descending doesn't seem to work if
> I select a sort key in the last combo box. Can you check that?

All other is done.
Comment 23 Frank Becker CLA 2009-05-20 18:12:08 EDT
Created attachment 136586 [details]
mylyn/context/zip
Comment 24 Steffen Pingel CLA 2009-05-21 05:30:49 EDT
Thanks for making the changes. This is looking great! I'll do a quick review tomorrow and then apply the patch.
Comment 25 Steffen Pingel CLA 2009-05-21 21:39:41 EDT
Created attachment 136747 [details]
updated patch
Comment 26 Steffen Pingel CLA 2009-05-21 22:26:42 EDT
I have committed my last patch with a few additional modifications. Frank, I added groups to the UI, renamed a few classes and kept the migration code in TaskListView since that is where the memento was originally handled.

Thanks for your hard work and this great patch!