Bug 233269 - [ui] revisit fetch/checkbox/filtering strategy
Summary: [ui] revisit fetch/checkbox/filtering strategy
Status: VERIFIED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 240427 240603 250197 253863 (view as bug list)
Depends on: 237359
Blocks: 224472 235008
  Show dependency tree
 
Reported: 2008-05-21 12:18 EDT by Susan McCourt CLA
Modified: 2008-12-09 17:35 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2008-05-21 12:18:07 EDT
Search on all the M7/RC1/RC2 bugs for p2 ui and see the list of problems trying to get fetching/checkboxes/filtering working together.

Boris suggests I try data binding in 3.5 (although support for asynch fetch would need to be added, I think).

If this is not practical, I would likely take the p2 subclasses of FilteredTree, DeferredTreeContentManager, and CheckboxTreeViewer and craft something way more specific to our problem.  The current solution started out optimistically that we wouldn't have to override much, and by the end of the release we had overridden most of the important parts.

As far as filtering/fetch workflow, Kim suggests keeping the filter alive while loading repos...we could know when we were loading and save the keystrokes for the filter job.  This would be simple now that we've overridden the filter job, too.  But it's too late right now.
Comment 1 Susan McCourt CLA 2008-05-21 12:19:35 EDT
The end goal for p2 would be to pass this problem off to platform UI (even if it's still me doing the work).
Comment 2 Boris Bokowski CLA 2008-05-21 12:28:30 EDT
Let me know when you have time to look at this. At the very least, I would like to write a snippet using data binding to get a better understanding of the problem and how some of the classes in data binding could help.
Comment 3 Susan McCourt CLA 2008-05-21 12:43:29 EDT
We'll probably be contributing doc or at least wiki doc after RC4, so maybe some time in July/3.5 M1 timeframe.  This problem is first on my "big issues" list because the installed view will probably move to this kind of presentation also, and I'd like to sort out the mechanism used first.
Comment 4 Susan McCourt CLA 2008-07-14 11:24:12 EDT
*** Bug 240603 has been marked as a duplicate of this bug. ***
Comment 5 Susan McCourt CLA 2008-07-14 11:27:48 EDT
*** Bug 240427 has been marked as a duplicate of this bug. ***
Comment 6 Susan McCourt CLA 2008-09-16 18:45:50 EDT
This bug will be addressed in M3 as part of the new workflows
Comment 7 Susan McCourt CLA 2008-10-09 14:46:10 EDT
*** Bug 250197 has been marked as a duplicate of this bug. ***
Comment 8 Susan McCourt CLA 2008-10-09 14:48:49 EDT
At this point I'm not sure whether we'll end up replacing the checkbox/async
infrastructure.  At the minimum we need to clean up the filter workflow so that
we only filter after a load.  What needs to be done is to see if this can be
accomplished easily in the current infrastructure or whether it's worth moving
to data binding.
Comment 9 Susan McCourt CLA 2008-10-21 13:50:21 EDT
this work has moved to M4
Comment 10 Susan McCourt CLA 2008-11-05 11:44:59 EST
*** Bug 253863 has been marked as a duplicate of this bug. ***
Comment 11 Susan McCourt CLA 2008-11-26 22:55:16 EST
Fixed in HEAD >20081126.
Removed a lot of hacks/workarounds and fixed the filter workflow.  I think both the user workflows and the code itself is cleaner.

Workflow changes:  
- filter box never grays, it just collects input and filter doesn't occur until everything is loaded.  Note that we preload repositories in the normal workflows so there's not typically a long delay
- if user adds a new repository, making the list go "Pending..." the filter remains alive and when everything is loaded, the filter applies
- selection remains as before - checkbox selections are preserved across filters, but if the list remains filtered, only the visible selections are fed to the next page.  If user clears the filter, all previously selected items return
 so that we don't gray the filter box.

Code changes/some history:
- The filter feature in the available software list showed up late and got fixed band-aid by band-aid in the RC cycle, which meant minimal code change/review mode vs. wholescale cleanup.  So I wanted to revisit this.

- Boris provided a data binding snippet in bug #237539 which I never quite got working.  Basically I ended up having some of the same problems I had with the p2 hacks (trying to keep the check states correct across filters, managing expansion, coordinating the repo load against filtering, etc.).  Since it wasn't instant success, decided to come back to it later.  

- In the interim I fixed a few more chronic problems in the p2 fetch code

- I decided to go back and remove all the band-aids and try to fix the workflow with the existing FilteredTree subclass before considering a switch to data binding.  I removed a bunch of code and built it back up with specific solutions, rather than trying to be so generic.  So the p2 subclass of FilteredTree is now quite reasonable in what it does.  It mostly works around problems with ContainerCheckedTreeViewer and also manages the coordination of the repo loading and the filter job.  It also provides the view menu next to the filter box.

- Given that the problems are solved and the code is simplified, I elected not to go back and revisit data binding as a solution.
Comment 12 Susan McCourt CLA 2008-12-09 17:35:38 EST
verified on WinXP, Build id: I20081209-0100
during test pass.