Skip to content

Commit 36e53fd

Browse files
author
Chad Little
committedJan 13, 2017
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
1 parent 7276af6 commit 36e53fd

File tree

7 files changed

+15
-306
lines changed

7 files changed

+15
-306
lines changed
 

‎resources/celerity/map.php

+5-12
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'names' => array(
1010
'conpherence.pkg.css' => '0b64e988',
1111
'conpherence.pkg.js' => '6249a1cf',
12-
'core.pkg.css' => '9c725fa0',
12+
'core.pkg.css' => '1afa1d13',
1313
'core.pkg.js' => 'a2ead3fe',
1414
'darkconsole.pkg.js' => 'e7393ebb',
1515
'differential.pkg.css' => '9535a7e6',
@@ -162,7 +162,7 @@
162162
'rsrc/css/phui/phui-object-box.css' => '6b487c57',
163163
'rsrc/css/phui/phui-pager.css' => 'bea33d23',
164164
'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',
166166
'rsrc/css/phui/phui-property-list-view.css' => '6d8e58ac',
167167
'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591',
168168
'rsrc/css/phui/phui-segment-bar-view.css' => '46342871',
@@ -172,7 +172,7 @@
172172
'rsrc/css/phui/phui-timeline-view.css' => 'bc523970',
173173
'rsrc/css/phui/phui-two-column-view.css' => '7babf5b9',
174174
'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',
176176
'rsrc/css/phui/workboards/phui-workcard.css' => '00979e40',
177177
'rsrc/css/phui/workboards/phui-workpanel.css' => 'a3a63478',
178178
'rsrc/css/sprite-login.css' => '587d92d7',
@@ -535,7 +535,6 @@
535535
'rsrc/js/core/phtize.js' => 'd254d646',
536536
'rsrc/js/phui/behavior-phui-dropdown-menu.js' => '1aa4c968',
537537
'rsrc/js/phui/behavior-phui-file-upload.js' => 'b003d4fb',
538-
'rsrc/js/phui/behavior-phui-profile-menu.js' => '12884df9',
539538
'rsrc/js/phui/behavior-phui-submenu.js' => 'a6f7a73b',
540539
'rsrc/js/phui/behavior-phui-tab-group.js' => '0a0b10e9',
541540
'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8',
@@ -690,7 +689,6 @@
690689
'javelin-behavior-phui-dropdown-menu' => '1aa4c968',
691690
'javelin-behavior-phui-file-upload' => 'b003d4fb',
692691
'javelin-behavior-phui-hovercards' => 'bcaccd64',
693-
'javelin-behavior-phui-profile-menu' => '12884df9',
694692
'javelin-behavior-phui-submenu' => 'a6f7a73b',
695693
'javelin-behavior-phui-tab-group' => '0a0b10e9',
696694
'javelin-behavior-policy-control' => 'd0c516d5',
@@ -883,7 +881,7 @@
883881
'phui-oi-simple-ui-css' => 'a8beebea',
884882
'phui-pager-css' => 'bea33d23',
885883
'phui-pinboard-view-css' => '2495140e',
886-
'phui-profile-menu-css' => '4768721a',
884+
'phui-profile-menu-css' => 'c71ecdcd',
887885
'phui-property-list-view-css' => '6d8e58ac',
888886
'phui-remarkup-preview-css' => '1a8f2591',
889887
'phui-segment-bar-view-css' => '46342871',
@@ -894,7 +892,7 @@
894892
'phui-timeline-view-css' => 'bc523970',
895893
'phui-two-column-view-css' => '7babf5b9',
896894
'phui-workboard-color-css' => 'b60ef38a',
897-
'phui-workboard-view-css' => '16441d5e',
895+
'phui-workboard-view-css' => 'c88912ee',
898896
'phui-workcard-view-css' => '00979e40',
899897
'phui-workpanel-view-css' => 'a3a63478',
900898
'phuix-action-list-view' => 'b5c256b8',
@@ -1030,11 +1028,6 @@
10301028
'javelin-dom',
10311029
'javelin-typeahead-normalizer',
10321030
),
1033-
'12884df9' => array(
1034-
'javelin-behavior',
1035-
'javelin-stratcom',
1036-
'javelin-dom',
1037-
),
10381031
'13c739ea' => array(
10391032
'javelin-behavior',
10401033
'javelin-stratcom',

‎src/__phutil_library_map__.php

-2
Original file line numberDiff line numberDiff line change
@@ -3422,7 +3422,6 @@
34223422
'PhabricatorPolicyTestObject' => 'applications/policy/__tests__/PhabricatorPolicyTestObject.php',
34233423
'PhabricatorPolicyType' => 'applications/policy/constants/PhabricatorPolicyType.php',
34243424
'PhabricatorPonderApplication' => 'applications/ponder/application/PhabricatorPonderApplication.php',
3425-
'PhabricatorProfileMenuCollapsedSetting' => 'applications/settings/setting/PhabricatorProfileMenuCollapsedSetting.php',
34263425
'PhabricatorProfileMenuEditEngine' => 'applications/search/editor/PhabricatorProfileMenuEditEngine.php',
34273426
'PhabricatorProfileMenuEditor' => 'applications/search/editor/PhabricatorProfileMenuEditor.php',
34283427
'PhabricatorProfileMenuEngine' => 'applications/search/engine/PhabricatorProfileMenuEngine.php',
@@ -8575,7 +8574,6 @@
85758574
),
85768575
'PhabricatorPolicyType' => 'PhabricatorPolicyConstants',
85778576
'PhabricatorPonderApplication' => 'PhabricatorApplication',
8578-
'PhabricatorProfileMenuCollapsedSetting' => 'PhabricatorInternalSetting',
85798577
'PhabricatorProfileMenuEditEngine' => 'PhabricatorEditEngine',
85808578
'PhabricatorProfileMenuEditor' => 'PhabricatorApplicationTransactionEditor',
85818579
'PhabricatorProfileMenuEngine' => 'Phobject',

‎src/applications/search/engine/PhabricatorProfileMenuEngine.php

-72
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,6 @@ public function buildNavigation() {
239239
}
240240
}
241241

242-
$more_items = $this->newAutomaticMenuItems($nav);
243-
foreach ($more_items as $item) {
244-
$nav->addMenuItem($item);
245-
}
246-
247242
$nav->selectFilter(null);
248243

249244
$this->navigation = $nav;
@@ -410,73 +405,6 @@ private function validateNavigationMenuItem($item) {
410405
}
411406
}
412407

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-
}
479-
480408
public function getConfigureURI() {
481409
return $this->getItemURI('configure/');
482410
}

‎src/applications/settings/setting/PhabricatorProfileMenuCollapsedSetting.php

-12
This file was deleted.

0 commit comments

Comments
 (0)
Failed to load comments.