@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 collapsable option from ProfileMenu

Summary: Never really used this to full potential and takes up a lot of code and space. Remove option for now and make all profile nav menus small by default.

Test Plan: Review user, project, workboard. Set new menus.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T5867

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

+15 -306
+5 -12
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => '0b64e988', 11 11 'conpherence.pkg.js' => '6249a1cf', 12 - 'core.pkg.css' => '9c725fa0', 12 + 'core.pkg.css' => '1afa1d13', 13 13 'core.pkg.js' => 'a2ead3fe', 14 14 'darkconsole.pkg.js' => 'e7393ebb', 15 15 'differential.pkg.css' => '9535a7e6', ··· 162 162 'rsrc/css/phui/phui-object-box.css' => '6b487c57', 163 163 'rsrc/css/phui/phui-pager.css' => 'bea33d23', 164 164 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', 165 - 'rsrc/css/phui/phui-profile-menu.css' => '4768721a', 165 + 'rsrc/css/phui/phui-profile-menu.css' => 'c71ecdcd', 166 166 'rsrc/css/phui/phui-property-list-view.css' => '6d8e58ac', 167 167 'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591', 168 168 'rsrc/css/phui/phui-segment-bar-view.css' => '46342871', ··· 172 172 'rsrc/css/phui/phui-timeline-view.css' => 'bc523970', 173 173 'rsrc/css/phui/phui-two-column-view.css' => '7babf5b9', 174 174 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'b60ef38a', 175 - 'rsrc/css/phui/workboards/phui-workboard.css' => '16441d5e', 175 + 'rsrc/css/phui/workboards/phui-workboard.css' => 'c88912ee', 176 176 'rsrc/css/phui/workboards/phui-workcard.css' => '00979e40', 177 177 'rsrc/css/phui/workboards/phui-workpanel.css' => 'a3a63478', 178 178 'rsrc/css/sprite-login.css' => '587d92d7', ··· 535 535 'rsrc/js/core/phtize.js' => 'd254d646', 536 536 'rsrc/js/phui/behavior-phui-dropdown-menu.js' => '1aa4c968', 537 537 'rsrc/js/phui/behavior-phui-file-upload.js' => 'b003d4fb', 538 - 'rsrc/js/phui/behavior-phui-profile-menu.js' => '12884df9', 539 538 'rsrc/js/phui/behavior-phui-submenu.js' => 'a6f7a73b', 540 539 'rsrc/js/phui/behavior-phui-tab-group.js' => '0a0b10e9', 541 540 'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8', ··· 690 689 'javelin-behavior-phui-dropdown-menu' => '1aa4c968', 691 690 'javelin-behavior-phui-file-upload' => 'b003d4fb', 692 691 'javelin-behavior-phui-hovercards' => 'bcaccd64', 693 - 'javelin-behavior-phui-profile-menu' => '12884df9', 694 692 'javelin-behavior-phui-submenu' => 'a6f7a73b', 695 693 'javelin-behavior-phui-tab-group' => '0a0b10e9', 696 694 'javelin-behavior-policy-control' => 'd0c516d5', ··· 883 881 'phui-oi-simple-ui-css' => 'a8beebea', 884 882 'phui-pager-css' => 'bea33d23', 885 883 'phui-pinboard-view-css' => '2495140e', 886 - 'phui-profile-menu-css' => '4768721a', 884 + 'phui-profile-menu-css' => 'c71ecdcd', 887 885 'phui-property-list-view-css' => '6d8e58ac', 888 886 'phui-remarkup-preview-css' => '1a8f2591', 889 887 'phui-segment-bar-view-css' => '46342871', ··· 894 892 'phui-timeline-view-css' => 'bc523970', 895 893 'phui-two-column-view-css' => '7babf5b9', 896 894 'phui-workboard-color-css' => 'b60ef38a', 897 - 'phui-workboard-view-css' => '16441d5e', 895 + 'phui-workboard-view-css' => 'c88912ee', 898 896 'phui-workcard-view-css' => '00979e40', 899 897 'phui-workpanel-view-css' => 'a3a63478', 900 898 'phuix-action-list-view' => 'b5c256b8', ··· 1029 1027 'javelin-util', 1030 1028 'javelin-dom', 1031 1029 'javelin-typeahead-normalizer', 1032 - ), 1033 - '12884df9' => array( 1034 - 'javelin-behavior', 1035 - 'javelin-stratcom', 1036 - 'javelin-dom', 1037 1030 ), 1038 1031 '13c739ea' => array( 1039 1032 'javelin-behavior',
-2
src/__phutil_library_map__.php
··· 3422 3422 'PhabricatorPolicyTestObject' => 'applications/policy/__tests__/PhabricatorPolicyTestObject.php', 3423 3423 'PhabricatorPolicyType' => 'applications/policy/constants/PhabricatorPolicyType.php', 3424 3424 'PhabricatorPonderApplication' => 'applications/ponder/application/PhabricatorPonderApplication.php', 3425 - 'PhabricatorProfileMenuCollapsedSetting' => 'applications/settings/setting/PhabricatorProfileMenuCollapsedSetting.php', 3426 3425 'PhabricatorProfileMenuEditEngine' => 'applications/search/editor/PhabricatorProfileMenuEditEngine.php', 3427 3426 'PhabricatorProfileMenuEditor' => 'applications/search/editor/PhabricatorProfileMenuEditor.php', 3428 3427 'PhabricatorProfileMenuEngine' => 'applications/search/engine/PhabricatorProfileMenuEngine.php', ··· 8575 8574 ), 8576 8575 'PhabricatorPolicyType' => 'PhabricatorPolicyConstants', 8577 8576 'PhabricatorPonderApplication' => 'PhabricatorApplication', 8578 - 'PhabricatorProfileMenuCollapsedSetting' => 'PhabricatorInternalSetting', 8579 8577 'PhabricatorProfileMenuEditEngine' => 'PhabricatorEditEngine', 8580 8578 'PhabricatorProfileMenuEditor' => 'PhabricatorApplicationTransactionEditor', 8581 8579 'PhabricatorProfileMenuEngine' => 'Phobject',
-72
src/applications/search/engine/PhabricatorProfileMenuEngine.php
··· 239 239 } 240 240 } 241 241 242 - $more_items = $this->newAutomaticMenuItems($nav); 243 - foreach ($more_items as $item) { 244 - $nav->addMenuItem($item); 245 - } 246 - 247 242 $nav->selectFilter(null); 248 243 249 244 $this->navigation = $nav; ··· 408 403 'Expected buildNavigationMenuItems() to return a list of '. 409 404 'PHUIListItemView objects, but got a surprise.')); 410 405 } 411 - } 412 - 413 - private function newAutomaticMenuItems(AphrontSideNavFilterView $nav) { 414 - $items = array(); 415 - 416 - // NOTE: We're adding a spacer item for the fixed footer, so that if the 417 - // menu taller than the page content you can still scroll down the page far 418 - // enough to access the last item without the content being obscured by the 419 - // fixed items. 420 - $items[] = id(new PHUIListItemView()) 421 - ->setHideInApplicationMenu(true) 422 - ->addClass('phui-profile-menu-spacer'); 423 - 424 - $collapse_id = celerity_generate_unique_node_id(); 425 - $viewer = $this->getViewer(); 426 - $collapse_key = PhabricatorProfileMenuCollapsedSetting::SETTINGKEY; 427 - 428 - $is_collapsed = $viewer->getUserSetting($collapse_key); 429 - 430 - if ($is_collapsed) { 431 - $nav->addClass('phui-profile-menu-collapsed'); 432 - } else { 433 - $nav->addClass('phui-profile-menu-expanded'); 434 - } 435 - 436 - if ($viewer->isLoggedIn()) { 437 - $settings_uri = '/settings/adjust/?key='.$collapse_key; 438 - } else { 439 - $settings_uri = null; 440 - } 441 - 442 - Javelin::initBehavior( 443 - 'phui-profile-menu', 444 - array( 445 - 'menuID' => $nav->getMainID(), 446 - 'collapseID' => $collapse_id, 447 - 'isCollapsed' => (bool)$is_collapsed, 448 - 'settingsURI' => $settings_uri, 449 - )); 450 - 451 - $collapse_icon = id(new PHUIIconCircleView()) 452 - ->addClass('phui-list-item-icon') 453 - ->addClass('phui-profile-menu-visible-when-expanded') 454 - ->setIcon('fa-chevron-left'); 455 - 456 - $expand_icon = id(new PHUIIconCircleView()) 457 - ->addClass('phui-list-item-icon') 458 - ->addClass('phui-profile-menu-visible-when-collapsed') 459 - ->addSigil('has-tooltip') 460 - ->setMetadata( 461 - array( 462 - 'tip' => pht('Expand'), 463 - 'align' => 'E', 464 - )) 465 - ->setIcon('fa-chevron-right'); 466 - 467 - $items[] = id(new PHUIListItemView()) 468 - ->setName('Collapse') 469 - ->addIcon($collapse_icon) 470 - ->addIcon($expand_icon) 471 - ->setID($collapse_id) 472 - ->addClass('phui-profile-menu-footer') 473 - ->addClass('phui-profile-menu-footer-1') 474 - ->setHideInApplicationMenu(true) 475 - ->setHref('#'); 476 - 477 - return $items; 478 406 } 479 407 480 408 public function getConfigureURI() {
-12
src/applications/settings/setting/PhabricatorProfileMenuCollapsedSetting.php
··· 1 - <?php 2 - 3 - final class PhabricatorProfileMenuCollapsedSetting 4 - extends PhabricatorInternalSetting { 5 - 6 - const SETTINGKEY = 'profile-menu.collapsed'; 7 - 8 - public function getSettingName() { 9 - return pht('Profile Menu Collapsed'); 10 - } 11 - 12 - }
+10 -150
webroot/rsrc/css/phui/phui-profile-menu.css
··· 2 2 * @provides phui-profile-menu-css 3 3 */ 4 4 5 - .device-desktop .phui-profile-menu-collapsed .phabricator-nav-local { 5 + .device-desktop .phui-profile-menu .phabricator-nav-local { 6 6 width: {$menu.profile.width.collapsed}; 7 7 max-width: {$menu.profile.width.collapsed}; 8 8 } ··· 58 58 background-size: 100%; 59 59 } 60 60 61 - .phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu 62 - .phui-list-item-href { 61 + .phui-profile-menu .phabricator-side-menu .phui-list-item-href { 63 62 text-align: center; 64 63 padding: 42px 4px 14px; 65 64 line-height: 14px; ··· 67 66 font-size: {$smallerfontsize}; 68 67 } 69 68 70 - .phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu 71 - .phui-list-item-name { 69 + .phui-profile-menu .phabricator-side-menu .phui-list-item-name { 72 70 display: block; 73 71 overflow: hidden; 74 72 text-overflow: ellipsis; 75 73 } 76 74 77 - .phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu 78 - .phui-list-item-icon, 79 - .phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu 80 - .phui-list-item-href .phui-list-item-icon { 81 - top: 14px; 82 - left: 32px; 75 + .phui-profile-menu .phabricator-side-menu .phui-list-item-icon, 76 + .phui-profile-menu .phabricator-side-menu .phui-list-item-href 77 + .phui-list-item-icon { 78 + top: 14px; 79 + left: 32px; 83 80 } 84 81 85 82 .phui-profile-menu .phabricator-side-menu ··· 131 128 padding: 16px; 132 129 } 133 130 134 - .phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu 135 - .phui-profile-menu-error { 131 + .phui-profile-menu .phabricator-side-menu .phui-profile-menu-error { 136 132 padding: 16px 8px; 137 133 overflow: hidden; 138 134 text-overflow: ellipsis; 139 135 } 140 - 141 136 142 137 .phui-profile-menu .phabricator-side-menu .phui-list-item-disabled 143 138 .phui-list-item-href, ··· 153 148 padding: 8px 12px 16px; 154 149 } 155 150 156 - .phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu 157 - .phui-profile-segment-bar { 151 + .phui-profile-menu .phabricator-side-menu .phui-profile-segment-bar { 158 152 padding: 8px 8px 16px; 159 153 } 160 - 161 154 162 155 .phui-profile-menu .phabricator-side-menu .phui-profile-menu-spacer { 163 156 box-sizing: border-box; 164 157 height: {$menu.profile.item.height}; 165 - } 166 - 167 - .phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu 168 - .phui-profile-menu-footer 169 - .phui-list-item-name { 170 - display: none; 171 - } 172 - 173 - .phui-profile-menu .phui-profile-menu-expanded 174 - .phui-profile-menu-visible-when-collapsed, 175 - .phui-profile-menu .phui-profile-menu-collapsed 176 - .phui-profile-menu-visible-when-expanded { 177 - display: none; 178 - } 179 - 180 - 181 - .phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu 182 - .phui-profile-menu-footer .phui-list-item-href { 183 - padding: 20px 0 24px; 184 - } 185 - 186 - .phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer 187 - .phui-list-item-href:hover { 188 - background: transparent; 189 - } 190 - 191 - .phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu 192 - .phui-profile-menu-footer .phui-list-item-href .phui-list-item-icon { 193 - top: 8px; 194 - } 195 - 196 - .phui-profile-menu .phui-profile-menu-footer .phui-icon-circle { 197 - border-color: {$darkbluetext}; 198 - } 199 - 200 - .phui-profile-menu .phui-profile-menu-footer .phui-icon-circle .phui-icon-view { 201 - color: {$darkbluetext}; 202 - } 203 - 204 - .phui-profile-menu .phui-profile-menu-footer 205 - .phui-icon-circle.phui-list-item-icon { 206 - font-size: 12px; 207 - } 208 - 209 - .phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer-1 { 210 - bottom: 0; 211 - position: fixed; 212 - } 213 - 214 - .phui-profile-menu .phui-profile-menu-footer-1 { 215 - width: {$menu.profile.width}; 216 - } 217 - 218 - .phui-profile-menu .phui-profile-menu-collapsed .phui-profile-menu-footer-1 { 219 - width: {$menu.profile.width.collapsed}; 220 - } 221 - 222 - .phui-profile-menu .phabricator-side-menu 223 - .phui-list-item-selected.phui-profile-menu-footer .phui-list-item-href { 224 - background: transparent; 225 - } 226 - 227 - .phui-profile-menu .phui-profile-menu-collapsing 228 - .phabricator-nav-local { 229 - animation: profile-menu-collapse 0.2s; 230 - } 231 - 232 - .phui-profile-menu .phui-profile-menu-expanding 233 - .phabricator-nav-local { 234 - animation: profile-menu-expand 0.2s; 235 - } 236 - 237 - .phui-profile-menu .phui-profile-menu-collapsing 238 - .phabricator-side-menu .phui-list-item-href { 239 - animation: profile-menu-blink 0.2s; 240 - } 241 - 242 - .phui-profile-menu .phui-profile-menu-expanding 243 - .phabricator-side-menu .phui-list-item-href { 244 - animation: profile-menu-blink 0.2s; 245 - } 246 - 247 - @keyframes profile-menu-blink { 248 - 0% { 249 - opacity: 1.0; 250 - } 251 - 25% { 252 - opacity: 0.0; 253 - } 254 - 75% { 255 - opacity: 0.0; 256 - } 257 - 100% { 258 - opacity: 1.0; 259 - } 260 - } 261 - 262 - @keyframes profile-menu-collapse { 263 - 0% { 264 - width: {$menu.profile.width}; 265 - max-width: {$menu.profile.width}; 266 - } 267 - 33% { 268 - width: {$menu.profile.width}; 269 - max-width: {$menu.profile.width}; 270 - } 271 - 66% { 272 - width: {$menu.profile.width.collapsed}; 273 - max-width: {$menu.profile.width.collapsed}; 274 - } 275 - 100% { 276 - width: {$menu.profile.width.collapsed}; 277 - max-width: {$menu.profile.width.collapsed}; 278 - } 279 - } 280 - 281 - @keyframes profile-menu-expand { 282 - 0% { 283 - width: {$menu.profile.width.collapsed}; 284 - max-width: {$menu.profile.width.collapsed}; 285 - } 286 - 33% { 287 - width: {$menu.profile.width.collapsed}; 288 - max-width: {$menu.profile.width.collapsed}; 289 - } 290 - 66% { 291 - width: {$menu.profile.width}; 292 - max-width: {$menu.profile.width}; 293 - } 294 - 100% { 295 - width: {$menu.profile.width}; 296 - max-width: {$menu.profile.width}; 297 - } 298 158 } 299 159 300 160 !print .phui-profile-menu .phabricator-side-menu {
-5
webroot/rsrc/css/phui/workboards/phui-workboard.css
··· 32 32 } 33 33 34 34 .device-desktop .project-board-wrapper .phui-workboard-view-shadow { 35 - left: {$menu.profile.width}; 36 - } 37 - 38 - .device-desktop .phui-profile-menu-collapsed .project-board-wrapper 39 - .phui-workboard-view-shadow { 40 35 left: {$menu.profile.width.collapsed}; 41 36 } 42 37
-53
webroot/rsrc/js/phui/behavior-phui-profile-menu.js
··· 1 - /** 2 - * @provides javelin-behavior-phui-profile-menu 3 - * @requires javelin-behavior 4 - * javelin-stratcom 5 - * javelin-dom 6 - */ 7 - 8 - JX.behavior('phui-profile-menu', function(config) { 9 - // NOTE: This behavior is not initialized in the rendering pipeline for the 10 - // menu, so it can get initialized when we build but do not render a menu 11 - // (for example, when a page like the panel edit page only has items in 12 - // the mobile/application menu, and does not show the profile menu). For now, 13 - // just bail if we can't find the menu. 14 - 15 - try { 16 - var menu_node = JX.$(config.menuID); 17 - } catch (ex) { 18 - return; 19 - } 20 - 21 - var collapse_node = JX.$(config.collapseID); 22 - 23 - var is_collapsed = config.isCollapsed; 24 - 25 - JX.DOM.listen(collapse_node, 'click', null, function(e) { 26 - is_collapsed = !is_collapsed; 27 - 28 - JX.DOM.alterClass(menu_node, 'phui-profile-menu-collapsing', is_collapsed); 29 - JX.DOM.alterClass(menu_node, 'phui-profile-menu-expanding', !is_collapsed); 30 - 31 - var duration = 0.2; 32 - 33 - setTimeout(function() { 34 - JX.DOM.alterClass(menu_node, 'phui-profile-menu-collapsed', is_collapsed); 35 - JX.DOM.alterClass(menu_node, 'phui-profile-menu-expanded', !is_collapsed); 36 - }, (duration / 2) * 1000); 37 - 38 - setTimeout(function() { 39 - JX.DOM.alterClass(menu_node, 'phui-profile-menu-collapsing', false); 40 - JX.DOM.alterClass(menu_node, 'phui-profile-menu-expanding', false); 41 - }, duration * 1000); 42 - 43 - 44 - if (config.settingsURI) { 45 - new JX.Request(config.settingsURI) 46 - .setData({value: (is_collapsed ? 1 : 0)}) 47 - .send(); 48 - } 49 - 50 - e.kill(); 51 - }); 52 - 53 - });