Bug 961564

Summary: Implement attention key in editor
Product: [Retired] Zanata Reporter: David Mason <damason>
Component: Component-UIAssignee: David Mason <damason>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: medium Docs Contact:
Priority: low    
Version: 2.3CC: aeng, hpeters, sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: 3.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: 3.0.0-SNAPSHOT (20130521-1233) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 786630
: 965371 (view as bug list) Environment:
Last Closed: 2013-11-27 03:25:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 786630    
Bug Blocks: 965371    

Description David Mason 2013-05-10 00:40:19 UTC
+++ This bug was initially created as a clone of Bug #786630 +++

Separating from original bug since this has become more general. The following comments from the original bug adequately describe the issue and the approach to solve it:

--- Additional comment from Sean Flanigan on 2013-04-10 02:37:07 EDT ---

Shortcut keys are basically an arms race between the web app and the browser and OS.  The web app never wins.  We could make the shortcuts safer by adding another modifier, but this makes them harder to type, and they could still conflict with something in the user's system.  I think we should try using a configurable prefix for a second shortcut (as well as Alt+G).

For instance, add an alias such as Alt+X,G (which means Alt+X, then G (or Alt+G).  After the user presses Alt+X, the app listens for the rest of the key sequence.  If the user presses Alt+X again, or presses Esc, or waits a few seconds, the key sequence is cancelled.  We should make it visually obvious that Zanata is waiting for the rest of the key sequence.

Similarly, we would have Alt+X,1 to copy the first TM result, and so on for our other keys.  The important thing is that we keep all the existing shortcuts (since they work for most users) and add the new shortcuts which will all use the same (configurable) "attention key".  In most cases, we can probably just replace the modifier (Control, Alt, or Control-Shift) with the attention key, leaving the rest of the shortcut unchanged.

--- Additional comment from Ding-Yi Chen on 2013-04-18 22:41:06 EDT ---

(In reply to comment #14)
> Shortcut keys are basically an arms race between the web app and the browser
> and OS.  The web app never wins. 

Not to mention hot key for input methods, which is very likely being used in Zanata.

Comment 1 David Mason 2013-05-20 07:40:17 UTC
Partial implementation is complete and usable in branch 3.0-SNAPSHOT:

 - Alt+X activates attention mode
 - attention mode deactivates after 5 seconds if there is no input
 - attention mode deactivates if there is invalid input
 - Esc. deactivates attention mode
 - 'g' key copies from source when in attention mode and the editor has focus
 - a bar is shown above the translation editor table when attention mode is active

The ability to change the key shortcut from Alt+X to a different combination has not yet been implemented.

See: https://github.com/zanata/zanata/compare/3222f795ffd7db51a8aa6a79a0bafbd5ad91ac33...4d42c796bc61901314e47634dd0728783c0a242e

Comment 2 David Mason 2013-05-21 04:32:40 UTC
(In reply to David Mason from comment #1)
> Partial implementation is complete and usable in branch 3.0-SNAPSHOT:

> The ability to change the key shortcut from Alt+X to a different combination
> has not yet been implemented.

Created bug 965371 for ability to change the key shortcut, so that the implemented parts can go through QA.

Comment 3 Ding-Yi Chen 2013-05-21 07:31:53 UTC
VERIFIED with Zanata version 3.0.0-SNAPSHOT (20130521-1233)

Comment 4 Sean Flanigan 2013-11-27 03:16:12 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 5 Sean Flanigan 2013-11-27 03:17:13 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 6 Sean Flanigan 2013-11-27 03:19:34 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 7 Sean Flanigan 2013-11-27 03:25:31 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 8 Sean Flanigan 2013-11-27 03:34:23 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 9 Sean Flanigan 2013-11-27 03:36:32 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.