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

Bug 418110

Summary: Mini nav scrolls too much and folder nav cursor navigation does not always reveal item
Product: [ECD] Orion Reporter: Silenio Quarti <Silenio_Quarti>
Component: ClientAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 4.0   
Target Milestone: 4.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Silenio Quarti CLA 2013-09-26 10:38:12 EDT
Open a file in edit.html pare (for example, inputManager.js). Refresh the page. Note that the file is revealed in the mini-nav and it is aligned at the top of the tree on FF/IE and a couple of rows down on Chrome.    It should be aligned at the bottom of the tree (minimum scroll).

Open "org.eclipse.orion.client/bundles/org.eclipse.orion.client.editor/web/orion/editor" directory so that it shows in the folder nav (or some other folder with lots of files). Put the focus in the folder nav and arrow down. Note that when you reach the bottom the item is not revealed.
Comment 1 Silenio Quarti CLA 2013-09-26 10:55:11 EDT
Fixed

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=2679186b362987caa4e1cf0c240a44b6f1697824

On Chrome, the file is not aligned on the top because the height of the items increases when the image is added to the item.  At first, the item is top aligned and then it gets pushed down by the accumulated height difference of all the items before it.  The fix here is to always add the default image to the links and then replace it when a different image is available.  This way the height does not vary, since all images are the same size.

The cursor navigation problem on the folder nav happened because the code that detects whether the item is visible (in explorerNavHandler.js) assumed that the explorer was flushed with the bottom of the page toolbar. This is the case for the mini-nav, but for the folder nav there is a margin at the top.

And finally, in order to always scroll the minimum necessary to show the item, cursorOn() needs to detect whether the item is before the top edge or after the bottom edge.