Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367363 - Collapse all doesn't revert twisties to correct state
Summary: Collapse all doesn't revert twisties to correct state
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 RC2   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 369101 371651 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-21 13:46 EST by John Arthorne CLA
Modified: 2012-02-15 14:47 EST (History)
3 users (show)

See Also:
libingw: review+


Attachments
Screen shot (11.40 KB, image/png)
2011-12-21 13:47 EST, John Arthorne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2011-12-21 13:46:44 EST
0.4 M1

- Perform a search with multiple results
- Expand some of the results
- Click "Collapse All"

-> The tree collapses, but the twistie icons don't change state. I will attach a screen shot.
Comment 1 John Arthorne CLA 2011-12-21 13:47:31 EST
Created attachment 208703 [details]
Screen shot
Comment 2 Susan McCourt CLA 2011-12-22 11:38:14 EST
i'll look at this, I think it's the tree table.
Comment 3 John Arthorne CLA 2012-01-19 11:56:59 EST
*** Bug 369101 has been marked as a duplicate of this bug. ***
Comment 4 Susan McCourt CLA 2012-02-14 17:10:40 EST
Pushed a proposed fix to the remote branch:
origin/bug367363 

The problem is that in the past we've had the explorer renderer anticipate when the treetable might need to update expand/collapse visuals and pass in the classes needed to do so.  This has always been a "leak" of knowledge from renderer back to the widget, because the widget doesn't care at all anywhere else how the renderer draws things.  The fact that it "might need to add or remove an image class in certain situations" is bogus.

As we've added more programmatic ways to alter the expand/collapse state, this has gotten messier.

So I added a method in the common renderer for updating expand/collapse visuals and now the treetable calls this method on any programmatic expand or collapse.

Since this is RC2, I elected not to clean up the bogus API.  Opened bug 371543 to fix this later.  So we are using a mix of techniques in the proposed fix to minimize risk/change.
- we still use the old toggle API with the image classes and treetable does not call the new "updateExpandVisuals" from the toggle API
- explorer-table doesn't pass image classes into refreshAndExpand anymore
- the treetable now calls the new method for all programmatic expand/collapse, including refreshAndExpand. I don't think anyone uses the image class parameters anymore but I'm being paranoid and leaving the code in there for later removal.

Libing, can you review?
Comment 5 Susan McCourt CLA 2012-02-14 17:13:24 EST
by the way, this fix also fixes a symptom I've often noticed and apparently never opened a bug for:

- expand a folder in the nav
- reload the page
- the expansion is remembered/performed but the twistie is wrong
Comment 6 libing wang CLA 2012-02-15 11:37:25 EST
I've reviewed the code and tested on both file navigator and search pages.
+1.
Comment 7 Susan McCourt CLA 2012-02-15 13:59:48 EST
pushed fix.
thanks, Libing.
Comment 8 Susan McCourt CLA 2012-02-15 14:47:32 EST
*** Bug 371651 has been marked as a duplicate of this bug. ***