Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350351 - Content assist window never shows scrollbar
Summary: Content assist window never shows scrollbar
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Editor (show other bugs)
Version: 0.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-25 08:45 EDT by Karol Gusak CLA
Modified: 2011-08-05 18:01 EDT (History)
2 users (show)

See Also:


Attachments
A patch for improving the content assist panel (2.43 KB, patch)
2011-07-28 08:23 EDT, Karol Gusak CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karol Gusak CLA 2011-06-25 08:45:15 EDT
When there are many completions proposed by the content assist feature, the window displaying the proposals becomes very long. It should have a maximum height defined and should display a vertical scrollbar if needed.

Also currently the window can be displayed outside of the visible part of the web page (e.g. when invoking the content assistance for a code being placed near the bottom of the browser's window, in which case the website will be stretched vertically.
Comment 1 Boris Bokowski CLA 2011-06-25 12:45:37 EDT
Very good point, right now we're not handling any of these edge cases, but should.
Comment 2 Karol Gusak CLA 2011-07-28 08:22:30 EDT
I've prepared a patch with some improvement to this issue. I tried to make the content assist panel to behave similar to the one from the Eclipse Platform. The size of the panel is constant (height 150px), with scrollbars being displayed all the time. The current element can be selected using arrow keys (as before, but now the window scrolls as needed). The panel will be displayed above the caret if not enough space left below it. Also it won't cross the right edge of the viewport.
Comment 3 Karol Gusak CLA 2011-07-28 08:23:21 EDT
Created attachment 200525 [details]
A patch for improving the content assist panel
Comment 4 Mark Macdonald CLA 2011-08-05 15:47:15 EDT
(In reply to comment #3)
Thanks for the patch. Can I get you to confirm that you all the code and that you have the rights to contribute it under the eclipse.org website terms of use?

I will make a few changes to it.
Comment 5 Karol Gusak CLA 2011-08-05 15:57:17 EDT
I wrote all this code and have the rights to contribute it to Eclipse under the
eclipse.org web site terms of use.
Comment 6 Mark Macdonald CLA 2011-08-05 18:01:59 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=d5de44b5e5c07d371d2e59ac3726e11d3ef68848

Differences from the patch:
- Only show the horizontal scrollbar when necessary
- Avoid dojo.window.getBox(), for the sake of not adding more dojo dependencies than we already have
- Use clientHeight of contentAssistPanel for one calculation rather than offsetHeight, so we don't have to deal with the horizontal scrollbar height

Thanks again!