mozilla/treeherder-ui — pull request #304 by tojonmz (2014-12-16 18:11:00+00:00)
Title: Bug 1030686 - Add keyboard shortcut for classification entry

This work fixes 'part 1' of Bugzilla bug [1030686](https://bugzilla.mozilla.org/show_bug.cgi?id=1030686) requested by philor in [comment 11](https://bugzilla.mozilla.org/show_bug.cgi?id=1030686#c11).

This feature adds the selected job to the pinboard, and focuses the optional comment field when depressing the letter 'c'. On enter, it de-focuses that comment field. On re-invocation it refocuses, and also acts as a focus toggle, when the shortcut is depressed each time.

It can also be used in conjunction with the new 'r' shortcut, allowing users to add a related bug, then switch and depress 'c' and add a comment. Similarly it also be used in conjunction with save via 'ctrl/cmd+enter', to save the entire classification.

Basically you can do the entire process up to this point, without taking your hands off the keyboard.

Here's a screen grab of the UI before and after the focus:

![addcommentproposed_stp1](https://cloud.githubusercontent.com/assets/3660661/5458653/15900f22-8522-11e4-8804-702110462eea.jpg)

![addcommentproposed_stp2](https://cloud.githubusercontent.com/assets/3660661/5458654/1a74c55a-8522-11e4-9e54-6dfff7fdec50.jpg)

![addcommentproposed_stp3](https://cloud.githubusercontent.com/assets/3660661/5458656/1e9b949c-8522-11e4-8942-82c424b92fa1.jpg)

As you can see above, I'm also pre-populating the field with a discoverable overlay, like the other fields. I also adjusted the position of the Unpin/Save buttons slightly, so everything is aligned for now.

I've tested the feature on Windows in Firefox and Chrome and all related functionality seems to be fine. Esc to close the job panel, n,p,j,k for next and previous unclassified failure navigation, classification save, manual focus and manual defocus, and other workflows. @wlach tested the basic workflow on Linux also yesterday. Occasionally I do notice a shortcut key "overflow" into the cell, and the cell gets populated with a letter "c". I have noticed this also though with the related bugs shortcut we already landed.

I've also added the related Help item for it, and tweaked Save slightly while I was there to be more clear.

![addcommentproposedhelp](https://cloud.githubusercontent.com/assets/3660661/5458738/c03e5a82-8522-11e4-96c4-fe35b3827ad0.jpg)

Tested on Windows:
FF Release **34.0**
Chrome Latest Release **39.0.2171.95 m**

Adding @camd for review, and @edmorley for visibility.