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

Show change information in file icons in the filetree

Summary: Ref T13516. Restores "deleted"/"added" information to the tree icons.

Test Plan: {F7375145}

Maniphest Tasks: T13516

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

+98 -52
+18 -18
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => '3c8a0668', 11 11 'conpherence.pkg.js' => '020aebcf', 12 - 'core.pkg.css' => '4d5d0922', 12 + 'core.pkg.css' => 'dd5f04a3', 13 13 'core.pkg.js' => '544bc792', 14 14 'differential.pkg.css' => 'cb99cd21', 15 - 'differential.pkg.js' => 'b3589d05', 15 + 'differential.pkg.js' => 'b1ef535d', 16 16 'diffusion.pkg.css' => '42c75c37', 17 17 'diffusion.pkg.js' => 'a98c0bf7', 18 18 'maniphest.pkg.css' => '35995d6d', ··· 119 119 'rsrc/css/diviner/diviner-shared.css' => '4bd263b0', 120 120 'rsrc/css/font/font-awesome.css' => '3883938a', 121 121 'rsrc/css/font/font-lato.css' => '23631304', 122 - 'rsrc/css/font/phui-font-icon-base.css' => 'd7994e06', 122 + 'rsrc/css/font/phui-font-icon-base.css' => '303c9b87', 123 123 'rsrc/css/layout/phabricator-source-code-view.css' => '03d7ac28', 124 124 'rsrc/css/phui/button/phui-button-bar.css' => 'a4aa75c4', 125 125 'rsrc/css/phui/button/phui-button-simple.css' => '1ff278aa', ··· 378 378 'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => 'a2ab19be', 379 379 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '1e413dc9', 380 380 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8', 381 - 'rsrc/js/application/diff/DiffChangeset.js' => '2a3101b1', 381 + 'rsrc/js/application/diff/DiffChangeset.js' => 'd089ffb1', 382 382 'rsrc/js/application/diff/DiffChangesetList.js' => '57035863', 383 383 'rsrc/js/application/diff/DiffInline.js' => '16e97ebc', 384 384 'rsrc/js/application/diff/DiffPathView.js' => '5f70ad12', ··· 775 775 'phabricator-darklog' => '3b869402', 776 776 'phabricator-darkmessage' => '26cd4b73', 777 777 'phabricator-dashboard-css' => '5a205b9d', 778 - 'phabricator-diff-changeset' => '2a3101b1', 778 + 'phabricator-diff-changeset' => 'd089ffb1', 779 779 'phabricator-diff-changeset-list' => '57035863', 780 780 'phabricator-diff-inline' => '16e97ebc', 781 781 'phabricator-diff-path-view' => '5f70ad12', ··· 842 842 'phui-document-view-css' => '52b748a5', 843 843 'phui-document-view-pro-css' => 'b9613a10', 844 844 'phui-feed-story-css' => 'a0c05029', 845 - 'phui-font-icon-base-css' => 'd7994e06', 845 + 'phui-font-icon-base-css' => '303c9b87', 846 846 'phui-fontkit-css' => '1ec937e5', 847 847 'phui-form-css' => '1f177cb7', 848 848 'phui-form-view-css' => '01b796c0', ··· 1155 1155 'javelin-stratcom', 1156 1156 'javelin-behavior', 1157 1157 ), 1158 - '2a3101b1' => array( 1159 - 'javelin-dom', 1160 - 'javelin-util', 1161 - 'javelin-stratcom', 1162 - 'javelin-install', 1163 - 'javelin-workflow', 1164 - 'javelin-router', 1165 - 'javelin-behavior-device', 1166 - 'javelin-vector', 1167 - 'phabricator-diff-inline', 1168 - 'phabricator-diff-path-view', 1169 - ), 1170 1158 '2a8b62d9' => array( 1171 1159 'multirow-row-manager', 1172 1160 'javelin-install', ··· 2092 2080 'javelin-behavior', 2093 2081 'javelin-dom', 2094 2082 'javelin-stratcom', 2083 + ), 2084 + 'd089ffb1' => array( 2085 + 'javelin-dom', 2086 + 'javelin-util', 2087 + 'javelin-stratcom', 2088 + 'javelin-install', 2089 + 'javelin-workflow', 2090 + 'javelin-router', 2091 + 'javelin-behavior-device', 2092 + 'javelin-vector', 2093 + 'phabricator-diff-inline', 2094 + 'phabricator-diff-path-view', 2095 2095 ), 2096 2096 'd12d214f' => array( 2097 2097 'javelin-install',
+3
src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php
··· 240 240 241 241 'document.border' => '#dedee1', 242 242 243 + 'delete-color' => '#c0392b', 244 + 'create-color' => '#139543', 245 + 243 246 ); 244 247 } 245 248
+3
src/applications/celerity/postprocessor/CelerityRedGreenPostprocessor.php
··· 17 17 'new-bright' => 'rgba(152, 207, 235, .35)', 18 18 'old-background' => 'rgba(250, 212, 175, .3)', 19 19 'old-bright' => 'rgba(250, 212, 175, .55)', 20 + 21 + 'delete-color' => '#e67e22', 22 + 'create-color' => '#2980b9', 20 23 ); 21 24 } 22 25
+53 -33
src/applications/differential/storage/DifferentialChangeset.php
··· 259 259 } 260 260 261 261 public function newFileTreeIcon() { 262 - $file_type = $this->getFileType(); 263 - $change_type = $this->getChangeType(); 262 + $icon = $this->getPathIconIcon(); 263 + $color = $this->getPathIconColor(); 264 + 265 + return id(new PHUIIconView()) 266 + ->setIcon("{$icon} {$color}"); 267 + } 264 268 269 + public function getPathIconIcon() { 270 + return idx($this->getPathIconDetails(), 'icon'); 271 + } 272 + 273 + public function getPathIconColor() { 274 + return idx($this->getPathIconDetails(), 'color'); 275 + } 276 + 277 + private function getPathIconDetails() { 265 278 $change_icons = array( 266 - DifferentialChangeType::TYPE_DELETE => 'fa-file-o', 279 + DifferentialChangeType::TYPE_DELETE => array( 280 + 'icon' => 'fa-times', 281 + 'color' => 'delete-color', 282 + ), 283 + DifferentialChangeType::TYPE_ADD => array( 284 + 'icon' => 'fa-plus', 285 + 'color' => 'create-color', 286 + ), 287 + DifferentialChangeType::TYPE_MOVE_AWAY => array( 288 + 'icon' => 'fa-circle-o', 289 + 'color' => 'grey', 290 + ), 291 + DifferentialChangeType::TYPE_MULTICOPY => array( 292 + 'icon' => 'fa-circle-o', 293 + 'color' => 'grey', 294 + ), 295 + DifferentialChangeType::TYPE_MOVE_HERE => array( 296 + 'icon' => 'fa-plus-circle', 297 + 'color' => 'create-color', 298 + ), 299 + DifferentialChangeType::TYPE_COPY_HERE => array( 300 + 'icon' => 'fa-plus-circle', 301 + 'color' => 'create-color', 302 + ), 267 303 ); 268 304 305 + $change_type = $this->getChangeType(); 269 306 if (isset($change_icons[$change_type])) { 270 - $icon = $change_icons[$change_type]; 271 - } else { 272 - $icon = DifferentialChangeType::getIconForFileType($file_type); 307 + return $change_icons[$change_type]; 273 308 } 274 309 275 - $change_colors = array( 276 - DifferentialChangeType::TYPE_ADD => 'green', 277 - DifferentialChangeType::TYPE_DELETE => 'red', 278 - DifferentialChangeType::TYPE_MOVE_AWAY => 'orange', 279 - DifferentialChangeType::TYPE_MOVE_HERE => 'orange', 280 - DifferentialChangeType::TYPE_COPY_HERE => 'orange', 281 - DifferentialChangeType::TYPE_MULTICOPY => 'orange', 282 - ); 310 + if ($this->isGeneratedChangeset()) { 311 + return array( 312 + 'icon' => 'fa-cogs', 313 + 'color' => 'grey', 314 + ); 315 + } 283 316 284 - $color = idx($change_colors, $change_type, 'bluetext'); 317 + $file_type = $this->getFileType(); 318 + $icon = DifferentialChangeType::getIconForFileType($file_type); 285 319 286 - return id(new PHUIIconView()) 287 - ->setIcon($icon.' '.$color); 288 - } 289 - 290 - public function getFileTreeClass() { 291 - switch ($this->getChangeType()) { 292 - case DifferentialChangeType::TYPE_ADD: 293 - return 'filetree-added'; 294 - case DifferentialChangeType::TYPE_DELETE: 295 - return 'filetree-deleted'; 296 - case DifferentialChangeType::TYPE_MOVE_AWAY: 297 - case DifferentialChangeType::TYPE_MOVE_HERE: 298 - case DifferentialChangeType::TYPE_COPY_HERE: 299 - case DifferentialChangeType::TYPE_MULTICOPY: 300 - return 'filetree-movecopy'; 301 - } 302 - 303 - return null; 320 + return array( 321 + 'icon' => $icon, 322 + 'color' => 'bluetext', 323 + ); 304 324 } 305 325 306 326 public function setChangesetMetadata($key, $value) {
+3
src/applications/differential/view/DifferentialChangesetDetailView.php
··· 195 195 'icon' => $display_icon, 196 196 'pathParts' => $path_parts, 197 197 198 + 'pathIconIcon' => $changeset->getPathIconIcon(), 199 + 'pathIconColor' => $changeset->getPathIconColor(), 200 + 198 201 'editorURI' => $this->getEditorURI(), 199 202 'editorConfigureURI' => $this->getEditorConfigureURI(), 200 203
+10
webroot/rsrc/css/font/phui-font-icon-base.css
··· 116 116 .phui-icon-view.red { 117 117 color: {$red}; 118 118 } 119 + 120 + .phui-icon-view.delete-color { 121 + color: {$delete-color}; 122 + } 123 + 119 124 .phui-icon-view.orange { 120 125 color: {$orange}; 121 126 } ··· 125 130 .phui-icon-view.green { 126 131 color: {$green} 127 132 } 133 + 134 + .phui-icon-view.create-color { 135 + color: {$create-color}; 136 + } 137 + 128 138 .phui-icon-view.blue { 129 139 color: {$blue}; 130 140 }
+8 -1
webroot/rsrc/js/application/diff/DiffChangeset.js
··· 35 35 this._editorURI = data.editorURI; 36 36 this._editorConfigureURI = data.editorConfigureURI; 37 37 38 + this._pathIconIcon = data.pathIconIcon; 39 + this._pathIconColor = data.pathIconColor; 40 + 38 41 this._inlines = []; 39 42 40 43 if (data.changesetState) { ··· 71 74 _editorURI: null, 72 75 _editorConfigureURI: null, 73 76 _pathView: null, 77 + 78 + _pathIconIcon: null, 79 + _pathIconColor: null, 74 80 75 81 getEditorURI: function() { 76 82 return this._editorURI; ··· 897 903 .setPath(this._pathParts); 898 904 899 905 view.getIcon() 900 - .setIcon(this.getIcon()); 906 + .setIcon(this._pathIconIcon) 907 + .setColor(this._pathIconColor); 901 908 902 909 this._pathView = view; 903 910 }