Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 380421 - Need to access to the "compare widget" row by up/down arrow keys.
Summary: Need to access to the "compare widget" row by up/down arrow keys.
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Git (show other bugs)
Version: 0.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.5 M2   Edit
Assignee: libing wang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 380004
Blocks:
  Show dependency tree
 
Reported: 2012-05-23 10:41 EDT by libing wang CLA
Modified: 2012-05-24 18:17 EDT (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-05-23 10:41:05 EDT
Currently in both git status and commit page, we can expand any file to see the compare widget as a child row of the file row.
When you click on the surrounding space on the widget row, you can select it. But you can't use up/down arrow key to get there or get out of there.
The reason is that the tree navigation/iteration part(treeModelIterator) is relying on a contract where .parent and .children properties have to be provided. The treeModelIterator is referencing the explorer model directly so the status and commit model has to have the .children property.

This .children and .parent property contract is not ideal.  I will open another bug for future improvement.

For M2, I will just follow the current contract(as file nav and search nav do.
I will add .children property so that the file level model has this with the compare widget row as the only child.
Comment 1 libing wang CLA 2012-05-23 10:43:46 EDT
We should also think about this: what does selection mean on the compare widget row? If I select it and take stage action will it stage? how about I select both file row and widget row?
Comment 2 Susan McCourt CLA 2012-05-23 10:48:55 EDT
The other important part with respect to keyboard is to have a story for expand/collapse with the keyboard.  This is similar to bug 379587, but a bit more complicated because the item row might have actions shown (from the compare widget) so it needs arrow/grid navigation.  

My thought was to add ctrl-right, ctrl-left for expand collapse in the grid case.  We should gut check some other tree grid widgets like dijit's.

With respect to the row-based selection...
I can see how one would want to cursor to the compare widget but I don't see it as a selection.  Since clicking in it has its own meaning, as does space bar, etc...seems odd to have user click around it to have meaning.  So I would suggest that one can navigate to it but that it doesn't affect the selection.
Comment 3 libing wang CLA 2012-05-23 14:35:28 EDT
(In reply to comment #2)
> The other important part with respect to keyboard is to have a story for
> expand/collapse with the keyboard.  This is similar to bug 379587, but a bit
> more complicated because the item row might have actions shown (from the
> compare widget) so it needs arrow/grid navigation.  
> 
> My thought was to add ctrl-right, ctrl-left for expand collapse in the grid
> case.  We should gut check some other tree grid widgets like dijit's.

Doable.

> 
> With respect to the row-based selection...
> I can see how one would want to cursor to the compare widget but I don't see it
> as a selection.  
Hmm, what is the purpose of only cursor on it? I think we will break the general rule if you want to do this.

> Since clicking in it has its own meaning, as does space bar,
> etc...seems odd to have user click around it to have meaning.  So I would
> suggest that one can navigate to it but that it doesn't affect the selection.

My suggestion is to either remove it from selection model(not click-able neither cursor-able) or allow it to just behave like a normal row.
Comment 4 libing wang CLA 2012-05-24 18:17:16 EDT
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7acdd85a0aec2bd5ca9338f402cdc2460458c2ed.

Solution:
1.There is only one grid in the file row.
2.Left and right arrow keys to collapse and expand to see diff.
3.You can click or traverse to the widget row but it is not selectable. You only see current cursor gets there and you can nav on grids to do compare/diff actions.
4.Range selection does not select widget row at all, which is convenient.

I also applied this to git commit page but seems that the traversing order is strange after expansion.