Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 419277

Summary: Splitter should not lay out with sash outside of the viewport.
Product: [ECD] Orion Reporter: Grant Gayed <grant_gayed>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: libingw
Version: 4.0   
Target Milestone: 5.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Grant Gayed CLA 2013-10-11 15:05:03 EDT
I20131010-2306

- open the Git Status page on a project that has at least one change
- select the changed file and press "Side by side"
- maximize your browser's shell
- drag the side-by-side comparison sash as far right as possible
- unmaximize the browser's shell, note that the sash is now not reachable
- refresh the page, select the changed file, press "Side by side"
- the side-by-side comparison opens with the sash and RHS nowhere to be seen (they're off to the right, maximizing your browser's shell will bring them into view)

Remembering the sash position between invocations makes sense, but this page should not lay out with its sash and RHS outside of the viewport.  I was stuck on this because I forgot that my browser had been maximized when I last viewed this page yesterday.

There may be other places in Orion where a similar thing can happen, where sash absolute positions are being remembered.  Perhaps remembering these positions as percentages would be better (?).
Comment 1 libing wang CLA 2013-11-08 16:41:21 EST
The splitter position is quite a generic issue.
We also need to listen to window's resize event on splitter so that it can adjust the splitter position when it is out of the view port.
Comment 2 libing wang CLA 2013-11-08 16:43:44 EST
(In reply to Grant Gayed from comment #0)
> I20131010-2306
> 
> - open the Git Status page on a project that has at least one change
> - select the changed file and press "Side by side"
> - maximize your browser's shell
> - drag the side-by-side comparison sash as far right as possible
> - unmaximize the browser's shell, note that the sash is now not reachable
> - refresh the page, select the changed file, press "Side by side"
> - the side-by-side comparison opens with the sash and RHS nowhere to be seen
> (they're off to the right, maximizing your browser's shell will bring them
> into view)
> 
> Remembering the sash position between invocations makes sense, but this page
> should not lay out with its sash and RHS outside of the viewport.  I was
> stuck on this because I forgot that my browser had been maximized when I
> last viewed this page yesterday.
> 
> There may be other places in Orion where a similar thing can happen, where
> sash absolute positions are being remembered.  Perhaps remembering these
> positions as percentages would be better (?).

Remembering by percentage is better but only after you refresh the page can it take effect. Listening resize event might be another option.
Comment 3 libing wang CLA 2013-11-20 15:23:54 EST
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=c2d7373de0d27c406dcb31ec85519ec99b2ead7c.

We are not storing the percentage neither do we listen to the resize event.
If the splitter is out of viewport, user just has to refresh the browser. In this case the splitter code checks if the stored position is out of its parent dom node then put the splitter in the middle.