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

Bug 369739

Summary: [Search]Improve file/match iteration in result page.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne
Version: 0.4   
Target Milestone: 0.4 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2012-01-25 15:53:08 EST
John mentioned a good point the other day:
As a heavy keyboard user, without being able to iterate and view the file/match he will stay away from the search as an end user.

His workflow is like this:
In the result page, use up and down key to iterate all the matches. Hit enter on the interesting match and go to the editor. Come back to the search page and continue the iteration.

We need to support this.
Aside from the key binding support, I think another part we are missing here is to set focus on the current "link" so that "enter" will trigger the href.
I have mentioned something generic in Bug 369738, which is blocking this bug now.
Comment 1 libing wang CLA 2012-01-25 15:57:42 EST
I am thinking about including files (not only matches) in the iteration as well, because file is a href. Otherwise how do you open a file without pointing to a specific line by keyboard only? Of course we will jump over stale files.
Comment 2 libing wang CLA 2012-01-27 12:04:32 EST
Just had a talk to John about key board use cases.
For M2, we will use key navigation in result page(not preview yet)

up and down arrow keys : iterating up/down ward matches
enter key: go to editor on that line
right arrow: pop up an overlay to show 5 lines of code corresponding to the current match (there will be kind of hint on the right to the current match)
left key or timer: kill the pop up
Comment 3 libing wang CLA 2012-01-27 19:30:54 EST
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=932dc06c2b52d13a5684e68baf6acbd8deb1d90b.

The context preview is addressed in Bug 369850 but I am not sure if I can fix it for M2.
Comment 4 libing wang CLA 2012-01-27 19:32:01 EST
Basically you can now us up/down keys to iterate and use enter or enter+ctrl to go to editor.
Comment 5 libing wang CLA 2012-01-28 11:46:28 EST
I released another chunk of codes to 
1.Disable the arrow key scroll ONLY in the result div so that when you iterate the matches the browser default scrolling behavior is disabled. It will scroll only when the next match hits the bottom of the div(same for prev match)

2.Listen to key event only in result div.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=aec61ee106eb6deff3aba0fa800554f8280d53b5
Comment 6 libing wang CLA 2012-01-28 11:49:22 EST
Reminder :
You can still use CTRL + arrow key to scroll as the default browser behavior, but it will not iterate the current match.
Google search result page does the same thing.