Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369850 - [Search]Add context preview in the search result page.
Summary: [Search]Add context preview in the search result page.
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 M2   Edit
Assignee: libing wang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-26 13:43 EST by libing wang CLA
Modified: 2012-01-29 18:44 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description libing wang CLA 2012-01-26 13:43:28 EST
As Ken mentioned in today's Orion call, he would like to see the context of a match before going into the editor.
I am thinking about adding a light-weight viewer under the result list so that you can see a small block of code around that line.
It does not have to be an Orion editor instance but just something simple.
Now you will see consistent UI for both result and replace:
They both have previews, while the result page tells you quickly the context and the replace page tells you how your change will be.

To save the space when people don't really bother looking at the context or compare view, we will make the bottom part minimize-able.
We already have a sub class of dojo border Container(eWebBorderContainer.js, sorry for the strange name) , but this only controls the vertical splitter.
I will open separate bug for that.
Comment 1 libing wang CLA 2012-01-26 13:46:02 EST
I think for 0.4 we can add this context view but for the horizontal splitter, I am not sure.
We can probably add an action in the tool bar to toggle the context and compare view.
Comment 2 libing wang CLA 2012-01-26 13:57:54 EST
bug 369852 opened for the context view toggling.
Comment 3 Silenio Quarti CLA 2012-01-27 10:16:35 EST
It would be cool if you could use a orion textview (with syntax highlight) the same way it is used to show the tooltips for the comment folding.
Comment 4 libing wang CLA 2012-01-27 10:36:19 EST
(In reply to comment #3)
> It would be cool if you could use a orion textview (with syntax highlight) the
> same way it is used to show the tooltips for the comment folding.

Good idea. I was about to ask you about how the pop up overlays was implemented. I never thought about using orion textview in a pop up. Good stuff.
Is the whole thing a reusable component? Could you point me where the code is?
Comment 5 Silenio Quarti CLA 2012-01-27 10:49:01 EST
The code is in "orion/textview/tooltip.js" (line#115), but it is not reusable and it has some TODOs.  For example, it relies on the fact that setup.js is setting up the text stylers.
Comment 6 libing wang CLA 2012-01-28 15:05:22 EST
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=ffd738d76db11babba1c1c8dc1666f4dd532f729.

For now it is a simple solution:
Wen you iterate on matches, you cab use right arrow key bring up a 5-line code with the middle line highlighted .
You can use left arrow key to hide it.
Similar to google search.
For M2, it is just a handy tool for context preview.I will improve it in RC1.
Comment 7 libing wang CLA 2012-01-29 18:44:06 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=74a5ed78515239ed37ec504da65fcf76dc575cd2
Added another important fix:

Remove key listeners on the result page parent div otherwise there will be multiple listeners on one div when hash value changes.
Close the context tip popup smartly.

Will be looking at putting textView as the context tip contents post M2.