Provide basic keyboard navigation support for Differential.

Summary:
ReviewBoard has a fancier version of this feature that's more granular -- the
keyboard can focus on individual changes. I think that's good and intend to
implement something similar, but this gets us a step closer and gets rid of some
of the bookkeeping stuff like making shortcuts discoverable.

(I have another brnach with Maniphest merging which also uses fatcow icons,
which is why the README seems a little out of context.)

Test Plan:
Used "j" and "k" to jump between changesets. Pressed "?" and got a list of
available shortcuts.

Reviewed By: tuomaspelkonen
Reviewers: aran, jungejason, tuomaspelkonen
CC: moskov, aran, epriestley, tuomaspelkonen
Differential Revision: 412
This commit is contained in:
epriestley
2011-06-08 11:53:10 -07:00
parent 1e5fd3a386
commit 17306b7a92
14 changed files with 259 additions and 68 deletions

View File

@@ -136,6 +136,8 @@ class DifferentialChangesetListView extends AphrontView {
));
}
Javelin::initBehavior('differential-keyboard-navigation', array());
return
'<div class="differential-review-stage" id="differential-review-stage">'.
implode("\n", $output).