Bug 235288 - [ui] Available software dialog should preserve expansion state of tree when user changes view or filtering
Summary: [ui] Available software dialog should preserve expansion state of tree when u...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P4 enhancement (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
: 240802 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-03 04:56 EDT by Andreas Goetz CLA
Modified: 2009-03-25 18:43 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Goetz CLA 2008-06-03 04:56:09 EDT
1) When applying a filter in the available software dialog and then toggling either of the two checkboxes, the filter is not reapplied and the tree collapsed back to the first level. 
2) Also (though rather a separate issue), the filtering performance is bad, e.g. 2sec on 1.6GHz dual core, and blocks the ui.
Comment 1 Pascal Rapicault CLA 2008-06-03 09:44:58 EDT
Which build do you use?
Comment 2 Andreas Goetz CLA 2008-06-03 10:37:21 EDT
RC3
Comment 3 Susan McCourt CLA 2008-06-03 15:15:58 EDT
The filter is still being applied, but the tree is collapsed.
For example, I typed "XML" and then switched the checkbox off for "show latest versoins."  The tree collapses (annoying) but if I expand everything, it still only shows items that match XML.

I think there is another bug somewhere for remembering expansion state, but I don't see it. 

Keeping the expansion state across viewer refreshes would help improve many of the workflows.
Comment 4 Susan McCourt CLA 2008-06-25 15:51:14 EDT
generalizing title, as this is a general polish issue
Comment 5 Susan McCourt CLA 2008-07-15 17:29:46 EDT
*** Bug 240802 has been marked as a duplicate of this bug. ***
Comment 6 Susan McCourt CLA 2008-07-15 17:30:46 EDT
Duplicate bug also mentions the loss of checkbox state, this should be reviewed too.
Comment 7 Susan McCourt CLA 2009-01-19 13:45:38 EST
at a minimum we need to force a tree expand when the view is changed and filtering is used.  I think this is a one-liner.  
A more general solution involves remembering the expansion state of all elements before any available view structural change. 

Marking M6 because I'm focusing on major feature freeze for M5 and this can be addded after that.

Comment 8 Susan McCourt CLA 2009-01-26 11:59:59 EST
The more I think about it, always expanding the tree probably makes the most sense.  
- in 3.4, we included the "site view" so specifically we did not want to auto-expand which would load every repo.  In 3.5, we auto-load the repos and the site view is gone, so the performance is not a determining factor
- in the p2-dev mailing list, it was pointed out that not expanding a category "invites" the user to select a category and install its contents without looking inside
Comment 9 Susan McCourt CLA 2009-03-25 18:43:09 EDT
Fixed in HEAD >20090325.
Expansion state is preserved across various filters (checkboxes, site filter, etc.).  For example, if you expand a category in one site, and then decide to work with "All Available Sites", the category remains expanded.

I did not see the problem described on Bug 240802 regarding check state being lost when checking and unchecking checkboxes such as "Show latest versions", but it's very possible that this got fixed somewhere along the way with other changes.

One thing we still do not do (on purpose for now) is preserve check state when you move from site to site in the "work with" combo.  Once you've chosen to work with, say, site Foo, we don't remember check state for items in another repo.