@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add "jump to table of content" keyboard shortcut

Summary:
Many times when I'm reading a big diff, I want to go to the
TOC. Add it.

Test Plan:
can navigate with 't'. It also shows up in '?'

Revert Plan:

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: nh, aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2335

Jason Ge 6a9ef778 160ec660

+29 -21
+21 -21
src/__celerity_resource_map__.php
··· 942 942 ), 943 943 'javelin-behavior-differential-keyboard-navigation' => 944 944 array( 945 - 'uri' => '/res/a3f05d5b/rsrc/js/application/differential/behavior-keyboard-nav.js', 945 + 'uri' => '/res/93cdc365/rsrc/js/application/differential/behavior-keyboard-nav.js', 946 946 'type' => 'js', 947 947 'requires' => 948 948 array( ··· 2506 2506 'uri' => '/res/pkg/a841d960/differential.pkg.css', 2507 2507 'type' => 'css', 2508 2508 ), 2509 - 'e4ddcab5' => 2509 + 70509835 => 2510 2510 array( 2511 2511 'name' => 'differential.pkg.js', 2512 2512 'symbols' => ··· 2530 2530 16 => 'javelin-behavior-differential-dropdown-menus', 2531 2531 17 => 'javelin-behavior-buoyant', 2532 2532 ), 2533 - 'uri' => '/res/pkg/e4ddcab5/differential.pkg.js', 2533 + 'uri' => '/res/pkg/70509835/differential.pkg.js', 2534 2534 'type' => 'js', 2535 2535 ), 2536 2536 'c8ce2d88' => ··· 2638 2638 'aphront-typeahead-control-css' => '9c4e265b', 2639 2639 'differential-changeset-view-css' => 'a841d960', 2640 2640 'differential-core-view-css' => 'a841d960', 2641 - 'differential-inline-comment-editor' => 'e4ddcab5', 2641 + 'differential-inline-comment-editor' => '70509835', 2642 2642 'differential-local-commits-view-css' => 'a841d960', 2643 2643 'differential-revision-add-comment-css' => 'a841d960', 2644 2644 'differential-revision-comment-css' => 'a841d960', ··· 2651 2651 'inline-comment-summary-css' => 'a841d960', 2652 2652 'javelin-behavior' => '8a5de8a3', 2653 2653 'javelin-behavior-aphront-basic-tokenizer' => '97f65640', 2654 - 'javelin-behavior-aphront-drag-and-drop' => 'e4ddcab5', 2655 - 'javelin-behavior-aphront-drag-and-drop-textarea' => 'e4ddcab5', 2654 + 'javelin-behavior-aphront-drag-and-drop' => '70509835', 2655 + 'javelin-behavior-aphront-drag-and-drop-textarea' => '70509835', 2656 2656 'javelin-behavior-aphront-form-disable-on-submit' => '0c96375e', 2657 2657 'javelin-behavior-audit-preview' => '5e68be89', 2658 - 'javelin-behavior-buoyant' => 'e4ddcab5', 2659 - 'javelin-behavior-differential-accept-with-errors' => 'e4ddcab5', 2660 - 'javelin-behavior-differential-add-reviewers-and-ccs' => 'e4ddcab5', 2661 - 'javelin-behavior-differential-comment-jump' => 'e4ddcab5', 2662 - 'javelin-behavior-differential-diff-radios' => 'e4ddcab5', 2663 - 'javelin-behavior-differential-dropdown-menus' => 'e4ddcab5', 2664 - 'javelin-behavior-differential-edit-inline-comments' => 'e4ddcab5', 2665 - 'javelin-behavior-differential-feedback-preview' => 'e4ddcab5', 2666 - 'javelin-behavior-differential-keyboard-navigation' => 'e4ddcab5', 2667 - 'javelin-behavior-differential-populate' => 'e4ddcab5', 2668 - 'javelin-behavior-differential-show-more' => 'e4ddcab5', 2658 + 'javelin-behavior-buoyant' => '70509835', 2659 + 'javelin-behavior-differential-accept-with-errors' => '70509835', 2660 + 'javelin-behavior-differential-add-reviewers-and-ccs' => '70509835', 2661 + 'javelin-behavior-differential-comment-jump' => '70509835', 2662 + 'javelin-behavior-differential-diff-radios' => '70509835', 2663 + 'javelin-behavior-differential-dropdown-menus' => '70509835', 2664 + 'javelin-behavior-differential-edit-inline-comments' => '70509835', 2665 + 'javelin-behavior-differential-feedback-preview' => '70509835', 2666 + 'javelin-behavior-differential-keyboard-navigation' => '70509835', 2667 + 'javelin-behavior-differential-populate' => '70509835', 2668 + 'javelin-behavior-differential-show-more' => '70509835', 2669 2669 'javelin-behavior-diffusion-commit-graph' => '5e68be89', 2670 2670 'javelin-behavior-diffusion-pull-lastmodified' => '5e68be89', 2671 2671 'javelin-behavior-maniphest-batch-selector' => '7707de41', ··· 2675 2675 'javelin-behavior-maniphest-transaction-preview' => '7707de41', 2676 2676 'javelin-behavior-phabricator-autofocus' => '0c96375e', 2677 2677 'javelin-behavior-phabricator-keyboard-shortcuts' => '0c96375e', 2678 - 'javelin-behavior-phabricator-object-selector' => 'e4ddcab5', 2678 + 'javelin-behavior-phabricator-object-selector' => '70509835', 2679 2679 'javelin-behavior-phabricator-oncopy' => '0c96375e', 2680 2680 'javelin-behavior-phabricator-tooltips' => '0c96375e', 2681 2681 'javelin-behavior-phabricator-watch-anchor' => '0c96375e', 2682 2682 'javelin-behavior-refresh-csrf' => '0c96375e', 2683 - 'javelin-behavior-repository-crossreference' => 'e4ddcab5', 2683 + 'javelin-behavior-repository-crossreference' => '70509835', 2684 2684 'javelin-behavior-workflow' => '0c96375e', 2685 2685 'javelin-dom' => '8a5de8a3', 2686 2686 'javelin-event' => '8a5de8a3', ··· 2706 2706 'phabricator-core-buttons-css' => '9c4e265b', 2707 2707 'phabricator-core-css' => '9c4e265b', 2708 2708 'phabricator-directory-css' => '9c4e265b', 2709 - 'phabricator-drag-and-drop-file-upload' => 'e4ddcab5', 2709 + 'phabricator-drag-and-drop-file-upload' => '70509835', 2710 2710 'phabricator-dropdown-menu' => '0c96375e', 2711 2711 'phabricator-flag-css' => '9c4e265b', 2712 2712 'phabricator-jump-nav' => '9c4e265b', ··· 2718 2718 'phabricator-prefab' => '0c96375e', 2719 2719 'phabricator-project-tag-css' => '7839ae2d', 2720 2720 'phabricator-remarkup-css' => '9c4e265b', 2721 - 'phabricator-shaped-request' => 'e4ddcab5', 2721 + 'phabricator-shaped-request' => '70509835', 2722 2722 'phabricator-standard-page-view' => '9c4e265b', 2723 2723 'phabricator-tooltip' => '0c96375e', 2724 2724 'phabricator-transaction-view-css' => '9c4e265b',
+8
webroot/rsrc/js/application/differential/behavior-keyboard-nav.js
··· 197 197 .register(); 198 198 199 199 200 + new JX.KeyboardShortcut('t', 'Jump to the table of contents.') 201 + .setHandler(function(manager) { 202 + var toc = JX.$('differential-review-toc'); 203 + manager.scrollTo(toc); 204 + }) 205 + .register(); 206 + 207 + 200 208 function inline_op(node, op) { 201 209 if (!JX.DOM.scry(node, 'a', 'differential-inline-' + op)) { 202 210 // No link for this operation, e.g. editing a comment you can't edit.