@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 Files Widget from Conpherence

Summary: Fixes T8834. Removes everywhere I could find references to Files.

Test Plan: Use Conpherence, send a message, attach a file, try durable column, send message, send file. Seems snappy.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T8834

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

+18 -202
+18 -18
resources/celerity/map.php
··· 51 51 'rsrc/css/application/conpherence/notification.css' => '6cdcc253', 52 52 'rsrc/css/application/conpherence/transaction.css' => '85d0974c', 53 53 'rsrc/css/application/conpherence/update.css' => 'faf6be09', 54 - 'rsrc/css/application/conpherence/widget-pane.css' => 'b0793769', 54 + 'rsrc/css/application/conpherence/widget-pane.css' => '775eaaba', 55 55 'rsrc/css/application/contentsource/content-source-view.css' => '4b8b05d4', 56 56 'rsrc/css/application/countdown/timer.css' => 'e7544472', 57 57 'rsrc/css/application/daemon/bulk-job.css' => 'df9c1d4a', ··· 346 346 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2', 347 347 'rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js' => 'cf86d16a', 348 348 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'c72aa091', 349 - 'rsrc/js/application/conpherence/behavior-menu.js' => 'd3782c93', 349 + 'rsrc/js/application/conpherence/behavior-menu.js' => '1d45c74d', 350 350 'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861', 351 351 'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3', 352 352 'rsrc/js/application/conpherence/behavior-widget-pane.js' => 'a8458711', ··· 514 514 'conpherence-thread-manager' => '01774ab2', 515 515 'conpherence-transaction-css' => '85d0974c', 516 516 'conpherence-update-css' => 'faf6be09', 517 - 'conpherence-widget-pane-css' => 'b0793769', 517 + 'conpherence-widget-pane-css' => '775eaaba', 518 518 'differential-changeset-view-css' => 'b6b0d1bb', 519 519 'differential-core-view-css' => '7ac3cabc', 520 520 'differential-inline-comment-editor' => 'd4c87bf4', ··· 552 552 'javelin-behavior-choose-control' => '6153c708', 553 553 'javelin-behavior-config-reorder-fields' => 'b6993408', 554 554 'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a', 555 - 'javelin-behavior-conpherence-menu' => 'd3782c93', 555 + 'javelin-behavior-conpherence-menu' => '1d45c74d', 556 556 'javelin-behavior-conpherence-pontificate' => '21ba5861', 557 557 'javelin-behavior-conpherence-widget-pane' => 'a8458711', 558 558 'javelin-behavior-countdown-timer' => 'e4cc26b3', ··· 955 955 'javelin-dom', 956 956 'javelin-vector', 957 957 ), 958 + '1d45c74d' => array( 959 + 'javelin-behavior', 960 + 'javelin-dom', 961 + 'javelin-util', 962 + 'javelin-stratcom', 963 + 'javelin-workflow', 964 + 'javelin-behavior-device', 965 + 'javelin-history', 966 + 'javelin-vector', 967 + 'javelin-scrollbar', 968 + 'phabricator-title', 969 + 'phabricator-shaped-request', 970 + 'conpherence-thread-manager', 971 + ), 958 972 '1def2711' => array( 959 973 'javelin-install', 960 974 'javelin-dom', ··· 1797 1811 ), 1798 1812 'd254d646' => array( 1799 1813 'javelin-util', 1800 - ), 1801 - 'd3782c93' => array( 1802 - 'javelin-behavior', 1803 - 'javelin-dom', 1804 - 'javelin-util', 1805 - 'javelin-stratcom', 1806 - 'javelin-workflow', 1807 - 'javelin-behavior-device', 1808 - 'javelin-history', 1809 - 'javelin-vector', 1810 - 'javelin-scrollbar', 1811 - 'phabricator-title', 1812 - 'phabricator-shaped-request', 1813 - 'conpherence-thread-manager', 1814 1814 ), 1815 1815 'd4505101' => array( 1816 1816 'javelin-stratcom',
-2
src/__phutil_library_map__.php
··· 232 232 'ConpherenceDAO' => 'applications/conpherence/storage/ConpherenceDAO.php', 233 233 'ConpherenceDurableColumnView' => 'applications/conpherence/view/ConpherenceDurableColumnView.php', 234 234 'ConpherenceEditor' => 'applications/conpherence/editor/ConpherenceEditor.php', 235 - 'ConpherenceFileWidgetView' => 'applications/conpherence/view/ConpherenceFileWidgetView.php', 236 235 'ConpherenceFormDragAndDropUploadControl' => 'applications/conpherence/view/ConpherenceFormDragAndDropUploadControl.php', 237 236 'ConpherenceFulltextQuery' => 'applications/conpherence/query/ConpherenceFulltextQuery.php', 238 237 'ConpherenceHovercardEventListener' => 'applications/conpherence/events/ConpherenceHovercardEventListener.php', ··· 3853 3852 'ConpherenceDAO' => 'PhabricatorLiskDAO', 3854 3853 'ConpherenceDurableColumnView' => 'AphrontTagView', 3855 3854 'ConpherenceEditor' => 'PhabricatorApplicationTransactionEditor', 3856 - 'ConpherenceFileWidgetView' => 'ConpherenceWidgetView', 3857 3855 'ConpherenceFormDragAndDropUploadControl' => 'AphrontFormControl', 3858 3856 'ConpherenceFulltextQuery' => 'PhabricatorOffsetPagedQuery', 3859 3857 'ConpherenceHovercardEventListener' => 'PhabricatorEventListener',
-6
src/applications/conpherence/constants/ConpherenceWidgetConfigConstants.php
··· 30 30 'customHref' => null, 31 31 ), 32 32 ), 33 - 'widgets-files' => array( 34 - 'name' => pht('Files'), 35 - 'icon' => 'fa-files-o', 36 - 'deviceOnly' => false, 37 - 'hasCreate' => false, 38 - ), 39 33 'widgets-settings' => array( 40 34 'name' => pht('Notifications'), 41 35 'icon' => 'fa-wrench',
-7
src/applications/conpherence/controller/ConpherenceUpdateController.php
··· 524 524 ->renderSingleThread($conpherence, $policy_objects); 525 525 $nav_item = hsprintf('%s', $nav_item); 526 526 break; 527 - case ConpherenceUpdateActions::MESSAGE: 528 - $file_widget = id(new ConpherenceFileWidgetView()) 529 - ->setUser($this->getRequest()->getUser()) 530 - ->setConpherence($conpherence) 531 - ->setUpdateURI($widget_uri); 532 - $file_widget = hsprintf('%s', $file_widget->render()); 533 - break; 534 527 case ConpherenceUpdateActions::ADD_PERSON: 535 528 $people_widget = id(new ConpherencePeopleWidgetView()) 536 529 ->setUser($user)
-18
src/applications/conpherence/controller/ConpherenceWidgetController.php
··· 41 41 case 'widgets-people': 42 42 $content = $this->renderPeopleWidgetPaneContent(); 43 43 break; 44 - case 'widgets-files': 45 - $content = $this->renderFileWidgetPaneContent(); 46 - break; 47 44 case 'widgets-settings': 48 45 $content = $this->renderSettingsWidgetPaneContent(); 49 46 break; ··· 90 87 'sigil' => 'widgets-people', 91 88 ), 92 89 $this->renderPeopleWidgetPaneContent()); 93 - $widgets[] = javelin_tag( 94 - 'div', 95 - array( 96 - 'class' => 'widgets-body', 97 - 'id' => 'widgets-files', 98 - 'sigil' => 'widgets-files', 99 - 'style' => 'display: none;', 100 - ), 101 - $this->renderFileWidgetPaneContent()); 102 90 $widgets[] = phutil_tag( 103 91 'div', 104 92 array( ··· 127 115 ->setUpdateURI($this->getWidgetURI()); 128 116 } 129 117 130 - private function renderFileWidgetPaneContent() { 131 - return id(new ConpherenceFileWidgetView()) 132 - ->setUser($this->getViewer()) 133 - ->setConpherence($this->getConpherence()) 134 - ->setUpdateURI($this->getWidgetURI()); 135 - } 136 118 137 119 private function renderSettingsWidgetPaneContent() { 138 120 $viewer = $this->getViewer();
-76
src/applications/conpherence/view/ConpherenceFileWidgetView.php
··· 1 - <?php 2 - 3 - final class ConpherenceFileWidgetView extends ConpherenceWidgetView { 4 - 5 - public function render() { 6 - $conpherence = $this->getConpherence(); 7 - $widget_data = $conpherence->getWidgetData(); 8 - $files = $widget_data['files']; 9 - $files_authors = $widget_data['files_authors']; 10 - $files_html = array(); 11 - 12 - foreach ($files as $file) { 13 - $icon_class = $file->getDisplayIconForMimeType(); 14 - $icon_view = phutil_tag( 15 - 'div', 16 - array( 17 - 'class' => 'file-icon phui-font-fa phui-icon-view '.$icon_class, 18 - ), 19 - ''); 20 - $file_view = id(new PhabricatorFileLinkView()) 21 - ->setFilePHID($file->getPHID()) 22 - ->setFileName(id(new PhutilUTF8StringTruncator()) 23 - ->setMaximumGlyphs(28) 24 - ->truncateString($file->getName())) 25 - ->setFileViewable($file->isViewableImage()) 26 - ->setFileViewURI($file->getBestURI()) 27 - ->setCustomClass('file-title'); 28 - 29 - $who_done_it_text = ''; 30 - // system generated files don't have authors 31 - if ($file->getAuthorPHID()) { 32 - $who_done_it_text = pht( 33 - 'By %s ', 34 - $files_authors[$file->getPHID()]->renderLink()); 35 - } 36 - $date_text = phabricator_relative_date( 37 - $file->getDateCreated(), 38 - $this->getUser()); 39 - 40 - $who_done_it = phutil_tag( 41 - 'div', 42 - array( 43 - 'class' => 'file-uploaded-by', 44 - ), 45 - pht('%s%s.', $who_done_it_text, $date_text)); 46 - 47 - $files_html[] = phutil_tag( 48 - 'div', 49 - array( 50 - 'class' => 'file-entry', 51 - ), 52 - array( 53 - $icon_view, 54 - $file_view, 55 - $who_done_it, 56 - )); 57 - } 58 - 59 - if (empty($files)) { 60 - $files_html[] = javelin_tag( 61 - 'div', 62 - array( 63 - 'class' => 'no-files', 64 - 'sigil' => 'no-files', 65 - ), 66 - pht('No files.')); 67 - } 68 - 69 - return phutil_tag( 70 - 'div', 71 - array('class' => 'file-list'), 72 - $files_html); 73 - 74 - } 75 - 76 - }
-63
webroot/rsrc/css/application/conpherence/widget-pane.css
··· 95 95 top: 142px; 96 96 } 97 97 98 - /* files widget */ 99 - 100 - .conpherence-widget-pane #widgets-files .no-files { 101 - width: 200px; 102 - padding: 20px; 103 - text-align: center; 104 - color: {$greytext}; 105 - } 106 - 107 - .device .conpherence-widget-pane #widgets-files .no-files { 108 - width: 60px; 109 - margin: 0 auto 0 auto; 110 - } 111 - 112 - .conpherence-widget-pane #widgets-files .file-entry { 113 - padding: 8px 0; 114 - margin: 0 4px 0 8px; 115 - border-bottom: 1px solid {$thinblueborder}; 116 - } 117 - 118 - .conpherence-widget-pane #widgets-files .file-entry a { 119 - color: {$darkbluetext}; 120 - font-weight: bold; 121 - } 122 - 123 - .conpherence-widget-pane #widgets-files .file-icon { 124 - width: 32px; 125 - height: 32px; 126 - float: left; 127 - font-size: 24px; 128 - color: {$blue}; 129 - margin: 2px 0 2px 4px; 130 - } 131 - 132 - .conpherence-widget-pane #widgets-files .file-title { 133 - display: block; 134 - position: relative; 135 - top: -4px; 136 - left: 0; 137 - overflow-x: hidden; 138 - width: 180px; 139 - font-weight: bold; 140 - text-overflow: ellipsis; 141 - white-space: nowrap; 142 - } 143 - .conpherence-widget-pane #widgets-files .file-uploaded-by { 144 - color: {$lightgreytext}; 145 - position: relative; 146 - top: 0; 147 - left: 0; 148 - width: 180px; 149 - font-size: {$smallestfontsize}; 150 - } 151 - 152 - .device .conpherence-widget-pane #widgets-files .file-title, 153 - .device .conpherence-widget-pane #widgets-files .file-uploaded-by { 154 - width: 82%; 155 - } 156 - .device .conpherence-widget-pane #widgets-files .divider { 157 - width: 80%; 158 - margin: 8px 0px 0px 10%; 159 - } 160 - 161 98 .conpherence-widget-pane .widget-icon { 162 99 display: block; 163 100 height: 14px;
-12
webroot/rsrc/js/application/conpherence/behavior-menu.js
··· 66 66 var form_root = JX.DOM.find(root, 'div', 'conpherence-form'); 67 67 var textarea = JX.DOM.find(form_root, 'textarea'); 68 68 if (!non_update) { 69 - var fileWidget = null; 70 - try { 71 - fileWidget = JX.DOM.find(root, 'div', 'widgets-files'); 72 - } catch (ex) { 73 - // Ignore; maybe no files widget 74 - } 75 - if (fileWidget) { 76 - JX.DOM.setContent( 77 - fileWidget, 78 - JX.$H(r.file_widget)); 79 - } 80 - 81 69 _scrollMessageWindow(); 82 70 textarea.value = ''; 83 71 }