1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Better explain 'h' keyboard shortcut in Differential

Summary: Also move 'f' outside this group of commands.

Test Plan: Pressed '?'.

Reviewers: epriestley, alanh, frantic

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3903
This commit is contained in:
vrana 2012-11-06 11:45:10 -08:00
parent 10cf2bb4e2
commit 19c840edf2
2 changed files with 29 additions and 27 deletions

View file

@ -1181,7 +1181,7 @@ celerity_register_resource_map(array(
), ),
'javelin-behavior-differential-keyboard-navigation' => 'javelin-behavior-differential-keyboard-navigation' =>
array( array(
'uri' => '/res/0a013420/rsrc/js/application/differential/behavior-keyboard-nav.js', 'uri' => '/res/a7798465/rsrc/js/application/differential/behavior-keyboard-nav.js',
'type' => 'js', 'type' => 'js',
'requires' => 'requires' =>
array( array(
@ -3172,7 +3172,7 @@ celerity_register_resource_map(array(
'uri' => '/res/pkg/7d861806/differential.pkg.css', 'uri' => '/res/pkg/7d861806/differential.pkg.css',
'type' => 'css', 'type' => 'css',
), ),
58152763 => 'cab76945' =>
array( array(
'name' => 'differential.pkg.js', 'name' => 'differential.pkg.js',
'symbols' => 'symbols' =>
@ -3195,7 +3195,7 @@ celerity_register_resource_map(array(
15 => 'differential-inline-comment-editor', 15 => 'differential-inline-comment-editor',
16 => 'javelin-behavior-differential-dropdown-menus', 16 => 'javelin-behavior-differential-dropdown-menus',
), ),
'uri' => '/res/pkg/58152763/differential.pkg.js', 'uri' => '/res/pkg/cab76945/differential.pkg.js',
'type' => 'js', 'type' => 'js',
), ),
'c8ce2d88' => 'c8ce2d88' =>
@ -3303,7 +3303,7 @@ celerity_register_resource_map(array(
'aphront-typeahead-control-css' => '10a01616', 'aphront-typeahead-control-css' => '10a01616',
'differential-changeset-view-css' => '7d861806', 'differential-changeset-view-css' => '7d861806',
'differential-core-view-css' => '7d861806', 'differential-core-view-css' => '7d861806',
'differential-inline-comment-editor' => '58152763', 'differential-inline-comment-editor' => 'cab76945',
'differential-local-commits-view-css' => '7d861806', 'differential-local-commits-view-css' => '7d861806',
'differential-results-table-css' => '7d861806', 'differential-results-table-css' => '7d861806',
'differential-revision-add-comment-css' => '7d861806', 'differential-revision-add-comment-css' => '7d861806',
@ -3317,20 +3317,20 @@ celerity_register_resource_map(array(
'inline-comment-summary-css' => '7d861806', 'inline-comment-summary-css' => '7d861806',
'javelin-behavior' => 'c50bbf3a', 'javelin-behavior' => 'c50bbf3a',
'javelin-behavior-aphront-basic-tokenizer' => 'dd024ca1', 'javelin-behavior-aphront-basic-tokenizer' => 'dd024ca1',
'javelin-behavior-aphront-drag-and-drop' => '58152763', 'javelin-behavior-aphront-drag-and-drop' => 'cab76945',
'javelin-behavior-aphront-drag-and-drop-textarea' => '58152763', 'javelin-behavior-aphront-drag-and-drop-textarea' => 'cab76945',
'javelin-behavior-aphront-form-disable-on-submit' => '805a58d7', 'javelin-behavior-aphront-form-disable-on-submit' => '805a58d7',
'javelin-behavior-audit-preview' => '5e68be89', 'javelin-behavior-audit-preview' => '5e68be89',
'javelin-behavior-differential-accept-with-errors' => '58152763', 'javelin-behavior-differential-accept-with-errors' => 'cab76945',
'javelin-behavior-differential-add-reviewers-and-ccs' => '58152763', 'javelin-behavior-differential-add-reviewers-and-ccs' => 'cab76945',
'javelin-behavior-differential-comment-jump' => '58152763', 'javelin-behavior-differential-comment-jump' => 'cab76945',
'javelin-behavior-differential-diff-radios' => '58152763', 'javelin-behavior-differential-diff-radios' => 'cab76945',
'javelin-behavior-differential-dropdown-menus' => '58152763', 'javelin-behavior-differential-dropdown-menus' => 'cab76945',
'javelin-behavior-differential-edit-inline-comments' => '58152763', 'javelin-behavior-differential-edit-inline-comments' => 'cab76945',
'javelin-behavior-differential-feedback-preview' => '58152763', 'javelin-behavior-differential-feedback-preview' => 'cab76945',
'javelin-behavior-differential-keyboard-navigation' => '58152763', 'javelin-behavior-differential-keyboard-navigation' => 'cab76945',
'javelin-behavior-differential-populate' => '58152763', 'javelin-behavior-differential-populate' => 'cab76945',
'javelin-behavior-differential-show-more' => '58152763', 'javelin-behavior-differential-show-more' => 'cab76945',
'javelin-behavior-diffusion-commit-graph' => '5e68be89', 'javelin-behavior-diffusion-commit-graph' => '5e68be89',
'javelin-behavior-diffusion-pull-lastmodified' => '5e68be89', 'javelin-behavior-diffusion-pull-lastmodified' => '5e68be89',
'javelin-behavior-maniphest-batch-selector' => '7707de41', 'javelin-behavior-maniphest-batch-selector' => '7707de41',
@ -3340,12 +3340,12 @@ celerity_register_resource_map(array(
'javelin-behavior-maniphest-transaction-preview' => '7707de41', 'javelin-behavior-maniphest-transaction-preview' => '7707de41',
'javelin-behavior-phabricator-autofocus' => '805a58d7', 'javelin-behavior-phabricator-autofocus' => '805a58d7',
'javelin-behavior-phabricator-keyboard-shortcuts' => '805a58d7', 'javelin-behavior-phabricator-keyboard-shortcuts' => '805a58d7',
'javelin-behavior-phabricator-object-selector' => '58152763', 'javelin-behavior-phabricator-object-selector' => 'cab76945',
'javelin-behavior-phabricator-oncopy' => '805a58d7', 'javelin-behavior-phabricator-oncopy' => '805a58d7',
'javelin-behavior-phabricator-tooltips' => '805a58d7', 'javelin-behavior-phabricator-tooltips' => '805a58d7',
'javelin-behavior-phabricator-watch-anchor' => '805a58d7', 'javelin-behavior-phabricator-watch-anchor' => '805a58d7',
'javelin-behavior-refresh-csrf' => '805a58d7', 'javelin-behavior-refresh-csrf' => '805a58d7',
'javelin-behavior-repository-crossreference' => '58152763', 'javelin-behavior-repository-crossreference' => 'cab76945',
'javelin-behavior-workflow' => '805a58d7', 'javelin-behavior-workflow' => '805a58d7',
'javelin-dom' => 'c50bbf3a', 'javelin-dom' => 'c50bbf3a',
'javelin-event' => 'c50bbf3a', 'javelin-event' => 'c50bbf3a',
@ -3371,7 +3371,7 @@ celerity_register_resource_map(array(
'phabricator-core-buttons-css' => '10a01616', 'phabricator-core-buttons-css' => '10a01616',
'phabricator-core-css' => '10a01616', 'phabricator-core-css' => '10a01616',
'phabricator-directory-css' => '10a01616', 'phabricator-directory-css' => '10a01616',
'phabricator-drag-and-drop-file-upload' => '58152763', 'phabricator-drag-and-drop-file-upload' => 'cab76945',
'phabricator-dropdown-menu' => '805a58d7', 'phabricator-dropdown-menu' => '805a58d7',
'phabricator-flag-css' => '10a01616', 'phabricator-flag-css' => '10a01616',
'phabricator-jump-nav' => '10a01616', 'phabricator-jump-nav' => '10a01616',
@ -3383,7 +3383,7 @@ celerity_register_resource_map(array(
'phabricator-prefab' => '805a58d7', 'phabricator-prefab' => '805a58d7',
'phabricator-project-tag-css' => '7839ae2d', 'phabricator-project-tag-css' => '7839ae2d',
'phabricator-remarkup-css' => '10a01616', 'phabricator-remarkup-css' => '10a01616',
'phabricator-shaped-request' => '58152763', 'phabricator-shaped-request' => 'cab76945',
'phabricator-standard-page-view' => '10a01616', 'phabricator-standard-page-view' => '10a01616',
'phabricator-tooltip' => '805a58d7', 'phabricator-tooltip' => '805a58d7',
'phabricator-transaction-view-css' => '10a01616', 'phabricator-transaction-view-css' => '10a01616',

View file

@ -224,13 +224,9 @@ JX.behavior('differential-keyboard-navigation', function(config) {
}) })
.register(); .register();
new JX.KeyboardShortcut('f', 'Toggle file tree.') new JX.KeyboardShortcut(
.setHandler(function(manager) { 'h',
JX.Stratcom.invoke('differential-filetree-toggle'); 'Collapse or expand the file display (after jump).')
})
.register();
new JX.KeyboardShortcut('h', 'Collapse or expand the file display.')
.setHandler(function(manager) { .setHandler(function(manager) {
if (!changesets || !changesets[cursor]) { if (!changesets || !changesets[cursor]) {
return; return;
@ -268,6 +264,12 @@ JX.behavior('differential-keyboard-navigation', function(config) {
}) })
.register(); .register();
new JX.KeyboardShortcut('f', 'Toggle file tree.')
.setHandler(function(manager) {
JX.Stratcom.invoke('differential-filetree-toggle');
})
.register();
if (config.haunt) { if (config.haunt) {
new JX.KeyboardShortcut('z', 'Cycle comment panel haunting modes.') new JX.KeyboardShortcut('z', 'Cycle comment panel haunting modes.')
.setHandler(haunt) .setHandler(haunt)