@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 "Copy" and "Coverage" columns to unified view

Summary:
These aren't being populated yet; they mostly fix some JS errors with inlines.

For example, the inline hover reticle relies on adjusting its width to account for the "copy" column, and failed when the column did not exist.

Test Plan:
- Hovering inlines in unified now works, mostly.
- Interacted with inlines in side-by-side.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

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

+63 -27
+14 -14
resources/celerity/map.php
··· 10 10 'core.pkg.css' => 'a9770fbb', 11 11 'core.pkg.js' => 'a77025a1', 12 12 'darkconsole.pkg.js' => '8ab24e01', 13 - 'differential.pkg.css' => 'd8866ed8', 14 - 'differential.pkg.js' => '4db30ad2', 13 + 'differential.pkg.css' => '6641cdd5', 14 + 'differential.pkg.js' => 'e260829c', 15 15 'diffusion.pkg.css' => '591664fa', 16 16 'diffusion.pkg.js' => 'bfc0737b', 17 17 'maniphest.pkg.css' => '68d4dd3d', ··· 55 55 'rsrc/css/application/dashboard/dashboard.css' => '17937d22', 56 56 'rsrc/css/application/diff/inline-comment-summary.css' => 'eb5f8e8c', 57 57 'rsrc/css/application/differential/add-comment.css' => 'c478bcaa', 58 - 'rsrc/css/application/differential/changeset-view.css' => 'b600950c', 58 + 'rsrc/css/application/differential/changeset-view.css' => 'bad09138', 59 59 'rsrc/css/application/differential/core.css' => '7ac3cabc', 60 60 'rsrc/css/application/differential/results-table.css' => '181aa9d9', 61 61 'rsrc/css/application/differential/revision-comment.css' => '48186045', ··· 367 367 'rsrc/js/application/differential/behavior-comment-preview.js' => '6932def3', 368 368 'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1', 369 369 'rsrc/js/application/differential/behavior-dropdown-menus.js' => '2035b9cb', 370 - 'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '65936067', 370 + 'rsrc/js/application/differential/behavior-edit-inline-comments.js' => 'f159658c', 371 371 'rsrc/js/application/differential/behavior-keyboard-nav.js' => '2c426492', 372 372 'rsrc/js/application/differential/behavior-populate.js' => '8694b1df', 373 373 'rsrc/js/application/differential/behavior-show-field-details.js' => 'bba9eedf', ··· 518 518 'conpherence-notification-css' => '04a6e10a', 519 519 'conpherence-update-css' => '1099a660', 520 520 'conpherence-widget-pane-css' => '3d575438', 521 - 'differential-changeset-view-css' => 'b600950c', 521 + 'differential-changeset-view-css' => 'bad09138', 522 522 'differential-core-view-css' => '7ac3cabc', 523 523 'differential-inline-comment-editor' => '6a049cf7', 524 524 'differential-results-table-css' => '181aa9d9', ··· 569 569 'javelin-behavior-differential-comment-jump' => '4fdb476d', 570 570 'javelin-behavior-differential-diff-radios' => 'e1ff79b1', 571 571 'javelin-behavior-differential-dropdown-menus' => '2035b9cb', 572 - 'javelin-behavior-differential-edit-inline-comments' => '65936067', 572 + 'javelin-behavior-differential-edit-inline-comments' => 'f159658c', 573 573 'javelin-behavior-differential-feedback-preview' => '6932def3', 574 574 'javelin-behavior-differential-keyboard-navigation' => '2c426492', 575 575 'javelin-behavior-differential-populate' => '8694b1df', ··· 1224 1224 'javelin-dom', 1225 1225 'javelin-fx', 1226 1226 ), 1227 - 65936067 => array( 1228 - 'javelin-behavior', 1229 - 'javelin-stratcom', 1230 - 'javelin-dom', 1231 - 'javelin-util', 1232 - 'javelin-vector', 1233 - 'differential-inline-comment-editor', 1234 - ), 1235 1227 '6882e80a' => array( 1236 1228 'javelin-dom', 1237 1229 ), ··· 1881 1873 'efe49472' => array( 1882 1874 'javelin-install', 1883 1875 'javelin-util', 1876 + ), 1877 + 'f159658c' => array( 1878 + 'javelin-behavior', 1879 + 'javelin-stratcom', 1880 + 'javelin-dom', 1881 + 'javelin-util', 1882 + 'javelin-vector', 1883 + 'differential-inline-comment-editor', 1884 1884 ), 1885 1885 'f24f3253' => array( 1886 1886 'javelin-behavior',
+32 -9
src/applications/differential/render/DifferentialChangesetOneUpRenderer.php
··· 19 19 return phutil_tag('colgroup', array(), array( 20 20 phutil_tag('col', array('class' => 'num')), 21 21 phutil_tag('col', array('class' => 'num')), 22 + phutil_tag('col', array('class' => 'copy')), 22 23 phutil_tag('col', array('class' => 'unified')), 23 24 )); 24 25 } ··· 31 32 $primitives = $this->buildPrimitives($range_start, $range_len); 32 33 33 34 list($left_prefix, $right_prefix) = $this->getLineIDPrefixes(); 35 + 36 + $no_copy = phutil_tag('td', array('class' => 'copy')); 37 + $no_coverage = null; 38 + 39 + $column_width = 4; 34 40 35 41 $out = array(); 36 42 foreach ($primitives as $p) { ··· 54 60 $out[] = phutil_tag('th', array('id' => $left_id), $p['line']); 55 61 56 62 $out[] = phutil_tag('th', array()); 63 + $out[] = $no_copy; 57 64 $out[] = phutil_tag('td', array('class' => $class), $p['render']); 65 + $out[] = $no_coverage; 58 66 } else { 59 67 if ($p['htype']) { 60 68 $class = 'right new'; ··· 76 84 } 77 85 $out[] = phutil_tag('th', array('id' => $right_id), $p['line']); 78 86 87 + 88 + $out[] = $no_copy; 79 89 $out[] = phutil_tag('td', array('class' => $class), $p['render']); 90 + $out[] = $no_coverage; 80 91 } 81 92 $out[] = hsprintf('</tr>'); 82 93 break; 83 94 case 'inline': 84 - $out[] = hsprintf('<tr><th /><th />'); 85 - $out[] = hsprintf('<td>'); 86 - 87 95 $inline = $this->buildInlineComment( 88 96 $p['comment'], 89 97 $p['right']); 90 98 $inline->setBuildScaffolding(false); 91 - $out[] = $inline->render(); 92 99 93 - $out[] = hsprintf('</td></tr>'); 100 + $out[] = phutil_tag( 101 + 'tr', 102 + array(), 103 + array( 104 + phutil_tag('th'), 105 + phutil_tag('th'), 106 + $no_copy, 107 + phutil_tag('td', array(), $inline), 108 + $no_coverage, 109 + )); 94 110 break; 95 111 case 'no-context': 96 - $out[] = hsprintf( 97 - '<tr><td class="show-more" colspan="3">%s</td></tr>', 98 - pht('Context not available.')); 112 + $out[] = phutil_tag( 113 + 'tr', 114 + array(), 115 + phutil_tag( 116 + 'td', 117 + array( 118 + 'class' => 'show-more', 119 + 'colspan' => $column_width, 120 + ), 121 + pht('Context not available.'))); 99 122 break; 100 123 case 'context': 101 124 $top = $p['top']; ··· 112 135 'td', 113 136 array( 114 137 'class' => 'show-more', 115 - 'colspan' => 3, 138 + 'colspan' => $column_width, 116 139 ), 117 140 $links)); 118 141 break;
+12 -4
src/applications/differential/render/DifferentialChangesetRenderer.php
··· 533 533 $new_buf = array(); 534 534 $out[] = array($primitive); 535 535 } else if ($type == 'inline') { 536 - $out[] = $old_buf; 537 - $out[] = $new_buf; 536 + 537 + // If this inline is on the left side, put it after the old lines. 538 + if (!$primitive['right']) { 539 + $out[] = $old_buf; 540 + $out[] = array($primitive); 541 + $out[] = $new_buf; 542 + } else { 543 + $out[] = $old_buf; 544 + $out[] = $new_buf; 545 + $out[] = array($primitive); 546 + } 547 + 538 548 $old_buf = array(); 539 549 $new_buf = array(); 540 - 541 - $out[] = array($primitive); 542 550 } else { 543 551 throw new Exception("Unknown primitive type '{$primitive}'!"); 544 552 }
+4
webroot/rsrc/css/application/differential/changeset-view.css
··· 39 39 width: 49.25%; 40 40 } 41 41 42 + .differential-diff.diff-1up col.unified { 43 + width: 99.5%; 44 + } 45 + 42 46 .differential-diff col.copy { 43 47 width: 0.5%; 44 48 }
+1
webroot/rsrc/js/application/differential/behavior-edit-inline-comments.js
··· 188 188 var td = JX.DOM.findAbove(comment, 'td'); 189 189 var th = td.previousSibling; 190 190 191 + // TODO: For one-up views, this is incorrect! 191 192 var new_part = isNewFile(th) ? 'N' : 'O'; 192 193 var prefix = 'C' + id_part + new_part + 'L'; 193 194