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

Remove 'full-display' setting from Conpherence, spruce up search results

Summary: This removes 'full-display', 'minimal-display' from Conpherence, which I recall was because we had 2 UIs for column and regular chat. I'm also tossing in slightly nicer search results, with a link to the actual message and the full date shown for context.

Test Plan: Post a message in mobile, tablet, full conpherence, and in durable column. Clean up UI in durable column. Do a search in Full UI, click on result date, get taken to the message... usually. My test data is a little wonky, but I think this works most of the time.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+124 -179
+40 -40
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'conpherence.pkg.css' => 'f934296b', 10 + 'conpherence.pkg.css' => '49b8aaac', 11 11 'conpherence.pkg.js' => 'cbe4d9be', 12 12 'core.pkg.css' => 'b99bbf5e', 13 - 'core.pkg.js' => '30185d95', 13 + 'core.pkg.js' => '3eb7abf7', 14 14 'darkconsole.pkg.js' => 'e7393ebb', 15 15 'differential.pkg.css' => 'e1d704ce', 16 16 'differential.pkg.js' => '634399e9', ··· 46 46 'rsrc/css/application/config/config-template.css' => '8f18fa41', 47 47 'rsrc/css/application/config/setup-issue.css' => 'f794cfc3', 48 48 'rsrc/css/application/config/unhandled-exception.css' => '4c96257a', 49 - 'rsrc/css/application/conpherence/durable-column.css' => '44bcaa19', 49 + 'rsrc/css/application/conpherence/durable-column.css' => 'd82e130c', 50 50 'rsrc/css/application/conpherence/header-pane.css' => 'e8acbd37', 51 51 'rsrc/css/application/conpherence/menu.css' => '4f51db5a', 52 - 'rsrc/css/application/conpherence/message-pane.css' => '7a94bf5e', 52 + 'rsrc/css/application/conpherence/message-pane.css' => 'b80f1675', 53 53 'rsrc/css/application/conpherence/notification.css' => '965db05b', 54 54 'rsrc/css/application/conpherence/participant-pane.css' => '7bba0b56', 55 55 'rsrc/css/application/conpherence/transaction.css' => '85129c68', ··· 435 435 'rsrc/js/application/calendar/behavior-month-view.js' => 'fe33e256', 436 436 'rsrc/js/application/calendar/behavior-recurring-edit.js' => '5f1c4d5f', 437 437 'rsrc/js/application/config/behavior-reorder-fields.js' => 'b6993408', 438 - 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2', 439 - 'rsrc/js/application/conpherence/behavior-conpherence-search.js' => '3e137827', 440 - 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'c5238acb', 438 + 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '358c717b', 439 + 'rsrc/js/application/conpherence/behavior-conpherence-search.js' => '9bbf3762', 440 + 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'aa3bd034', 441 441 'rsrc/js/application/conpherence/behavior-menu.js' => '07928ca3', 442 442 'rsrc/js/application/conpherence/behavior-participant-pane.js' => '8604caa8', 443 443 'rsrc/js/application/conpherence/behavior-pontificate.js' => 'f2e58483', ··· 616 616 'conduit-api-css' => '7bc725c4', 617 617 'config-options-css' => '0ede4c9b', 618 618 'config-page-css' => '8798e14f', 619 - 'conpherence-durable-column-view' => '44bcaa19', 619 + 'conpherence-durable-column-view' => 'd82e130c', 620 620 'conpherence-header-pane-css' => 'e8acbd37', 621 621 'conpherence-menu-css' => '4f51db5a', 622 - 'conpherence-message-pane-css' => '7a94bf5e', 622 + 'conpherence-message-pane-css' => 'b80f1675', 623 623 'conpherence-notification-css' => '965db05b', 624 624 'conpherence-participant-pane-css' => '7bba0b56', 625 - 'conpherence-thread-manager' => '01774ab2', 625 + 'conpherence-thread-manager' => '358c717b', 626 626 'conpherence-transaction-css' => '85129c68', 627 627 'd3' => 'a11a5ff2', 628 628 'differential-changeset-view-css' => '9ef7d354', ··· 666 666 'javelin-behavior-conpherence-menu' => '07928ca3', 667 667 'javelin-behavior-conpherence-participant-pane' => '8604caa8', 668 668 'javelin-behavior-conpherence-pontificate' => 'f2e58483', 669 - 'javelin-behavior-conpherence-search' => '3e137827', 669 + 'javelin-behavior-conpherence-search' => '9bbf3762', 670 670 'javelin-behavior-countdown-timer' => 'e4cc26b3', 671 671 'javelin-behavior-dark-console' => 'f411b6ae', 672 672 'javelin-behavior-dashboard-async-panel' => '469c0d9e', ··· 695 695 'javelin-behavior-diffusion-pull-lastmodified' => 'f01586dc', 696 696 'javelin-behavior-doorkeeper-tag' => 'e5822781', 697 697 'javelin-behavior-drydock-live-operation-status' => '901935ef', 698 - 'javelin-behavior-durable-column' => 'c5238acb', 698 + 'javelin-behavior-durable-column' => 'aa3bd034', 699 699 'javelin-behavior-editengine-reorder-configs' => 'd7a74243', 700 700 'javelin-behavior-editengine-reorder-fields' => 'b59e1e96', 701 701 'javelin-behavior-error-log' => '6882e80a', ··· 974 974 'javelin-request', 975 975 'javelin-typeahead-source', 976 976 ), 977 - '01774ab2' => array( 978 - 'javelin-dom', 979 - 'javelin-util', 980 - 'javelin-stratcom', 981 - 'javelin-install', 982 - 'javelin-aphlict', 983 - 'javelin-workflow', 984 - 'javelin-router', 985 - 'javelin-behavior-device', 986 - 'javelin-vector', 987 - ), 988 977 '019f36c4' => array( 989 978 'javelin-behavior', 990 979 'javelin-dom', ··· 1211 1200 'javelin-dom', 1212 1201 'javelin-workflow', 1213 1202 ), 1203 + '358c717b' => array( 1204 + 'javelin-dom', 1205 + 'javelin-util', 1206 + 'javelin-stratcom', 1207 + 'javelin-install', 1208 + 'javelin-aphlict', 1209 + 'javelin-workflow', 1210 + 'javelin-router', 1211 + 'javelin-behavior-device', 1212 + 'javelin-vector', 1213 + ), 1214 1214 '3ab51e2c' => array( 1215 1215 'javelin-behavior', 1216 1216 'javelin-behavior-device', ··· 1226 1226 'javelin-workflow', 1227 1227 'javelin-util', 1228 1228 'javelin-uri', 1229 - ), 1230 - '3e137827' => array( 1231 - 'javelin-behavior', 1232 - 'javelin-dom', 1233 - 'javelin-util', 1234 - 'javelin-workflow', 1235 - 'javelin-stratcom', 1236 1229 ), 1237 1230 '3f5d6dbf' => array( 1238 1231 'javelin-behavior', ··· 1759 1752 'phabricator-phtize', 1760 1753 'changeset-view-manager', 1761 1754 ), 1755 + '9bbf3762' => array( 1756 + 'javelin-behavior', 1757 + 'javelin-dom', 1758 + 'javelin-util', 1759 + 'javelin-workflow', 1760 + 'javelin-stratcom', 1761 + ), 1762 1762 '9bdbbab0' => array( 1763 1763 'javelin-behavior', 1764 1764 'javelin-dom', ··· 1838 1838 'javelin-dom', 1839 1839 'javelin-util', 1840 1840 'phabricator-prefab', 1841 + ), 1842 + 'aa3bd034' => array( 1843 + 'javelin-behavior', 1844 + 'javelin-dom', 1845 + 'javelin-stratcom', 1846 + 'javelin-behavior-device', 1847 + 'javelin-scrollbar', 1848 + 'javelin-quicksand', 1849 + 'phabricator-keyboard-shortcut', 1850 + 'conpherence-thread-manager', 1841 1851 ), 1842 1852 'ab2f381b' => array( 1843 1853 'javelin-request', ··· 1965 1975 'bff6884b' => array( 1966 1976 'javelin-install', 1967 1977 'javelin-dom', 1968 - ), 1969 - 'c5238acb' => array( 1970 - 'javelin-behavior', 1971 - 'javelin-dom', 1972 - 'javelin-stratcom', 1973 - 'javelin-behavior-device', 1974 - 'javelin-scrollbar', 1975 - 'javelin-quicksand', 1976 - 'phabricator-keyboard-shortcut', 1977 - 'conpherence-thread-manager', 1978 1978 ), 1979 1979 'c587b80f' => array( 1980 1980 'javelin-install',
+1 -3
src/applications/conpherence/ConpherenceTransactionRenderer.php
··· 5 5 public static function renderTransactions( 6 6 PhabricatorUser $user, 7 7 ConpherenceThread $conpherence, 8 - $full_display = true, 9 8 $marker_type = 'older') { 10 9 11 10 $transactions = $conpherence->getTransactions(); ··· 74 73 ->setUser($user) 75 74 ->setConpherenceThread($conpherence) 76 75 ->setHandles($handles) 77 - ->setMarkupEngine($engine) 78 - ->setFullDisplay($full_display); 76 + ->setMarkupEngine($engine); 79 77 80 78 foreach ($transactions as $transaction) { 81 79 $collapsed = false;
+28 -38
src/applications/conpherence/controller/ConpherenceUpdateController.php
··· 335 335 $request->getInt('latest_transaction_id')) 336 336 ->appendForm($form); 337 337 338 - if ($request->getExists('minimal_display')) { 339 - $view->addHiddenInput('minimal_display', true); 340 - } 341 338 return $view; 342 339 } 343 340 ··· 477 474 ->addHiddenInput('__continue__', true) 478 475 ->appendChild($form); 479 476 480 - if ($request->getExists('minimal_display')) { 481 - $view->addHiddenInput('minimal_display', true); 482 - } 483 477 if ($request->getExists('force_ajax')) { 484 478 $view->addHiddenInput('force_ajax', true); 485 479 } ··· 492 486 $conpherence_id, 493 487 $latest_transaction_id) { 494 488 495 - $minimal_display = $this->getRequest()->getExists('minimal_display'); 496 489 $need_transactions = false; 497 490 $need_participant_cache = true; 498 491 switch ($action) { ··· 525 518 if ($need_transactions && $conpherence->getTransactions()) { 526 519 $data = ConpherenceTransactionRenderer::renderTransactions( 527 520 $user, 528 - $conpherence, 529 - !$minimal_display); 521 + $conpherence); 530 522 $key = PhabricatorConpherenceColumnMinimizeSetting::SETTINGKEY; 531 523 $minimized = $user->getUserSetting($key); 532 524 if (!$minimized) { ··· 547 539 $nav_item = null; 548 540 $header = null; 549 541 $people_widget = null; 550 - if (!$minimal_display) { 551 - switch ($action) { 552 - case ConpherenceUpdateActions::METADATA: 553 - $policy_objects = id(new PhabricatorPolicyQuery()) 554 - ->setViewer($user) 555 - ->setObject($conpherence) 556 - ->execute(); 557 - $header = $this->buildHeaderPaneContent( 558 - $conpherence, 559 - $policy_objects); 560 - $header = hsprintf('%s', $header); 561 - $nav_item = id(new ConpherenceThreadListView()) 562 - ->setUser($user) 563 - ->setBaseURI($this->getApplicationURI()) 564 - ->renderSingleThread($conpherence, $policy_objects); 565 - $nav_item = hsprintf('%s', $nav_item); 566 - break; 567 - case ConpherenceUpdateActions::ADD_PERSON: 568 - $people_widget = id(new ConpherenceParticipantView()) 569 - ->setUser($user) 570 - ->setConpherence($conpherence) 571 - ->setUpdateURI($update_uri); 572 - $people_widget = hsprintf('%s', $people_widget->render()); 573 - break; 574 - case ConpherenceUpdateActions::REMOVE_PERSON: 575 - case ConpherenceUpdateActions::NOTIFICATIONS: 576 - default: 577 - break; 578 - } 542 + switch ($action) { 543 + case ConpherenceUpdateActions::METADATA: 544 + $policy_objects = id(new PhabricatorPolicyQuery()) 545 + ->setViewer($user) 546 + ->setObject($conpherence) 547 + ->execute(); 548 + $header = $this->buildHeaderPaneContent( 549 + $conpherence, 550 + $policy_objects); 551 + $header = hsprintf('%s', $header); 552 + $nav_item = id(new ConpherenceThreadListView()) 553 + ->setUser($user) 554 + ->setBaseURI($this->getApplicationURI()) 555 + ->renderSingleThread($conpherence, $policy_objects); 556 + $nav_item = hsprintf('%s', $nav_item); 557 + break; 558 + case ConpherenceUpdateActions::ADD_PERSON: 559 + $people_widget = id(new ConpherenceParticipantView()) 560 + ->setUser($user) 561 + ->setConpherence($conpherence) 562 + ->setUpdateURI($update_uri); 563 + $people_widget = hsprintf('%s', $people_widget->render()); 564 + break; 565 + case ConpherenceUpdateActions::REMOVE_PERSON: 566 + case ConpherenceUpdateActions::NOTIFICATIONS: 567 + default: 568 + break; 579 569 } 580 570 $data = $conpherence->getDisplayData($user); 581 571 $dropdown_query = id(new AphlictDropdownDataQuery())
-1
src/applications/conpherence/controller/ConpherenceViewController.php
··· 73 73 $data = ConpherenceTransactionRenderer::renderTransactions( 74 74 $user, 75 75 $conpherence, 76 - $full_display = true, 77 76 $marker_type); 78 77 $messages = ConpherenceTransactionRenderer::renderMessagePaneContent( 79 78 $data['transactions'],
+1 -1
src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
··· 199 199 ->setMarkupEngine($engines[$conpherence_phid]) 200 200 ->setConpherenceThread($conpherence) 201 201 ->setConpherenceTransaction($xaction) 202 - ->setFullDisplay(true) 202 + ->setSearchResult(true) 203 203 ->addClass('conpherence-fulltext-result'); 204 204 205 205 if ($message['match']) {
+1 -2
src/applications/conpherence/view/ConpherenceDurableColumnView.php
··· 413 413 414 414 $data = ConpherenceTransactionRenderer::renderTransactions( 415 415 $this->getUser(), 416 - $conpherence, 417 - $full_display = false); 416 + $conpherence); 418 417 $messages = ConpherenceTransactionRenderer::renderMessagePaneContent( 419 418 $data['transactions'], 420 419 $data['oldest_transaction_id'],
+25 -34
src/applications/conpherence/view/ConpherenceTransactionView.php
··· 6 6 private $conpherenceTransaction; 7 7 private $handles; 8 8 private $markupEngine; 9 - private $fullDisplay; 10 9 private $classes = array(); 10 + private $searchResult; 11 11 private $timeOnly; 12 12 13 13 public function setConpherenceThread(ConpherenceThread $t) { ··· 47 47 return $this->markupEngine; 48 48 } 49 49 50 - public function setFullDisplay($bool) { 51 - $this->fullDisplay = $bool; 50 + public function addClass($class) { 51 + $this->classes[] = $class; 52 52 return $this; 53 53 } 54 54 55 - private function getFullDisplay() { 56 - return $this->fullDisplay; 57 - } 58 - 59 - public function addClass($class) { 60 - $this->classes[] = $class; 55 + public function setSearchResult($result) { 56 + $this->searchResult = $result; 61 57 return $this; 62 58 } 63 59 ··· 100 96 $image = $this->renderTransactionImage(); 101 97 $content = $this->renderTransactionContent(); 102 98 $classes = implode(' ', $this->classes); 103 - 104 - $transaction_dom_id = null; 105 - if ($this->getFullDisplay()) { 106 - $transaction_dom_id = 'anchor-'.$transaction->getID(); 107 - } 99 + $transaction_dom_id = 'anchor-'.$transaction->getID(); 108 100 109 101 $header = phutil_tag_div( 110 102 'conpherence-transaction-header grouped', ··· 137 129 $tip = phabricator_datetime($transaction->getDateCreated(), $viewer); 138 130 $label = phabricator_time($transaction->getDateCreated(), $viewer); 139 131 $width = 360; 140 - if ($this->getFullDisplay()) { 141 - Javelin::initBehavior('phabricator-watch-anchor'); 142 - $anchor = id(new PhabricatorAnchorView()) 143 - ->setAnchorName($transaction->getID()) 144 - ->render(); 132 + 133 + Javelin::initBehavior('phabricator-watch-anchor'); 134 + $anchor = id(new PhabricatorAnchorView()) 135 + ->setAnchorName($transaction->getID()) 136 + ->render(); 145 137 138 + if ($this->searchResult) { 139 + $uri = $thread->getMonogram(); 140 + $info[] = hsprintf( 141 + '%s', 142 + javelin_tag( 143 + 'a', 144 + array( 145 + 'href' => '/'.$uri.'#'.$transaction->getID(), 146 + 'class' => 'transaction-date', 147 + 'sigil' => 'conpherence-search-result-jump', 148 + ), 149 + $tip)); 150 + } else { 146 151 $info[] = hsprintf( 147 152 '%s%s', 148 153 $anchor, ··· 150 155 'a', 151 156 array( 152 157 'href' => '#'.$transaction->getID(), 153 - 'class' => 'anchor-link', 158 + 'class' => 'transaction-date anchor-link', 154 159 'sigil' => 'has-tooltip', 155 160 'meta' => array( 156 161 'tip' => $tip, ··· 158 163 ), 159 164 ), 160 165 $label)); 161 - } else { 162 - $href = '/'.$thread->getMonogram().'#'.$transaction->getID(); 163 - $info[] = javelin_tag( 164 - 'a', 165 - array( 166 - 'href' => $href, 167 - 'class' => 'epoch-link', 168 - 'sigil' => 'has-tooltip', 169 - 'meta' => array( 170 - 'tip' => $tip, 171 - 'size' => $width, 172 - ), 173 - ), 174 - $label); 175 166 } 176 167 177 168 return phutil_tag(
+15 -48
webroot/rsrc/css/application/conpherence/durable-column.css
··· 180 180 padding: 8px 12px 0; 181 181 } 182 182 183 - .conpherence-durable-column-transactions 184 - .conpherence-transaction-view.conpherence-edited { 185 - color: {$lightgreytext}; 186 - margin: 0; 187 - padding: 0; 188 - font-style: italic; 189 - } 190 - 191 - .conpherence-durable-column-transactions .conpherence-edited 192 - .conpherence-transaction-header { 193 - display: none; 194 - } 195 - 196 183 .conpherence-durable-column-transactions .conpherence-transaction-view { 197 184 background: none; 198 185 margin: 0; ··· 205 192 word-wrap: break-word; 206 193 } 207 194 208 - .conpherence-durable-column-transactions .conpherence-transaction-detail { 209 - border: 0; 210 - margin: 0 0 0 32px; 195 + .conpherence-durable-column-transactions .conpherence-transaction-view 196 + .conpherence-transaction-detail { 197 + border: 0; 198 + margin: 0 0 0 32px; 211 199 } 212 200 213 - .conpherence-durable-column-transactions .conpherence-transaction-detail 214 - .conpherence-transaction-header { 201 + .conpherence-durable-column-transactions .conpherence-transaction-view 202 + .conpherence-transaction-detail .conpherence-transaction-header { 215 203 background: none; 216 204 padding: 0 0 2px 0; 217 205 } 218 206 219 207 .conpherence-durable-column-transactions 220 - .conpherence-transaction-view.date-marker { 221 - margin: 12px 0 0; 208 + .conpherence-transaction-view.date-marker { 209 + margin: 12px 0 0; 222 210 } 223 211 224 212 .conpherence-durable-column-transactions 225 - .conpherence-transaction-view.date-marker .date { 226 - left: 0; 227 - font-size: {$normalfontsize}; 228 - top: -14px; 229 - padding: 0 6px 0 0; 230 - } 231 - 232 - .conpherence-durable-column-transactions .conpherence-transaction-detail 233 - .conpherence-transaction-header .conpherence-transaction-info { 234 - color: {$lightbluetext}; 235 - font-size: {$smallerfontsize}; 236 - } 237 - 238 - .conpherence-transaction-header .epoch-link { 239 - color: {$lightgreytext}; 240 - } 241 - 242 - .conpherence-durable-column-transactions .conpherence-transaction-detail 243 - .conpherence-transaction-header .phui-link-person { 244 - margin: 0 8px 0 0; 245 - } 246 - 247 - .conpherence-durable-column-transactions .conpherence-transaction-detail 248 - .conpherence-transaction-content .phui-link-person { 249 - color: #000; 213 + .conpherence-transaction-view.date-marker .date { 214 + left: 0; 215 + font-size: {$normalfontsize}; 216 + top: -10px; 217 + padding: 0 6px 0 0; 250 218 } 251 219 252 220 .conpherence-durable-column-transactions ··· 267 235 } 268 236 269 237 .conpherence-durable-column-transactions .conpherence-transaction-detail 270 - .conpherence-transaction-content { 271 - background: #fff; 272 - padding: 0 0 8px 0; 238 + .conpherence-transaction-content { 239 + padding: 0 0 8px 0; 273 240 } 274 241 275 242 .conpherence-durable-column-textarea {
+1 -1
webroot/rsrc/css/application/conpherence/message-pane.css
··· 321 321 } 322 322 323 323 .conpherence-transaction-view .conpherence-transaction-info, 324 - .conpherence-transaction-view .anchor-link, 324 + .conpherence-transaction-view .transaction-date, 325 325 .conpherence-transaction-view .phabricator-content-source-view { 326 326 color: {$lightgreytext}; 327 327 line-height: 16px;
-9
webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
··· 31 31 _transactionCache: null, 32 32 _canEditLoadedThread: null, 33 33 _updating: null, 34 - _minimalDisplay: false, 35 34 _messagesRootCallback: JX.bag, 36 35 _willLoadThreadCallback: JX.bag, 37 36 _didLoadThreadCallback: JX.bag, ··· 150 149 return this._canEditLoadedThread; 151 150 }, 152 151 153 - setMinimalDisplay: function(bool) { 154 - this._minimalDisplay = bool; 155 - return this; 156 - }, 157 - 158 152 setMessagesRootCallback: function(callback) { 159 153 this._messagesRootCallback = callback; 160 154 return this; ··· 196 190 }, 197 191 198 192 _getParams: function(base_params) { 199 - if (this._minimalDisplay) { 200 - base_params.minimal_display = true; 201 - } 202 193 if (this._latestTransactionID) { 203 194 base_params.latest_transaction_id = this._latestTransactionID; 204 195 }
+11
webroot/rsrc/js/application/conpherence/behavior-conpherence-search.js
··· 44 44 }); 45 45 request.setData({fulltext: search_text}); 46 46 request.send(); 47 + } 47 48 49 + function _viewResult(e) { 50 + e.kill(); 51 + var uri = e.getNode('tag:a'); 52 + _toggleSearch(e); 53 + JX.$U(uri).go(); 48 54 } 49 55 50 56 JX.Stratcom.listen( ··· 62 68 e.kill(); 63 69 _doSearch(e); 64 70 }); 71 + 72 + JX.Stratcom.listen( 73 + 'click', 74 + 'conpherence-search-result-jump', 75 + _viewResult); 65 76 66 77 JX.Stratcom.listen( 67 78 'click',
+1 -2
webroot/rsrc/js/application/conpherence/behavior-durable-column.js
··· 114 114 */ 115 115 116 116 var threadManager = new JX.ConpherenceThreadManager(); 117 - threadManager.setMinimalDisplay(true); 118 117 threadManager.setMessagesRootCallback(function() { 119 118 return _getColumnMessagesNode(); 120 119 }); ··· 282 281 function _sendMessage(e) { 283 282 e.kill(); 284 283 var form = _getColumnFormNode(); 285 - threadManager.sendMessage(form, { minimal_display: true }); 284 + threadManager.sendMessage(form, {}); 286 285 } 287 286 288 287 JX.Stratcom.listen(