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

Conpherence - add ability to change title in the durable column

Summary: Ref T7014.

Test Plan: changed the conpherence title from the column. since i can't get scrolling to work, i inspect the dom to verify the title change transaction showed up properly

Reviewers: epriestley, chad

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7014

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

+93 -30
+12 -12
resources/celerity/map.php
··· 44 44 'rsrc/css/application/config/config-welcome.css' => '6abd79be', 45 45 'rsrc/css/application/config/setup-issue.css' => '22270af2', 46 46 'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2', 47 - 'rsrc/css/application/conpherence/durable-column.css' => '1ef6ae75', 47 + 'rsrc/css/application/conpherence/durable-column.css' => '9207426d', 48 48 'rsrc/css/application/conpherence/menu.css' => 'c6ac5299', 49 49 'rsrc/css/application/conpherence/message-pane.css' => '5930260a', 50 50 'rsrc/css/application/conpherence/notification.css' => '04a6e10a', ··· 351 351 'rsrc/js/application/aphlict/behavior-aphlict-status.js' => 'ea681761', 352 352 'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18', 353 353 'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de', 354 - 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'd32db212', 354 + 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'e4affa94', 355 355 'rsrc/js/application/conpherence/behavior-menu.js' => '869e3445', 356 356 'rsrc/js/application/conpherence/behavior-pontificate.js' => '86df5915', 357 357 'rsrc/js/application/conpherence/behavior-widget-pane.js' => '40b1ff90', ··· 512 512 'changeset-view-manager' => 'a9af1212', 513 513 'config-options-css' => '7fedf08b', 514 514 'config-welcome-css' => '6abd79be', 515 - 'conpherence-durable-column-view' => '1ef6ae75', 515 + 'conpherence-durable-column-view' => '9207426d', 516 516 'conpherence-menu-css' => 'c6ac5299', 517 517 'conpherence-message-pane-css' => '5930260a', 518 518 'conpherence-notification-css' => '04a6e10a', ··· 582 582 'javelin-behavior-diffusion-locate-file' => '6d3e1947', 583 583 'javelin-behavior-diffusion-pull-lastmodified' => '2b228192', 584 584 'javelin-behavior-doorkeeper-tag' => 'e5822781', 585 - 'javelin-behavior-durable-column' => 'd32db212', 585 + 'javelin-behavior-durable-column' => 'e4affa94', 586 586 'javelin-behavior-error-log' => '6882e80a', 587 587 'javelin-behavior-fancy-datepicker' => 'c51ae228', 588 588 'javelin-behavior-global-drag-and-drop' => '07f199d8', ··· 1756 1756 'd254d646' => array( 1757 1757 'javelin-util', 1758 1758 ), 1759 - 'd32db212' => array( 1760 - 'javelin-behavior', 1761 - 'javelin-dom', 1762 - 'javelin-stratcom', 1763 - 'javelin-scrollbar', 1764 - 'javelin-quicksand', 1765 - 'phabricator-keyboard-shortcut', 1766 - ), 1767 1759 'd3aa4b40' => array( 1768 1760 'javelin-dom', 1769 1761 'javelin-util', ··· 1843 1835 'javelin-vector', 1844 1836 'javelin-dom', 1845 1837 'javelin-uri', 1838 + ), 1839 + 'e4affa94' => array( 1840 + 'javelin-behavior', 1841 + 'javelin-dom', 1842 + 'javelin-stratcom', 1843 + 'javelin-scrollbar', 1844 + 'javelin-quicksand', 1845 + 'phabricator-keyboard-shortcut', 1846 1846 ), 1847 1847 'e4cc26b3' => array( 1848 1848 'javelin-behavior',
+11 -5
src/applications/conpherence/controller/ConpherenceController.php
··· 62 62 63 63 protected function buildHeaderPaneContent(ConpherenceThread $conpherence) { 64 64 $crumbs = $this->buildApplicationCrumbs(); 65 - if ($conpherence->getTitle()) { 66 - $title = $conpherence->getTitle(); 67 - } else { 68 - $title = pht('[No Title]'); 69 - } 65 + $title = $this->getConpherenceTitle($conpherence); 70 66 $crumbs->addCrumb( 71 67 id(new PHUICrumbView()) 72 68 ->setName($title) ··· 85 81 $crumbs, 86 82 )); 87 83 } 84 + 85 + protected function getConpherenceTitle(ConpherenceThread $conpherence) { 86 + if ($conpherence->getTitle()) { 87 + $title = $conpherence->getTitle(); 88 + } else { 89 + $title = pht('[No Title]'); 90 + } 91 + return $title; 92 + } 93 + 88 94 }
+15 -2
src/applications/conpherence/controller/ConpherenceUpdateController.php
··· 108 108 ->setTransactionType(ConpherenceTransactionType::TYPE_TITLE) 109 109 ->setNewValue($title); 110 110 $updated = true; 111 - $response_mode = 'redirect'; 111 + if (!$request->getExists('force_ajax')) { 112 + $response_mode = 'redirect'; 113 + } 112 114 } 113 115 if (!$updated) { 114 116 $errors[] = pht( ··· 271 273 ->setValue($conpherence->getTitle())); 272 274 273 275 require_celerity_resource('conpherence-update-css'); 274 - return id(new AphrontDialogView()) 276 + $view = id(new AphrontDialogView()) 275 277 ->setTitle(pht('Update Conpherence')) 276 278 ->addHiddenInput('action', 'metadata') 277 279 ->addHiddenInput( ··· 279 281 $request->getInt('latest_transaction_id')) 280 282 ->addHiddenInput('__continue__', true) 281 283 ->appendChild($form); 284 + 285 + if ($request->getExists('minimal_display')) { 286 + $view->addHiddenInput('minimal_display', true); 287 + } 288 + if ($request->getExists('force_ajax')) { 289 + $view->addHiddenInput('force_ajax', true); 290 + } 291 + 292 + return $view; 282 293 } 283 294 284 295 private function loadAndRenderUpdates( ··· 361 372 if ($people_widget) { 362 373 $people_html = hsprintf('%s', $people_widget->render()); 363 374 } 375 + $title = $this->getConpherenceTitle($conpherence); 364 376 $content = array( 365 377 'transactions' => hsprintf('%s', $rendered_transactions), 378 + 'conpherence_title' => (string) $title, 366 379 'latest_transaction_id' => $new_latest_transaction_id, 367 380 'nav_item' => hsprintf('%s', $nav_item), 368 381 'conpherence_phid' => $conpherence->getPHID(),
+1 -4
src/applications/conpherence/controller/ConpherenceViewController.php
··· 54 54 ); 55 55 } 56 56 57 - $title = $conpherence->getTitle(); 58 - if (!$title) { 59 - $title = pht('[No Title]'); 60 - } 57 + $title = $this->getConpherenceTitle($conpherence); 61 58 $content['title'] = $title; 62 59 63 60 if ($request->isAjax()) {
+8 -1
src/applications/conpherence/view/ConpherenceDurableColumnView.php
··· 205 205 'class' => 'conpherence-durable-column-header', 206 206 ), 207 207 array( 208 - phutil_tag( 208 + javelin_tag( 209 209 'div', 210 210 array( 211 + 'sigil' => 'conpherence-durable-column-header-text', 211 212 'class' => 'conpherence-durable-column-header-text', 212 213 ), 213 214 $title), ··· 223 224 'href' => '/conpherence/update/'.$conpherence->getID().'/', 224 225 'icon' => 'fa-plus', 225 226 'key' => ConpherenceUpdateActions::ADD_PERSON, 227 + ), 228 + array( 229 + 'name' => pht('Rename Thread'), 230 + 'href' => '/conpherence/update/'.$conpherence->getID().'/', 231 + 'icon' => 'fa-pencil', 232 + 'key' => ConpherenceUpdateActions::METADATA, 226 233 ), 227 234 array( 228 235 'name' => pht('View in Conpherence'),
+1
webroot/rsrc/css/application/conpherence/durable-column.css
··· 50 50 51 51 .conpherence-durable-column-header-text:hover { 52 52 color: #fff; 53 + text-decoration: none; 53 54 } 54 55 55 56 .conpherence-durable-column-icon-bar {
+45 -6
webroot/rsrc/js/application/conpherence/behavior-durable-column.js
··· 90 90 knownID: latestTransactionID 91 91 }; 92 92 workflow.listen('finally', function() { 93 - var need_sync = (updating.knownID > latestTransactionID); 93 + var need_sync = (updating && updating.knownID > latestTransactionID); 94 94 updating = null; 95 95 if (need_sync) { 96 96 update_thread(); ··· 134 134 var data = e.getNodeData('conpherence-durable-column-header-action'); 135 135 var action = data.action; 136 136 var link = e.getNode('tag:a'); 137 + var params = null; 137 138 138 139 switch (action) { 140 + case 'metadata': 141 + JX.Stratcom.invoke('notification-panel-close'); 142 + params = { 143 + action: action, 144 + latest_transaction_id: latestTransactionID, 145 + minimal_display: true, 146 + force_ajax: true 147 + }; 148 + var workflow = new JX.Workflow.newFromLink(link) 149 + .setData(params) 150 + .setHandler(function(r) { 151 + var messages = _getColumnMessagesNode(); 152 + JX.DOM.appendContent(messages, JX.$H(r.transactions)); 153 + messages.scrollTop = messages.scrollHeight; 154 + 155 + var title = _getColumnTitleNode(); 156 + JX.DOM.setContent(title, r.conpherence_title); 157 + 158 + latestTransactionID = r.latest_transaction_id; 159 + // since this is a two step workflow, and the "finally" method 160 + // gets called on the first form load, restore "updating" if 161 + // necessary 162 + if (updating === null) { 163 + updating = { 164 + threadPHID: loadedThreadPHID, 165 + knownID: latestTransactionID 166 + }; 167 + } 168 + }); 169 + sync_workflow(workflow); 170 + break; 139 171 case 'add_person': 140 172 JX.Stratcom.invoke('notification-panel-close'); 141 - var params = { 173 + params = { 142 174 action: action, 143 175 latest_transaction_id: latestTransactionID, 144 176 minimal_display: true ··· 193 225 'conpherence-durable-column-transactions'); 194 226 } 195 227 228 + function _getColumnTitleNode() { 229 + var column = JX.$('conpherence-durable-column'); 230 + return JX.DOM.find( 231 + column, 232 + 'div', 233 + 'conpherence-durable-column-header-text'); 234 + } 235 + 196 236 function _getColumnFormNode() { 197 237 var column = JX.$('conpherence-durable-column'); 198 238 return JX.DOM.find( ··· 231 271 // We can pick a thread from the server the first time 232 272 if (shouldInit) { 233 273 shouldInit = false; 234 - params = { shouldInit : true }; 235 274 } else { 236 275 params = { id : thread_id }; 237 276 } ··· 282 321 } 283 322 284 323 JX.Stratcom.listen( 285 - 'click', 286 - 'conpherence-send-message', 287 - _sendMessage); 324 + 'click', 325 + 'conpherence-send-message', 326 + _sendMessage); 288 327 289 328 JX.Stratcom.listen( 290 329 ['submit', 'didSyntheticSubmit'],