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

Bug 407472

Summary: [sidebar] document height gets out of whack after a while
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: antonm, Silenio_Quarti
Version: 2.0   
Target Milestone: 3.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-05-07 17:46:56 EDT
1. Craft a URL to an "editorless editor page" like this:
 edit.html#,navigate=/file/myuser/myproject/myfolder/?depth=1
2. Use the breadrumb to re-root the sidebar nav, and click on files in the sidebar to edit them.
3. Sometimes, Chrome gets into a weird state where the document's height becomes extremely large, and you see a scrollbar. This should not happen.

It looks like the HTML tag itself is the culprit (its height is way more than it should be). Not sure why

Haven't tried to reproduce in another browser yet.
Comment 1 Mark Macdonald CLA 2013-05-09 16:07:33 EDT
From git bisect:
> 27134120720e414dcf8dae6649ca1ac36efd9043 is the first bad commit

Somehow the banner changes done to support the hamburger caused this bug. Very weird.

> $ git show 27134120 --stat
> commit 27134120720e414dcf8dae6649ca1ac36efd9043
> Author: Anton McConville <antonm@ca.ibm.com>
> Date:   Wed Apr 24 20:58:43 2013 -0400
> 
>     Bug 406498
> 
>  .../org.eclipse.orion.client.ui/web/css/ide.css    |  42 +++++++++
>  .../org.eclipse.orion.client.ui/web/css/images.css |   4 +-
>  .../web/images/hamburger.png                       | Bin 0 -> 188 bytes
>  .../web/orion/banner/banner.html                   |   5 +-
>  .../web/orion/globalCommands.js                    |  31 +++++--
>  .../web/orion/widgets/input/DropDownMenu.js        |  95 +++++++++++++++++++++
>  .../web/orion/widgets/input/GroupedContent.js      |  50 +++++++++++
>  7 files changed, 217 insertions(+), 10 deletions(-)
Comment 2 Mark Macdonald CLA 2013-05-09 17:52:00 EDT
Figured it out... the old "Related Links" menu was still in the banner. It wasn't being cleared out, so it would grow more Related Links each time the editor input changed, and eventually affect the document height. I hid it with display:none (commit #1) and then fixed it so its DOM elements are cleaned up (commit #2).

1. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=8740c89
2. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=c1069fe

The old related links menu is now called "oldRelatedLinks". Right now it's just invisible, and should not affect our layout anymore. I didn't remove it from the banner because of some tricky page lifecycle issues WRT the hamburger. But it really does need to go.