@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.

Make DocumentEngine source line linking behavior better when blame is shown

Summary: Ref T13105. The line linker behavior currently has trouble identifying the line number when blame is active. Improve this, albeit not the most cleanly.

Test Plan: Selected lines with blame on.

Maniphest Tasks: T13105

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

+24 -9
+8 -8
resources/celerity/map.php
··· 471 471 'rsrc/js/core/behavior-keyboard-pager.js' => 'a8da01f0', 472 472 'rsrc/js/core/behavior-keyboard-shortcuts.js' => '01fca1f0', 473 473 'rsrc/js/core/behavior-lightbox-attachments.js' => '6b31879a', 474 - 'rsrc/js/core/behavior-line-linker.js' => 'febf4ae7', 474 + 'rsrc/js/core/behavior-line-linker.js' => '1e017314', 475 475 'rsrc/js/core/behavior-more.js' => 'a80d0378', 476 476 'rsrc/js/core/behavior-object-selector.js' => '77c1f0b0', 477 477 'rsrc/js/core/behavior-oncopy.js' => '2926fff2', ··· 634 634 'javelin-behavior-phabricator-gesture-example' => '558829c2', 635 635 'javelin-behavior-phabricator-keyboard-pager' => 'a8da01f0', 636 636 'javelin-behavior-phabricator-keyboard-shortcuts' => '01fca1f0', 637 - 'javelin-behavior-phabricator-line-linker' => 'febf4ae7', 637 + 'javelin-behavior-phabricator-line-linker' => '1e017314', 638 638 'javelin-behavior-phabricator-nav' => '836f966d', 639 639 'javelin-behavior-phabricator-notification-example' => '8ce821c5', 640 640 'javelin-behavior-phabricator-object-selector' => '77c1f0b0', ··· 997 997 'javelin-json', 998 998 'javelin-workflow', 999 999 'javelin-magical-init', 1000 + ), 1001 + '1e017314' => array( 1002 + 'javelin-behavior', 1003 + 'javelin-stratcom', 1004 + 'javelin-dom', 1005 + 'javelin-history', 1000 1006 ), 1001 1007 '1f6794f6' => array( 1002 1008 'javelin-behavior', ··· 2158 2164 'javelin-dom', 2159 2165 'javelin-view-visitor', 2160 2166 'javelin-util', 2161 - ), 2162 - 'febf4ae7' => array( 2163 - 'javelin-behavior', 2164 - 'javelin-stratcom', 2165 - 'javelin-dom', 2166 - 'javelin-history', 2167 2167 ), 2168 2168 ), 2169 2169 'packages' => array(
+16 -1
webroot/rsrc/js/core/behavior-line-linker.js
··· 20 20 } 21 21 22 22 function getRowNumber(tr) { 23 - var th = tr.firstChild; 23 + // Starting from the left, find the rightmost "<th />" tag among all 24 + // "<th />" tags at the start of the row. Our goal here is to skip over 25 + // blame information in Diffusion. This could probably be significantly 26 + // more graceful. 27 + var th = null; 28 + for (var ii = 0; ii < tr.childNodes.length; ii++) { 29 + if (JX.DOM.isType(tr.childNodes[ii], 'th')) { 30 + th = tr.childNodes[ii]; 31 + continue; 32 + } 33 + break; 34 + } 35 + 36 + if (!th) { 37 + return null; 38 + } 24 39 25 40 // If the "<th />" tag contains an "<a />" with "data-n" that we're using 26 41 // to prevent copy/paste of line numbers, use that.