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

In prose diff dialogs (like "Show Details" in transactions), show "old", "new" and "diff" tabs

Summary:
Ref T7643. When you do something like this:

- Edit a task description.
- Click "Show Details" on the resulting transaction.
- Get a prose diff dialog showing the change.

...now add some "Old" and "New" tabs. These are useful for:

- reverting to the old text by copy/pasting;
- reading just the new/old text if the diff is noisy;
- sometimes just nice to have?

(This looks a little rough but I didn't want to put a negative margin on tab groups inside dialogs? Not sure what the best fix here is.)

Test Plan: {F1909390}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7643

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

+48 -10
+9 -9
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => 'cea72e09', 11 11 'conpherence.pkg.js' => '6249a1cf', 12 - 'core.pkg.css' => '46d588e4', 12 + 'core.pkg.css' => '4fc9469e', 13 13 'core.pkg.js' => '035325a7', 14 14 'darkconsole.pkg.js' => 'e7393ebb', 15 - 'differential.pkg.css' => 'e1d704ce', 15 + 'differential.pkg.css' => 'a4ba74b5', 16 16 'differential.pkg.js' => '634399e9', 17 17 'diffusion.pkg.css' => '91c5d3a6', 18 18 'diffusion.pkg.js' => '84c8f8fd', ··· 21 21 'maniphest.pkg.js' => '949a7498', 22 22 'rsrc/css/aphront/aphront-bars.css' => '231ac33c', 23 23 'rsrc/css/aphront/dark-console.css' => 'f54bf286', 24 - 'rsrc/css/aphront/dialog-view.css' => '593d3f67', 24 + 'rsrc/css/aphront/dialog-view.css' => '84f1e6a6', 25 25 'rsrc/css/aphront/lightbox-attachment.css' => '7acac05d', 26 26 'rsrc/css/aphront/list-filter-view.css' => '5d6f0526', 27 27 'rsrc/css/aphront/multi-column.css' => '84cc6640', ··· 60 60 'rsrc/css/application/dashboard/dashboard.css' => 'bc6f2127', 61 61 'rsrc/css/application/diff/inline-comment-summary.css' => '51efda3a', 62 62 'rsrc/css/application/differential/add-comment.css' => 'c47f8c40', 63 - 'rsrc/css/application/differential/changeset-view.css' => '9ef7d354', 63 + 'rsrc/css/application/differential/changeset-view.css' => 'b158cc46', 64 64 'rsrc/css/application/differential/core.css' => '5b7b8ff4', 65 65 'rsrc/css/application/differential/phui-inline-comment.css' => '5953c28e', 66 66 'rsrc/css/application/differential/revision-comment.css' => '14b8565a', ··· 552 552 'almanac-css' => 'dbb9b3af', 553 553 'aphront-bars' => '231ac33c', 554 554 'aphront-dark-console-css' => 'f54bf286', 555 - 'aphront-dialog-view-css' => '593d3f67', 555 + 'aphront-dialog-view-css' => '84f1e6a6', 556 556 'aphront-list-filter-view-css' => '5d6f0526', 557 557 'aphront-multi-column-view-css' => '84cc6640', 558 558 'aphront-panel-view-css' => '8427b78d', ··· 576 576 'conpherence-thread-manager' => '358c717b', 577 577 'conpherence-transaction-css' => '85129c68', 578 578 'd3' => 'a11a5ff2', 579 - 'differential-changeset-view-css' => '9ef7d354', 579 + 'differential-changeset-view-css' => 'b158cc46', 580 580 'differential-core-view-css' => '5b7b8ff4', 581 581 'differential-inline-comment-editor' => '64a5550f', 582 582 'differential-revision-add-comment-css' => 'c47f8c40', ··· 1733 1733 'javelin-workflow', 1734 1734 'javelin-stratcom', 1735 1735 ), 1736 - '9ef7d354' => array( 1737 - 'phui-inline-comment-view-css', 1738 - ), 1739 1736 '9f36c42d' => array( 1740 1737 'javelin-behavior', 1741 1738 'javelin-stratcom', ··· 1837 1834 'javelin-request', 1838 1835 'javelin-util', 1839 1836 'phabricator-shaped-request', 1837 + ), 1838 + 'b158cc46' => array( 1839 + 'phui-inline-comment-view-css', 1840 1840 ), 1841 1841 'b1f0ccee' => array( 1842 1842 'javelin-install',
+1
src/applications/transactions/controller/PhabricatorApplicationTransactionDetailController.php
··· 42 42 return $this->newDialog() 43 43 ->setTitle(pht('Change Details')) 44 44 ->setWidth(AphrontDialogView::WIDTH_FORM) 45 + ->setClass('aphront-dialog-tab-group') 45 46 ->appendChild($details) 46 47 ->addCancelButton($cancel_uri, $button_text); 47 48 }
+33 -1
src/applications/transactions/view/PhabricatorApplicationTransactionTextDiffDetailView.php
··· 122 122 } 123 123 } 124 124 125 - return phutil_tag( 125 + $diff_view = phutil_tag( 126 126 'div', 127 127 array( 128 128 'class' => 'prose-diff', 129 129 ), 130 130 $result); 131 + 132 + $old_view = phutil_tag( 133 + 'div', 134 + array( 135 + 'class' => 'prose-diff', 136 + ), 137 + $this->oldText); 138 + 139 + $new_view = phutil_tag( 140 + 'div', 141 + array( 142 + 'class' => 'prose-diff', 143 + ), 144 + $this->newText); 145 + 146 + return id(new PHUITabGroupView()) 147 + ->addTab( 148 + id(new PHUITabView()) 149 + ->setKey('old') 150 + ->setName(pht('Old')) 151 + ->appendChild($old_view)) 152 + ->addTab( 153 + id(new PHUITabView()) 154 + ->setKey('new') 155 + ->setName(pht('New')) 156 + ->appendChild($new_view)) 157 + ->addTab( 158 + id(new PHUITabView()) 159 + ->setKey('diff') 160 + ->setName(pht('Diff')) 161 + ->appendChild($diff_view)) 162 + ->selectTab('diff'); 131 163 } 132 164 133 165 private function buildDiff() {
+4
webroot/rsrc/css/aphront/dialog-view.css
··· 165 165 .aphront-dialog-object-list .aphront-dialog-body { 166 166 padding: 0 12px; 167 167 } 168 + 169 + .aphront-dialog-tab-group .aphront-dialog-body { 170 + padding: 0 12px; 171 + }
+1
webroot/rsrc/css/application/differential/changeset-view.css
··· 94 94 } 95 95 96 96 .prose-diff { 97 + padding: 12px 0; 97 98 white-space: pre-wrap; 98 99 color: {$greytext}; 99 100 }