Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339303 - [client] collapsing the splitter on the editor flushes editor to 0 rather than margin
Summary: [client] collapsing the splitter on the editor flushes editor to 0 rather tha...
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 19:27 EST by Susan McCourt CLA
Modified: 2011-09-01 11:41 EDT (History)
1 user (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 2011-03-08 19:27:15 EST
We now have a margin on the outliner in the editor page.
But the splitter code hard-codes "close outliner" to a position of 0.
Need to position it relative to parent, or else calculate the margin.
Comment 1 Susan McCourt CLA 2011-03-08 19:28:31 EST
will take a look for M6.
Libing, would you have time to suggest a fix?
Comment 2 Susan McCourt CLA 2011-03-08 21:45:27 EST
I looked into this a little.
Verified that on IE, FF, and Chrome, the behavior is as follows:
- closing the splitter will flush the editor to 0
- opening it will restore the margin

The problem was not hard-coding the position (it was setting the width to 0, not the position).  The problem is that the left pane has the margin-left and the right pane does not.  We could "fix" this by ensuring that any margin-left on the left pane gets set into the rightpane when the splitter collapses, and restoring the margin-left back to whatever it was when the splitter opens again.

But I decided that for M6, we can live with this (and declare this is a "feature" because when you close the outliner, it means you need every piece of horizontal space.)

When we start using the splitter in other windows such as nav, we should fix this.
Comment 3 Susan McCourt CLA 2011-03-30 19:02:16 EDT
(In reply to comment #2)

> The problem was not hard-coding the position (it was setting the width to 0,
> not the position).  The problem is that the left pane has the margin-left and
> the right pane does not.  We could "fix" this by ensuring that any margin-left
> on the left pane gets set into the rightpane when the splitter collapses, and
> restoring the margin-left back to whatever it was when the splitter opens
> again.

Actually, this approach does not work.  If you step through the code, the pane ends up where you think it should (visually aligned with the 44 px banner) and then when the splitter toggles itself closed, it performs a layout that ends up flushing it left.  I think the fix is going to involve some nesting, whereby some outer div in the center of the border container provides the margin for the orion logo, and then an inner border container does the splitting.
Comment 4 Susan McCourt CLA 2011-04-25 20:01:39 EDT
(In reply to comment #3)
> I think the fix is going to involve some nesting, whereby
> some outer div in the center of the border container provides the margin for
> the orion logo, and then an inner border container does the splitting.

This is what I did.  Using dijit.layout.BorderContainer for the outer border container, and then nested a splitter BorderContainer inside the center area of that one.  Did this for navigator and editor.