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

Render prose diffs in email as summaries

Summary:
Ref T7643. When a large block of prose text is edited (like a wiki page), summarize the diff when sending mail.

For now, I'm still showing the whole thing in the web UI, since it's a bit more manageable there.

Also try to fix newlines in Airmail.

Test Plan:
This web diff:

{F1682591}

..became this mail diff:

{F1682592}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7643

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

+26 -7
+6 -6
resources/celerity/map.php
··· 10 10 'core.pkg.css' => '6913fe66', 11 11 'core.pkg.js' => '10275c16', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 - 'differential.pkg.css' => 'f3fb8324', 13 + 'differential.pkg.css' => 'b3eea3f5', 14 14 'differential.pkg.js' => '4b7d8f19', 15 15 'diffusion.pkg.css' => '91c5d3a6', 16 16 'diffusion.pkg.js' => '3a9a8bfa', ··· 57 57 'rsrc/css/application/dashboard/dashboard.css' => 'bc6f2127', 58 58 'rsrc/css/application/diff/inline-comment-summary.css' => '51efda3a', 59 59 'rsrc/css/application/differential/add-comment.css' => 'c47f8c40', 60 - 'rsrc/css/application/differential/changeset-view.css' => '805f1141', 60 + 'rsrc/css/application/differential/changeset-view.css' => 'ccfbc869', 61 61 'rsrc/css/application/differential/core.css' => '5b7b8ff4', 62 62 'rsrc/css/application/differential/phui-inline-comment.css' => '5953c28e', 63 63 'rsrc/css/application/differential/revision-comment.css' => '14b8565a', ··· 553 553 'conpherence-update-css' => 'faf6be09', 554 554 'conpherence-widget-pane-css' => '775eaaba', 555 555 'd3' => 'a11a5ff2', 556 - 'differential-changeset-view-css' => '805f1141', 556 + 'differential-changeset-view-css' => 'ccfbc869', 557 557 'differential-core-view-css' => '5b7b8ff4', 558 558 'differential-inline-comment-editor' => '64a5550f', 559 559 'differential-revision-add-comment-css' => 'c47f8c40', ··· 1528 1528 'javelin-vector', 1529 1529 'javelin-stratcom', 1530 1530 ), 1531 - '805f1141' => array( 1532 - 'phui-inline-comment-view-css', 1533 - ), 1534 1531 '834a1173' => array( 1535 1532 'javelin-behavior', 1536 1533 'javelin-scrollbar', ··· 1925 1922 'javelin-stratcom', 1926 1923 'javelin-util', 1927 1924 'phabricator-notification-css', 1925 + ), 1926 + 'ccfbc869' => array( 1927 + 'phui-inline-comment-view-css', 1928 1928 ), 1929 1929 'cf86d16a' => array( 1930 1930 'javelin-behavior',
+19 -1
src/applications/transactions/view/PhabricatorApplicationTransactionTextDiffDetailView.php
··· 33 33 ); 34 34 $new_styles = implode(' ', $new_styles); 35 35 36 + $omit_styles = array( 37 + 'padding: 8px 0;', 38 + ); 39 + $omit_styles = implode(' ', $omit_styles); 40 + 36 41 $result = array(); 37 - foreach ($diff->getParts() as $part) { 42 + foreach ($diff->getSummaryParts() as $part) { 38 43 $type = $part['type']; 39 44 $text = $part['text']; 40 45 switch ($type) { 46 + case '.': 47 + $result[] = phutil_tag( 48 + 'div', 49 + array( 50 + 'style' => $omit_styles, 51 + ), 52 + pht('...')); 53 + break; 41 54 case '-': 42 55 $result[] = phutil_tag( 43 56 'span', ··· 62 75 63 76 $styles = array( 64 77 'white-space: pre-wrap;', 78 + 'color: #74777D;', 65 79 ); 80 + 81 + // Beyond applying "pre-wrap", convert newlines to "<br />" explicitly 82 + // to improve behavior in clients like Airmail. 83 + $result = phutil_escape_html_newlines($result); 66 84 67 85 return phutil_tag( 68 86 'div',
+1
webroot/rsrc/css/application/differential/changeset-view.css
··· 95 95 96 96 .prose-diff { 97 97 white-space: pre-wrap; 98 + color: {$greytext}; 98 99 } 99 100 100 101 .prose-diff-frame {