diff --git a/resources/celerity/map.php b/resources/celerity/map.php index bfce26963d..069bf17019 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,8 +9,8 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'e25569a9', 'conpherence.pkg.js' => '6249a1cf', - 'core.pkg.css' => '7c235ec7', - 'core.pkg.js' => '2291d3b2', + 'core.pkg.css' => '25cda14d', + 'core.pkg.js' => 'f1e0e26f', 'darkconsole.pkg.js' => 'e7393ebb', 'differential.pkg.css' => '4815647b', 'differential.pkg.js' => 'ddfeb49b', @@ -29,15 +29,14 @@ return array( 'rsrc/css/aphront/phabricator-nav-view.css' => 'b29426e9', 'rsrc/css/aphront/table-view.css' => '213a5981', 'rsrc/css/aphront/tokenizer.css' => '9a8cb501', - 'rsrc/css/aphront/tooltip.css' => '1a07aea8', + 'rsrc/css/aphront/tooltip.css' => '3f325821', 'rsrc/css/aphront/typeahead-browse.css' => '8904346a', 'rsrc/css/aphront/typeahead.css' => 'd4f16145', 'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af', 'rsrc/css/application/auth/auth.css' => '0877ed6e', - 'rsrc/css/application/base/main-menu-view.css' => '8eac4166', + 'rsrc/css/application/base/main-menu-view.css' => '93519cb0', 'rsrc/css/application/base/notification-menu.css' => '6a697e43', - 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601', - 'rsrc/css/application/base/phui-theme.css' => '798c69b8', + 'rsrc/css/application/base/phui-theme.css' => '9f261c6b', 'rsrc/css/application/base/standard-page-view.css' => '894d8a25', 'rsrc/css/application/chatlog/chatlog.css' => 'd295b020', 'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4', @@ -102,7 +101,7 @@ return array( 'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', 'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd', 'rsrc/css/application/releeph/releeph-request-typeahead.css' => '667a48ae', - 'rsrc/css/application/search/application-search-view.css' => '8452c849', + 'rsrc/css/application/search/application-search-view.css' => '20ae9d85', 'rsrc/css/application/search/search-results.css' => '64ad079a', 'rsrc/css/application/slowvote/slowvote.css' => 'a94b7230', 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', @@ -119,7 +118,7 @@ return array( 'rsrc/css/layout/phabricator-filetree-view.css' => 'fccf9f82', 'rsrc/css/layout/phabricator-source-code-view.css' => '4383192f', 'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893', - 'rsrc/css/phui/calendar/phui-calendar-list.css' => 'fcc9fb41', + 'rsrc/css/phui/calendar/phui-calendar-list.css' => 'eb5c774b', 'rsrc/css/phui/calendar/phui-calendar-month.css' => '8e10e92c', 'rsrc/css/phui/calendar/phui-calendar.css' => '477acfaa', 'rsrc/css/phui/object-item/phui-oi-big-ui.css' => '19f9369b', @@ -131,9 +130,9 @@ return array( 'rsrc/css/phui/phui-action-list.css' => '5679229f', 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', 'rsrc/css/phui/phui-badge.css' => '3baef8db', - 'rsrc/css/phui/phui-basic-nav-view.css' => '7093573b', + 'rsrc/css/phui/phui-basic-nav-view.css' => 'cb4d5161', 'rsrc/css/phui/phui-big-info-view.css' => 'bd903741', - 'rsrc/css/phui/phui-box.css' => '33b629f8', + 'rsrc/css/phui/phui-box.css' => '269cbc99', 'rsrc/css/phui/phui-button.css' => '00ddac15', 'rsrc/css/phui/phui-chart.css' => '6bf6f78e', 'rsrc/css/phui/phui-cms.css' => 'be43c8a8', @@ -162,17 +161,16 @@ return array( 'rsrc/css/phui/phui-object-box.css' => '8b289e3d', 'rsrc/css/phui/phui-pager.css' => 'bea33d23', 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', - 'rsrc/css/phui/phui-profile-menu.css' => 'c71ecdcd', 'rsrc/css/phui/phui-property-list-view.css' => '6d8e58ac', 'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591', - 'rsrc/css/phui/phui-segment-bar-view.css' => '46342871', + 'rsrc/css/phui/phui-segment-bar-view.css' => 'b1d1b892', 'rsrc/css/phui/phui-spacing.css' => '042804d6', 'rsrc/css/phui/phui-status.css' => 'd5263e49', 'rsrc/css/phui/phui-tag-view.css' => '84d65f26', 'rsrc/css/phui/phui-timeline-view.css' => 'bc523970', 'rsrc/css/phui/phui-two-column-view.css' => 'f63cad3c', - 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'b60ef38a', - 'rsrc/css/phui/workboards/phui-workboard.css' => 'c88912ee', + 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'f0551a33', + 'rsrc/css/phui/workboards/phui-workboard.css' => '3bc85455', 'rsrc/css/phui/workboards/phui-workcard.css' => 'cca5fa92', 'rsrc/css/phui/workboards/phui-workpanel.css' => 'a3a63478', 'rsrc/css/sprite-login.css' => '587d92d7', @@ -488,7 +486,7 @@ return array( 'rsrc/js/core/ShapedRequest.js' => '7cbe244b', 'rsrc/js/core/TextAreaUtils.js' => '320810c8', 'rsrc/js/core/Title.js' => '485aaa6c', - 'rsrc/js/core/ToolTip.js' => 'b5c62c3b', + 'rsrc/js/core/ToolTip.js' => 'd02f7181', 'rsrc/js/core/behavior-active-nav.js' => 'e379b58e', 'rsrc/js/core/behavior-audio-source.js' => '59b251eb', 'rsrc/js/core/behavior-autofocus.js' => '7319e029', @@ -529,7 +527,7 @@ return array( 'rsrc/js/core/behavior-time-typeahead.js' => '522431f7', 'rsrc/js/core/behavior-toggle-class.js' => '92b9ec77', 'rsrc/js/core/behavior-tokenizer.js' => 'b3a4b884', - 'rsrc/js/core/behavior-tooltip.js' => '42fcb747', + 'rsrc/js/core/behavior-tooltip.js' => 'c420b0b9', 'rsrc/js/core/behavior-user-menu.js' => '31420f77', 'rsrc/js/core/behavior-watch-anchor.js' => '9f36c42d', 'rsrc/js/core/behavior-workflow.js' => '0a3f3021', @@ -555,9 +553,9 @@ return array( 'aphront-panel-view-css' => '8427b78d', 'aphront-table-view-css' => '213a5981', 'aphront-tokenizer-control-css' => '9a8cb501', - 'aphront-tooltip-css' => '1a07aea8', + 'aphront-tooltip-css' => '3f325821', 'aphront-typeahead-control-css' => 'd4f16145', - 'application-search-view-css' => '8452c849', + 'application-search-view-css' => '20ae9d85', 'auth-css' => '0877ed6e', 'bulk-job-css' => 'df9c1d4a', 'changeset-view-manager' => 'a2828756', @@ -681,7 +679,7 @@ return array( 'javelin-behavior-phabricator-reveal-content' => '60821bc7', 'javelin-behavior-phabricator-search-typeahead' => '06c32383', 'javelin-behavior-phabricator-show-older-transactions' => '94c65b72', - 'javelin-behavior-phabricator-tooltips' => '42fcb747', + 'javelin-behavior-phabricator-tooltips' => 'c420b0b9', 'javelin-behavior-phabricator-transaction-comment-form' => 'b23b49e6', 'javelin-behavior-phabricator-transaction-list' => '13c739ea', 'javelin-behavior-phabricator-watch-anchor' => '9f36c42d', @@ -781,7 +779,6 @@ return array( 'path-typeahead' => 'f7fc67ec', 'people-profile-css' => '2473d929', 'phabricator-action-list-view-css' => '5679229f', - 'phabricator-application-launch-view-css' => '95351601', 'phabricator-busy' => '59a7976a', 'phabricator-chatlog-css' => 'd295b020', 'phabricator-content-source-view-css' => '4b8b05d4', @@ -798,7 +795,7 @@ return array( 'phabricator-flag-css' => 'bba8f811', 'phabricator-keyboard-shortcut' => '1ae869f2', 'phabricator-keyboard-shortcut-manager' => '4a021c10', - 'phabricator-main-menu-view' => '8eac4166', + 'phabricator-main-menu-view' => '93519cb0', 'phabricator-nav-view-css' => 'b29426e9', 'phabricator-notification' => 'ccf1cbf8', 'phabricator-notification-css' => '3f6c89c9', @@ -814,7 +811,7 @@ return array( 'phabricator-standard-page-view' => '894d8a25', 'phabricator-textareautils' => '320810c8', 'phabricator-title' => '485aaa6c', - 'phabricator-tooltip' => 'b5c62c3b', + 'phabricator-tooltip' => 'd02f7181', 'phabricator-ui-example-css' => '528b19de', 'phabricator-uiexample-javelin-view' => 'd4a14807', 'phabricator-uiexample-reactor-button' => 'd19198c8', @@ -839,13 +836,13 @@ return array( 'phriction-document-css' => '4282e4ad', 'phui-action-panel-css' => '91c7b835', 'phui-badge-view-css' => '3baef8db', - 'phui-basic-nav-view-css' => '7093573b', + 'phui-basic-nav-view-css' => 'cb4d5161', 'phui-big-info-view-css' => 'bd903741', - 'phui-box-css' => '33b629f8', + 'phui-box-css' => '269cbc99', 'phui-button-css' => '00ddac15', 'phui-calendar-css' => '477acfaa', 'phui-calendar-day-css' => '572b1893', - 'phui-calendar-list-css' => 'fcc9fb41', + 'phui-calendar-list-css' => 'eb5c774b', 'phui-calendar-month-css' => '8e10e92c', 'phui-chart-css' => '6bf6f78e', 'phui-cms-css' => 'be43c8a8', @@ -883,18 +880,17 @@ return array( 'phui-oi-simple-ui-css' => 'a8beebea', 'phui-pager-css' => 'bea33d23', 'phui-pinboard-view-css' => '2495140e', - 'phui-profile-menu-css' => 'c71ecdcd', 'phui-property-list-view-css' => '6d8e58ac', 'phui-remarkup-preview-css' => '1a8f2591', - 'phui-segment-bar-view-css' => '46342871', + 'phui-segment-bar-view-css' => 'b1d1b892', 'phui-spacing-css' => '042804d6', 'phui-status-list-view-css' => 'd5263e49', 'phui-tag-view-css' => '84d65f26', - 'phui-theme-css' => '798c69b8', + 'phui-theme-css' => '9f261c6b', 'phui-timeline-view-css' => 'bc523970', 'phui-two-column-view-css' => 'f63cad3c', - 'phui-workboard-color-css' => 'b60ef38a', - 'phui-workboard-view-css' => 'c88912ee', + 'phui-workboard-color-css' => 'f0551a33', + 'phui-workboard-view-css' => '3bc85455', 'phui-workcard-view-css' => 'cca5fa92', 'phui-workpanel-view-css' => 'a3a63478', 'phuix-action-list-view' => 'b5c256b8', @@ -1178,12 +1174,6 @@ return array( 'javelin-dom', 'javelin-request', ), - '42fcb747' => array( - 'javelin-behavior', - 'javelin-behavior-device', - 'javelin-stratcom', - 'phabricator-tooltip', - ), '44959b73' => array( 'javelin-util', 'javelin-uri', @@ -1612,9 +1602,6 @@ return array( 'javelin-stratcom', 'javelin-util', ), - '8eac4166' => array( - 'phui-theme-css', - ), '8ff5e24c' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1636,6 +1623,9 @@ return array( 'javelin-stratcom', 'javelin-dom', ), + '93519cb0' => array( + 'phui-theme-css', + ), '93ae974f' => array( 'javelin-behavior', 'javelin-dom', @@ -1888,12 +1878,6 @@ return array( 'javelin-install', 'javelin-dom', ), - 'b5c62c3b' => array( - 'javelin-install', - 'javelin-util', - 'javelin-dom', - 'javelin-vector', - ), 'b5d57730' => array( 'javelin-install', 'javelin-stratcom', @@ -1969,6 +1953,12 @@ return array( 'javelin-install', 'javelin-dom', ), + 'c420b0b9' => array( + 'javelin-behavior', + 'javelin-behavior-device', + 'javelin-stratcom', + 'phabricator-tooltip', + ), 'c587b80f' => array( 'javelin-install', ), @@ -2026,6 +2016,12 @@ return array( 'cd2b9b77' => array( 'phui-oi-list-view-css', ), + 'd02f7181' => array( + 'javelin-install', + 'javelin-util', + 'javelin-dom', + 'javelin-vector', + ), 'd0c516d5' => array( 'javelin-behavior', 'javelin-dom', @@ -2318,8 +2314,6 @@ return array( 'phui-spacing-css', 'phui-form-css', 'phui-icon-view-css', - 'phui-profile-menu-css', - 'phabricator-application-launch-view-css', 'phabricator-action-list-view-css', 'phui-property-list-view-css', 'phui-tag-view-css', diff --git a/resources/celerity/packages.php b/resources/celerity/packages.php index 288bd69ed2..4822633426 100644 --- a/resources/celerity/packages.php +++ b/resources/celerity/packages.php @@ -130,9 +130,7 @@ return array( 'phui-spacing-css', 'phui-form-css', 'phui-icon-view-css', - 'phui-profile-menu-css', - 'phabricator-application-launch-view-css', 'phabricator-action-list-view-css', 'phui-property-list-view-css', 'phui-tag-view-css', diff --git a/resources/sql/autopatches/20170131.dashboard.personal.01.php b/resources/sql/autopatches/20170131.dashboard.personal.01.php new file mode 100644 index 0000000000..af62c017e8 --- /dev/null +++ b/resources/sql/autopatches/20170131.dashboard.personal.01.php @@ -0,0 +1,45 @@ +establishConnection('r'); +$table_name = 'dashboard_install'; + +$search_table = new PhabricatorProfileMenuItemConfiguration(); +$search_conn = $search_table->establishConnection('w'); +$search_table_name = 'search_profilepanelconfiguration'; + +$viewer = PhabricatorUser::getOmnipotentUser(); +$profile_phid = id(new PhabricatorHomeApplication())->getPHID(); +$menu_item_key = PhabricatorDashboardProfileMenuItem::MENUITEMKEY; + +foreach (new LiskRawMigrationIterator($conn, $table_name) as $install) { + + $dashboard_phid = $install['dashboardPHID']; + $new_phid = id(new PhabricatorProfileMenuItemConfiguration())->generatePHID(); + $menu_item_properties = json_encode( + array('dashboardPHID' => $dashboard_phid, 'name' => '')); + + $custom_phid = $install['objectPHID']; + if ($custom_phid == 'dashboard:default') { + $custom_phid = null; + } + + $menu_item_order = 0; + + queryfx( + $search_conn, + 'INSERT INTO %T (phid, profilePHID, menuItemKey, menuItemProperties, '. + 'visibility, dateCreated, dateModified, menuItemOrder, customPHID) VALUES '. + '(%s, %s, %s, %s, %s, %d, %d, %d, %ns)', + $search_table_name, + $new_phid, + $profile_phid, + $menu_item_key, + $menu_item_properties, + 'visible', + PhabricatorTime::getNow(), + PhabricatorTime::getNow(), + $menu_item_order, + $custom_phid); + +} diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 6b510144e5..de2fa8e207 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1825,7 +1825,6 @@ phutil_register_library_map(array( 'PhabricatorApplicationEditController' => 'applications/meta/controller/PhabricatorApplicationEditController.php', 'PhabricatorApplicationEditHTTPParameterHelpView' => 'applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php', 'PhabricatorApplicationEmailCommandsController' => 'applications/meta/controller/PhabricatorApplicationEmailCommandsController.php', - 'PhabricatorApplicationLaunchView' => 'applications/meta/view/PhabricatorApplicationLaunchView.php', 'PhabricatorApplicationPanelController' => 'applications/meta/controller/PhabricatorApplicationPanelController.php', 'PhabricatorApplicationProfileMenuItem' => 'applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php', 'PhabricatorApplicationQuery' => 'applications/meta/query/PhabricatorApplicationQuery.php', @@ -2469,7 +2468,6 @@ phutil_register_library_map(array( 'PhabricatorDashboardEditController' => 'applications/dashboard/controller/PhabricatorDashboardEditController.php', 'PhabricatorDashboardIconSet' => 'applications/dashboard/icon/PhabricatorDashboardIconSet.php', 'PhabricatorDashboardInstall' => 'applications/dashboard/storage/PhabricatorDashboardInstall.php', - 'PhabricatorDashboardInstallController' => 'applications/dashboard/controller/PhabricatorDashboardInstallController.php', 'PhabricatorDashboardLayoutConfig' => 'applications/dashboard/layoutconfig/PhabricatorDashboardLayoutConfig.php', 'PhabricatorDashboardListController' => 'applications/dashboard/controller/PhabricatorDashboardListController.php', 'PhabricatorDashboardManageController' => 'applications/dashboard/controller/PhabricatorDashboardManageController.php', @@ -2837,12 +2835,13 @@ phutil_register_library_map(array( 'PhabricatorHomeApplication' => 'applications/home/application/PhabricatorHomeApplication.php', 'PhabricatorHomeConstants' => 'applications/home/constants/PhabricatorHomeConstants.php', 'PhabricatorHomeController' => 'applications/home/controller/PhabricatorHomeController.php', + 'PhabricatorHomeLauncherProfileMenuItem' => 'applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php', 'PhabricatorHomeMainController' => 'applications/home/controller/PhabricatorHomeMainController.php', 'PhabricatorHomeManageProfileMenuItem' => 'applications/home/menuitem/PhabricatorHomeManageProfileMenuItem.php', 'PhabricatorHomeMenuController' => 'applications/home/controller/PhabricatorHomeMenuController.php', 'PhabricatorHomeMenuItemController' => 'applications/home/controller/PhabricatorHomeMenuItemController.php', - 'PhabricatorHomePreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php', 'PhabricatorHomeProfileMenuEngine' => 'applications/home/engine/PhabricatorHomeProfileMenuEngine.php', + 'PhabricatorHomeProfileMenuItem' => 'applications/home/menuitem/PhabricatorHomeProfileMenuItem.php', 'PhabricatorHovercardEngineExtension' => 'applications/search/engineextension/PhabricatorHovercardEngineExtension.php', 'PhabricatorHovercardEngineExtensionModule' => 'applications/search/engineextension/PhabricatorHovercardEngineExtensionModule.php', 'PhabricatorIDsSearchEngineExtension' => 'applications/search/engineextension/PhabricatorIDsSearchEngineExtension.php', @@ -6711,7 +6710,6 @@ phutil_register_library_map(array( 'PhabricatorApplicationEditController' => 'PhabricatorApplicationsController', 'PhabricatorApplicationEditHTTPParameterHelpView' => 'AphrontView', 'PhabricatorApplicationEmailCommandsController' => 'PhabricatorApplicationsController', - 'PhabricatorApplicationLaunchView' => 'AphrontTagView', 'PhabricatorApplicationPanelController' => 'PhabricatorApplicationsController', 'PhabricatorApplicationProfileMenuItem' => 'PhabricatorProfileMenuItem', 'PhabricatorApplicationQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', @@ -7471,7 +7469,6 @@ phutil_register_library_map(array( 'PhabricatorDashboardEditController' => 'PhabricatorDashboardController', 'PhabricatorDashboardIconSet' => 'PhabricatorIconSet', 'PhabricatorDashboardInstall' => 'PhabricatorDashboardDAO', - 'PhabricatorDashboardInstallController' => 'PhabricatorDashboardController', 'PhabricatorDashboardLayoutConfig' => 'Phobject', 'PhabricatorDashboardListController' => 'PhabricatorDashboardController', 'PhabricatorDashboardManageController' => 'PhabricatorDashboardController', @@ -7893,12 +7890,13 @@ phutil_register_library_map(array( 'PhabricatorHomeApplication' => 'PhabricatorApplication', 'PhabricatorHomeConstants' => 'PhabricatorHomeController', 'PhabricatorHomeController' => 'PhabricatorController', + 'PhabricatorHomeLauncherProfileMenuItem' => 'PhabricatorProfileMenuItem', 'PhabricatorHomeMainController' => 'PhabricatorHomeController', 'PhabricatorHomeManageProfileMenuItem' => 'PhabricatorProfileMenuItem', 'PhabricatorHomeMenuController' => 'PhabricatorHomeController', 'PhabricatorHomeMenuItemController' => 'PhabricatorHomeController', - 'PhabricatorHomePreferencesSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorHomeProfileMenuEngine' => 'PhabricatorProfileMenuEngine', + 'PhabricatorHomeProfileMenuItem' => 'PhabricatorProfileMenuItem', 'PhabricatorHovercardEngineExtension' => 'Phobject', 'PhabricatorHovercardEngineExtensionModule' => 'PhabricatorConfigModule', 'PhabricatorIDsSearchEngineExtension' => 'PhabricatorSearchEngineExtension', diff --git a/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php b/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php index 2395ad9365..1171266c0c 100644 --- a/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php +++ b/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php @@ -209,10 +209,7 @@ final class CelerityDefaultPostprocessor 'menu.profile.icon.disabled' => 'rgba(255,255,255,.4)', 'menu.main.height' => '44px', - 'menu.profile.width' => '240px', - 'menu.profile.width.collapsed' => '88px', - 'menu.profile.item.height' => '46px', ); } diff --git a/src/applications/dashboard/application/PhabricatorDashboardApplication.php b/src/applications/dashboard/application/PhabricatorDashboardApplication.php index a79cf133a3..54ec5db20a 100644 --- a/src/applications/dashboard/application/PhabricatorDashboardApplication.php +++ b/src/applications/dashboard/application/PhabricatorDashboardApplication.php @@ -30,7 +30,6 @@ final class PhabricatorDashboardApplication extends PhabricatorApplication { 'create/' => 'PhabricatorDashboardEditController', 'copy/(?:(?P\d+)/)?' => 'PhabricatorDashboardCopyController', 'edit/(?:(?P\d+)/)?' => 'PhabricatorDashboardEditController', - 'install/(?P\d+)/' => 'PhabricatorDashboardInstallController', 'uninstall/(?P\d+)/' => 'PhabricatorDashboardUninstallController', 'addpanel/(?P\d+)/' => 'PhabricatorDashboardAddPanelController', 'movepanel/(?P\d+)/' => 'PhabricatorDashboardMovePanelController', diff --git a/src/applications/dashboard/controller/PhabricatorDashboardInstallController.php b/src/applications/dashboard/controller/PhabricatorDashboardInstallController.php deleted file mode 100644 index 504aacaac8..0000000000 --- a/src/applications/dashboard/controller/PhabricatorDashboardInstallController.php +++ /dev/null @@ -1,148 +0,0 @@ -getViewer(); - $this->id = $request->getURIData('id'); - - $dashboard = id(new PhabricatorDashboardQuery()) - ->setViewer($viewer) - ->withIDs(array($this->id)) - ->executeOne(); - if (!$dashboard) { - return new Aphront404Response(); - } - $dashboard_phid = $dashboard->getPHID(); - - $object_phid = $request->getStr('objectPHID', $viewer->getPHID()); - switch ($object_phid) { - case PhabricatorHomeApplication::DASHBOARD_DEFAULT: - if (!$viewer->getIsAdmin()) { - return new Aphront404Response(); - } - break; - default: - $object = id(new PhabricatorObjectQuery()) - ->setViewer($viewer) - ->requireCapabilities( - array( - PhabricatorPolicyCapability::CAN_VIEW, - PhabricatorPolicyCapability::CAN_EDIT, - )) - ->withPHIDs(array($object_phid)) - ->executeOne(); - if (!$object) { - return new Aphront404Response(); - } - break; - } - - $installer_phid = $viewer->getPHID(); - $application_class = $request->getStr( - 'applicationClass', - 'PhabricatorHomeApplication'); - - if ($request->isFormPost()) { - $dashboard_install = id(new PhabricatorDashboardInstall()) - ->loadOneWhere( - 'objectPHID = %s AND applicationClass = %s', - $object_phid, - $application_class); - if (!$dashboard_install) { - $dashboard_install = id(new PhabricatorDashboardInstall()) - ->setObjectPHID($object_phid) - ->setApplicationClass($application_class); - } - $dashboard_install - ->setInstallerPHID($installer_phid) - ->setDashboardPHID($dashboard_phid) - ->save(); - return id(new AphrontRedirectResponse()) - ->setURI($this->getRedirectURI($application_class, $object_phid)); - } - - $dialog = $this->newDialog() - ->setTitle(pht('Install Dashboard')) - ->addHiddenInput('objectPHID', $object_phid) - ->addCancelButton($this->getCancelURI($application_class, $object_phid)) - ->addSubmitButton(pht('Install Dashboard')); - - switch ($application_class) { - case 'PhabricatorHomeApplication': - if ($viewer->getPHID() == $object_phid) { - if ($viewer->getIsAdmin()) { - $dialog->setWidth(AphrontDialogView::WIDTH_FORM); - - $form = id(new AphrontFormView()) - ->setUser($viewer) - ->appendRemarkupInstructions( - pht('Choose where to install this dashboard.')) - ->appendChild( - id(new AphrontFormRadioButtonControl()) - ->setName('objectPHID') - ->setValue(PhabricatorHomeApplication::DASHBOARD_DEFAULT) - ->addButton( - PhabricatorHomeApplication::DASHBOARD_DEFAULT, - pht('Default Dashboard for All Users'), - pht( - 'Install this dashboard as the global default dashboard '. - 'for all users. Users can install a personal dashboard '. - 'to replace it. All users who have not configured '. - 'a personal dashboard will be affected by this change.')) - ->addButton( - $viewer->getPHID(), - pht('Personal Home Page Dashboard'), - pht( - 'Install this dashboard as your personal home page '. - 'dashboard. Only you will be affected by this change.'))); - - $dialog->appendChild($form->buildLayoutView()); - } else { - $dialog->appendParagraph( - pht('Install this dashboard on your home page?')); - } - } else { - $dialog->appendParagraph( - pht( - 'Install this dashboard as the home page dashboard for %s?', - phutil_tag( - 'strong', - array(), - $viewer->renderHandle($object_phid)))); - } - break; - default: - throw new Exception( - pht( - 'Unknown dashboard application class "%s"!', - $application_class)); - } - - return $dialog; - } - - private function getCancelURI($application_class, $object_phid) { - $uri = null; - switch ($application_class) { - case 'PhabricatorHomeApplication': - $uri = '/dashboard/view/'.$this->id.'/'; - break; - } - return $uri; - } - - private function getRedirectURI($application_class, $object_phid) { - $uri = null; - switch ($application_class) { - case 'PhabricatorHomeApplication': - $uri = '/'; - break; - } - return $uri; - } - -} diff --git a/src/applications/dashboard/controller/PhabricatorDashboardManageController.php b/src/applications/dashboard/controller/PhabricatorDashboardManageController.php index 9724db21f7..d5902ce93d 100644 --- a/src/applications/dashboard/controller/PhabricatorDashboardManageController.php +++ b/src/applications/dashboard/controller/PhabricatorDashboardManageController.php @@ -156,26 +156,6 @@ final class PhabricatorDashboardManageController ->setHref($this->getApplicationURI("copy/{$id}/")) ->setWorkflow(true)); - $installed_dashboard = id(new PhabricatorDashboardInstall()) - ->loadOneWhere( - 'objectPHID = %s AND applicationClass = %s', - $viewer->getPHID(), - 'PhabricatorHomeApplication'); - if ($installed_dashboard && - $installed_dashboard->getDashboardPHID() == $dashboard->getPHID()) { - $title_install = pht('Uninstall Dashboard'); - $href_install = "uninstall/{$id}/"; - } else { - $title_install = pht('Install Dashboard'); - $href_install = "install/{$id}/"; - } - $curtain->addAction( - id(new PhabricatorActionView()) - ->setName($title_install) - ->setIcon('fa-wrench') - ->setHref($this->getApplicationURI($href_install)) - ->setWorkflow(true)); - return $curtain; } diff --git a/src/applications/home/constants/PhabricatorHomeConstants.php b/src/applications/home/constants/PhabricatorHomeConstants.php index d1613acf58..965dfbda77 100644 --- a/src/applications/home/constants/PhabricatorHomeConstants.php +++ b/src/applications/home/constants/PhabricatorHomeConstants.php @@ -3,6 +3,7 @@ final class PhabricatorHomeConstants extends PhabricatorHomeController { + const ITEM_HOME = 'home.dashboard'; const ITEM_LAUNCHER = 'home.launcher'; const ITEM_MANAGE = 'home.manage.menu'; diff --git a/src/applications/home/controller/PhabricatorHomeController.php b/src/applications/home/controller/PhabricatorHomeController.php index 65a412faad..ffb27b3a2e 100644 --- a/src/applications/home/controller/PhabricatorHomeController.php +++ b/src/applications/home/controller/PhabricatorHomeController.php @@ -2,69 +2,48 @@ abstract class PhabricatorHomeController extends PhabricatorController { - public function buildNav() { - $user = $this->getRequest()->getUser(); + private $home; + private $profileMenu; - $nav = new AphrontSideNavFilterView(); - $nav->setBaseURI(new PhutilURI('/')); + public function buildApplicationMenu() { + $menu = $this->newApplicationMenu(); - $applications = id(new PhabricatorApplicationQuery()) - ->setViewer($user) - ->withInstalled(true) - ->withUnlisted(false) - ->withLaunchable(true) - ->execute(); - - $pinned = $user->getUserSetting( - PhabricatorPinnedApplicationsSetting::SETTINGKEY); - - // Force "Applications" to appear at the bottom. - $meta_app = 'PhabricatorApplicationsApplication'; - $pinned = array_fuse($pinned); - unset($pinned[$meta_app]); - $pinned[$meta_app] = $meta_app; - $applications[$meta_app] = PhabricatorApplication::getByClass($meta_app); - - $tiles = array(); - - $home_app = new PhabricatorHomeApplication(); - - $tiles[] = id(new PhabricatorApplicationLaunchView()) - ->setApplication($home_app) - ->addClass('phabricator-application-launch-phone-only') - ->setUser($user); - - foreach ($pinned as $pinned_application) { - if (empty($applications[$pinned_application])) { - continue; - } - - $application = $applications[$pinned_application]; - - $tile = id(new PhabricatorApplicationLaunchView()) - ->setApplication($application) - ->setUser($user); - - $tiles[] = $tile; + $profile_menu = $this->getProfileMenu(); + if ($profile_menu) { + $menu->setProfileMenu($profile_menu); } - $nav->addCustomBlock( - phutil_tag( - 'div', - array( - 'class' => 'application-tile-group', - ), - $tiles)); + return $menu; + } - $nav->addFilter( - '', - pht('Customize Menu...'), - '/settings/panel/home/'); + protected function getProfileMenu() { + if (!$this->profileMenu) { + $viewer = $this->getViewer(); + $applications = id(new PhabricatorApplicationQuery()) + ->setViewer($viewer) + ->withClasses(array('PhabricatorHomeApplication')) + ->withInstalled(true) + ->execute(); + $home = head($applications); + if (!$home) { + return null; + } - $nav->addClass('phabricator-side-menu-home'); - $nav->selectFilter(null); + $engine = id(new PhabricatorHomeProfileMenuEngine()) + ->setViewer($viewer) + ->setProfileObject($home); - return $nav; + if ($viewer->getPHID()) { + $engine->setCustomPHID($viewer->getPHID()) + ->setMenuType(PhabricatorProfileMenuEngine::MENU_COMBINED); + } else { + $engine->setMenuType(PhabricatorProfileMenuEngine::MENU_GLOBAL); + } + + $this->profileMenu = $engine->buildNavigation(); + } + + return $this->profileMenu; } } diff --git a/src/applications/home/controller/PhabricatorHomeMainController.php b/src/applications/home/controller/PhabricatorHomeMainController.php index 405959fe67..79687af51f 100644 --- a/src/applications/home/controller/PhabricatorHomeMainController.php +++ b/src/applications/home/controller/PhabricatorHomeMainController.php @@ -34,19 +34,17 @@ final class PhabricatorHomeMainController extends PhabricatorHomeController { $content = $this->buildMainResponse(); } - if (!$request->getURIData('only')) { - $nav = $this->buildNav(); - $nav->appendChild( - array( - $content, - id(new PhabricatorGlobalUploadTargetView())->setUser($viewer), - )); - $content = $nav; - } + $nav = $this->getProfileMenu(); + $content = + array( + $content, + id(new PhabricatorGlobalUploadTargetView())->setUser($viewer), + ); return $this->newPage() ->setTitle('Phabricator') ->addClass('phabricator-home') + ->setNavigation($nav) ->appendChild($content); } diff --git a/src/applications/home/controller/PhabricatorHomeMenuController.php b/src/applications/home/controller/PhabricatorHomeMenuController.php index 13c4750489..7e3ef8b14d 100644 --- a/src/applications/home/controller/PhabricatorHomeMenuController.php +++ b/src/applications/home/controller/PhabricatorHomeMenuController.php @@ -9,6 +9,11 @@ final class PhabricatorHomeMenuController extends PhabricatorHomeController { public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer(); + if (!$viewer->getIsAdmin()) { + $uri = '/home/menu/personal/item/configure/'; + return id(new AphrontRedirectResponse())->setURI($uri); + } + $menu = id(new PHUIObjectItemListView()) ->setUser($viewer); diff --git a/src/applications/home/controller/PhabricatorHomeMenuItemController.php b/src/applications/home/controller/PhabricatorHomeMenuItemController.php index 01f5233884..5649b947d6 100644 --- a/src/applications/home/controller/PhabricatorHomeMenuItemController.php +++ b/src/applications/home/controller/PhabricatorHomeMenuItemController.php @@ -24,8 +24,7 @@ final class PhabricatorHomeMenuItemController ->setProfileObject($home_app) ->setCustomPHID($custom_phid) ->setMenuType($menu) - ->setController($this) - ->setShowNavigation(false); + ->setController($this); return $engine->buildResponse(); } diff --git a/src/applications/home/engine/PhabricatorHomeProfileMenuEngine.php b/src/applications/home/engine/PhabricatorHomeProfileMenuEngine.php index 528edba697..c8c04947a8 100644 --- a/src/applications/home/engine/PhabricatorHomeProfileMenuEngine.php +++ b/src/applications/home/engine/PhabricatorHomeProfileMenuEngine.php @@ -30,6 +30,12 @@ final class PhabricatorHomeProfileMenuEngine ->withLaunchable(true) ->execute(); + // Default Home Dashboard + $items[] = $this->newItem() + ->setBuiltinKey(PhabricatorHomeConstants::ITEM_HOME) + ->setMenuItemKey( + PhabricatorHomeProfileMenuItem::MENUITEMKEY); + foreach ($applications as $application) { if (!$application->isPinnedByDefault($viewer)) { continue; @@ -46,6 +52,12 @@ final class PhabricatorHomeProfileMenuEngine ->setMenuItemProperties($properties); } + // Hotlink to More Applications Launcher... + $items[] = $this->newItem() + ->setBuiltinKey(PhabricatorHomeConstants::ITEM_LAUNCHER) + ->setMenuItemKey( + PhabricatorHomeLauncherProfileMenuItem::MENUITEMKEY); + // Single Manage Item, switches URI based on admin/user $items[] = $this->newItem() ->setBuiltinKey(PhabricatorHomeConstants::ITEM_MANAGE) diff --git a/src/applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php b/src/applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php new file mode 100644 index 0000000000..c4c93f06ff --- /dev/null +++ b/src/applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php @@ -0,0 +1,68 @@ +getMenuItemProperty('name'); + + if (strlen($name)) { + return $name; + } + + return $this->getDefaultName(); + } + + public function buildEditEngineFields( + PhabricatorProfileMenuItemConfiguration $config) { + return array( + id(new PhabricatorTextEditField()) + ->setKey('name') + ->setLabel(pht('Name')) + ->setPlaceholder($this->getDefaultName()) + ->setValue($config->getMenuItemProperty('name')), + ); + } + + protected function newNavigationMenuItems( + PhabricatorProfileMenuItemConfiguration $config) { + $viewer = $this->getViewer(); + + if ($viewer->isLoggedIn()) { + $name = $this->getDisplayName($config); + $icon = 'fa-globe'; + $href = '/applications/'; + + $item = $this->newItem() + ->setHref($href) + ->setName($name) + ->setIcon($icon); + } + + return array( + $item, + ); + } + +} diff --git a/src/applications/home/menuitem/PhabricatorHomeManageProfileMenuItem.php b/src/applications/home/menuitem/PhabricatorHomeManageProfileMenuItem.php index 514cd8e026..fbca14f527 100644 --- a/src/applications/home/menuitem/PhabricatorHomeManageProfileMenuItem.php +++ b/src/applications/home/menuitem/PhabricatorHomeManageProfileMenuItem.php @@ -10,7 +10,7 @@ final class PhabricatorHomeManageProfileMenuItem } private function getDefaultName() { - return pht('Manage'); + return pht('Edit Menu'); } public function canHideMenuItem( @@ -50,13 +50,9 @@ final class PhabricatorHomeManageProfileMenuItem $viewer = $this->getViewer(); if ($viewer->isLoggedIn()) { - $admin = $viewer->getIsAdmin(); $name = $this->getDisplayName($config); $icon = 'fa-pencil'; - $href = '/home/menu/personal/item/configure/'; - if ($admin) { - $href = '/home/menu/'; - } + $href = '/home/menu/'; $item = $this->newItem() ->setHref($href) diff --git a/src/applications/home/menuitem/PhabricatorHomeProfileMenuItem.php b/src/applications/home/menuitem/PhabricatorHomeProfileMenuItem.php new file mode 100644 index 0000000000..1283ff3d34 --- /dev/null +++ b/src/applications/home/menuitem/PhabricatorHomeProfileMenuItem.php @@ -0,0 +1,68 @@ +getMenuItemProperty('name'); + + if (strlen($name)) { + return $name; + } + + return $this->getDefaultName(); + } + + public function buildEditEngineFields( + PhabricatorProfileMenuItemConfiguration $config) { + return array( + id(new PhabricatorTextEditField()) + ->setKey('name') + ->setLabel(pht('Name')) + ->setPlaceholder($this->getDefaultName()) + ->setValue($config->getMenuItemProperty('name')), + ); + } + + protected function newNavigationMenuItems( + PhabricatorProfileMenuItemConfiguration $config) { + $viewer = $this->getViewer(); + + if ($viewer->isLoggedIn()) { + $name = $this->getDisplayName($config); + $icon = 'fa-home'; + $href = '/home/'; + + $item = $this->newItem() + ->setHref($href) + ->setName($name) + ->setIcon($icon); + } + + return array( + $item, + ); + } + +} diff --git a/src/applications/meta/view/PhabricatorApplicationLaunchView.php b/src/applications/meta/view/PhabricatorApplicationLaunchView.php deleted file mode 100644 index 7d98b6d7fa..0000000000 --- a/src/applications/meta/view/PhabricatorApplicationLaunchView.php +++ /dev/null @@ -1,69 +0,0 @@ -application = $application; - return $this; - } - - protected function getTagName() { - return $this->application ? 'a' : 'div'; - } - - protected function getTagAttributes() { - $application = $this->application; - return array( - 'class' => array('phabricator-application-launch-container'), - 'href' => $application ? $application->getBaseURI() : null, - ); - } - - protected function getTagContent() { - $application = $this->application; - - require_celerity_resource('phabricator-application-launch-view-css'); - - $content = array(); - $icon = null; - if ($application) { - $content[] = phutil_tag( - 'span', - array( - 'class' => 'phabricator-application-launch-name', - ), - $application->getName()); - - $content[] = phutil_tag( - 'span', - array( - 'class' => 'phabricator-application-launch-description', - ), - $application->getShortDescription()); - - $classes = array(); - $classes[] = 'phabricator-application-launch-icon'; - - $styles = array(); - $classes[] = $application->getIcon(); - $classes[] = 'phui-icon-view'; - $classes[] = 'phui-font-fa'; - - $icon = phutil_tag( - 'span', - array( - 'class' => implode(' ', $classes), - 'style' => nonempty(implode('; ', $styles), null), - ), - ''); - } - - return array( - $icon, - $content, - ); - } - -} diff --git a/src/applications/people/controller/PhabricatorPeopleProfileController.php b/src/applications/people/controller/PhabricatorPeopleProfileController.php index 1e0a9cbe18..b33bf9c863 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileController.php @@ -60,4 +60,63 @@ abstract class PhabricatorPeopleProfileController return $crumbs; } + public function buildProfileHeader() { + $user = $this->user; + $viewer = $this->getViewer(); + + $profile = $user->loadUserProfile(); + $picture = $user->getProfileImageURI(); + + $profile_icon = PhabricatorPeopleIconSet::getIconIcon($profile->getIcon()); + $profile_title = $profile->getDisplayTitle(); + + $roles = array(); + if ($user->getIsAdmin()) { + $roles[] = pht('Administrator'); + } + if ($user->getIsDisabled()) { + $roles[] = pht('Disabled'); + } + if (!$user->getIsApproved()) { + $roles[] = pht('Not Approved'); + } + if ($user->getIsSystemAgent()) { + $roles[] = pht('Bot'); + } + if ($user->getIsMailingList()) { + $roles[] = pht('Mailing List'); + } + + $tag = null; + if ($roles) { + $tag = id(new PHUITagView()) + ->setName(implode(', ', $roles)) + ->addClass('project-view-header-tag') + ->setType(PHUITagView::TYPE_SHADE); + } + + $header = id(new PHUIHeaderView()) + ->setHeader(array($user->getFullName(), $tag)) + ->setImage($picture) + ->setProfileHeader(true); + + if ($user->getIsDisabled()) { + $header->setStatus('fa-ban', 'red', pht('Disabled')); + } else { + $header->setStatus($profile_icon, 'bluegrey', $profile_title); + } + + $can_edit = PhabricatorPolicyFilter::hasCapability( + $viewer, + $user, + PhabricatorPolicyCapability::CAN_EDIT); + + if ($can_edit) { + $id = $user->getID(); + $header->setImageEditURL($this->getApplicationURI("picture/{$id}/")); + } + + return $header; + } + } diff --git a/src/applications/people/controller/PhabricatorPeopleProfileManageController.php b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php index ba533c041c..84acfe1af9 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileManageController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php @@ -23,20 +23,7 @@ final class PhabricatorPeopleProfileManageController } $this->setUser($user); - - $profile = $user->loadUserProfile(); - $picture = $user->getProfileImageURI(); - - $profile_icon = PhabricatorPeopleIconSet::getIconIcon($profile->getIcon()); - $profile_icon = id(new PHUIIconView()) - ->setIcon($profile_icon); - $profile_title = $profile->getDisplayTitle(); - - $header = id(new PHUIHeaderView()) - ->setHeader($user->getFullName()) - ->setSubheader(array($profile_icon, $profile_title)) - ->setImage($picture) - ->setProfileHeader(true); + $header = $this->buildProfileHeader(); $curtain = $this->buildCurtain($user); $properties = $this->buildPropertyView($user); @@ -51,8 +38,10 @@ final class PhabricatorPeopleProfileManageController $manage = id(new PHUITwoColumnView()) ->setHeader($header) + ->addClass('project-view-home') ->setCurtain($curtain) ->addPropertySection(pht('Details'), $properties); + require_celerity_resource('project-view-css'); return $this->newPage() ->setTitle( diff --git a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php index 17fc67e2f3..34a69c3bfb 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php @@ -23,30 +23,7 @@ final class PhabricatorPeopleProfileViewController } $this->setUser($user); - - $profile = $user->loadUserProfile(); - $picture = $user->getProfileImageURI(); - - $profile_icon = PhabricatorPeopleIconSet::getIconIcon($profile->getIcon()); - $profile_icon = id(new PHUIIconView()) - ->setIcon($profile_icon); - $profile_title = $profile->getDisplayTitle(); - - $header = id(new PHUIHeaderView()) - ->setHeader($user->getFullName()) - ->setSubheader(array($profile_icon, $profile_title)) - ->setImage($picture) - ->setProfileHeader(true); - - $can_edit = PhabricatorPolicyFilter::hasCapability( - $viewer, - $user, - PhabricatorPolicyCapability::CAN_EDIT); - - if ($can_edit) { - $id = $user->getID(); - $header->setImageEditURL($this->getApplicationURI("picture/{$id}/")); - } + $header = $this->buildProfileHeader(); $properties = $this->buildPropertyView($user); $name = $user->getUsername(); @@ -158,12 +135,9 @@ final class PhabricatorPeopleProfileViewController } } else { - $error = id(new PHUIBoxView()) - ->addClass('mlb') - ->appendChild(pht('User does not belong to any projects.')); $list = id(new PHUIInfoView()) ->setSeverity(PHUIInfoView::SEVERITY_NODATA) - ->appendChild($error); + ->appendChild(pht('User does not belong to any projects.')); } $box = id(new PHUIObjectBoxView()) @@ -302,12 +276,9 @@ final class PhabricatorPeopleProfileViewController } } } else { - $error = id(new PHUIBoxView()) - ->addClass('mlb') - ->appendChild(pht('User does not have any badges.')); $flex = id(new PHUIInfoView()) ->setSeverity(PHUIInfoView::SEVERITY_NODATA) - ->appendChild($error); + ->appendChild(pht('User does not have any badges.')); } // Best option? diff --git a/src/applications/project/application/PhabricatorProjectApplication.php b/src/applications/project/application/PhabricatorProjectApplication.php index 8988f0f73a..95f65253a8 100644 --- a/src/applications/project/application/PhabricatorProjectApplication.php +++ b/src/applications/project/application/PhabricatorProjectApplication.php @@ -7,7 +7,7 @@ final class PhabricatorProjectApplication extends PhabricatorApplication { } public function getShortDescription() { - return pht('Get Organized'); + return pht('Projects, Tags, and Teams'); } public function isPinnedByDefault(PhabricatorUser $viewer) { diff --git a/src/applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php b/src/applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php index 020e5626de..b64b4bb7a0 100644 --- a/src/applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php +++ b/src/applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php @@ -68,17 +68,16 @@ final class PhabricatorProjectPointsProfileMenuItem ->setLimit($limit + 1) ->execute(); + $error = array(); if (count($tasks) > $limit) { - return $this->renderError( + $error[] = pht( - 'Too many tasks to compute statistics for (more than %s).', - new PhutilNumber($limit))); + 'Too many tasks (%s).', + new PhutilNumber($limit)); } if (!$tasks) { - return $this->renderError( - pht( - 'This milestone has no tasks yet.')); + $error[] = pht('This milestone has no tasks.'); } $statuses = array(); @@ -111,14 +110,11 @@ final class PhabricatorProjectPointsProfileMenuItem } if ($no_points == count($tasks)) { - return $this->renderError( - pht('No tasks have assigned point values.')); + $error[] = pht('No tasks have points assigned.'); } - if (!$points_total) { - return $this->renderError( - pht('All tasks with assigned point values are worth zero points.')); + $error[] = pht('No tasks have positive points.'); } $label = pht( @@ -158,6 +154,10 @@ final class PhabricatorProjectPointsProfileMenuItem ->setTooltip($tooltip); } + if ($error) { + $bar->setLabel(head($error)); + } + $bar = phutil_tag( 'div', array( @@ -173,20 +173,4 @@ final class PhabricatorProjectPointsProfileMenuItem ); } - private function renderError($message) { - $message = phutil_tag( - 'div', - array( - 'class' => 'phui-profile-menu-error', - ), - $message); - - $item = $this->newItem() - ->appendChild($message); - - return array( - $item, - ); - } - } diff --git a/src/applications/search/engine/PhabricatorProfileMenuEngine.php b/src/applications/search/engine/PhabricatorProfileMenuEngine.php index 1af25a4eef..04aa7c574f 100644 --- a/src/applications/search/engine/PhabricatorProfileMenuEngine.php +++ b/src/applications/search/engine/PhabricatorProfileMenuEngine.php @@ -254,7 +254,6 @@ abstract class PhabricatorProfileMenuEngine extends Phobject { if ($this->navigation) { return $this->navigation; } - $nav = id(new AphrontSideNavFilterView()) ->setIsProfileMenu(true) ->setBaseURI(new PhutilURI($this->getItemURI(''))); diff --git a/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php index 7d87bc25d4..3697de3403 100644 --- a/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php +++ b/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php @@ -88,6 +88,11 @@ final class PhabricatorApplicationProfileMenuItem ->setName($this->getDisplayName($config)) ->setIcon($app->getIcon()); + // Don't show tooltip if they've set a custom name + if (strlen(($config->getMenuItemProperty('name')))) { + $item->setTooltip($app->getShortDescription()); + } + return array( $item, ); diff --git a/src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php b/src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php deleted file mode 100644 index ac950eade1..0000000000 --- a/src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php +++ /dev/null @@ -1,223 +0,0 @@ -getViewer(); - $preferences = $this->getPreferences(); - - $pinned_key = PhabricatorPinnedApplicationsSetting::SETTINGKEY; - $pinned = $preferences->getSettingValue($pinned_key); - - $apps = id(new PhabricatorApplicationQuery()) - ->setViewer($viewer) - ->withInstalled(true) - ->withUnlisted(false) - ->withLaunchable(true) - ->execute(); - - $app_list = array(); - foreach ($pinned as $app) { - if (isset($apps[$app])) { - $app_list[$app] = $apps[$app]; - } - } - - if ($request->getBool('reset')) { - if ($request->isFormPost()) { - $this->writePinnedApplications($preferences, null); - return id(new AphrontRedirectResponse()) - ->setURI($this->getPanelURI()); - } - - return $this->newDialog() - ->setTitle(pht('Reset Applications')) - ->addHiddenInput('reset', 'true') - ->appendParagraph( - pht('Reset pinned applications to their defaults?')) - ->addSubmitButton(pht('Reset Applications')) - ->addCancelButton($this->getPanelURI()); - } - - - if ($request->getBool('add')) { - $options = array(); - foreach ($apps as $app) { - $options[get_class($app)] = $app->getName(); - } - asort($options); - - unset($options['PhabricatorApplicationsApplication']); - - if ($request->isFormPost()) { - $pins = $request->getArr('pin'); - $phid = head($pins); - $app = id(new PhabricatorApplicationQuery()) - ->setViewer($viewer) - ->withPHIDs(array($phid)) - ->executeOne(); - if ($app) { - $pin = get_class($app); - } else { - // This likely means the user submitted an empty form - // which will cause nothing to happen. - $pin = ''; - } - if (isset($options[$pin]) && !in_array($pin, $pinned)) { - $pinned[] = $pin; - - $this->writePinnedApplications($preferences, $pinned); - - return id(new AphrontRedirectResponse()) - ->setURI($this->getPanelURI()); - } - } - - $options_control = id(new AphrontFormTokenizerControl()) - ->setName('pin') - ->setLabel(pht('Application')) - ->setDatasource(new PhabricatorApplicationDatasource()) - ->setLimit(1); - - $form = id(new AphrontFormView()) - ->setViewer($viewer) - ->addHiddenInput('add', 'true') - ->appendRemarkupInstructions( - pht('Choose an application to pin to your home page.')) - ->appendControl($options_control); - - return $this->newDialog() - ->setWidth(AphrontDialogView::WIDTH_FORM) - ->setTitle(pht('Pin Application')) - ->appendChild($form->buildLayoutView()) - ->addSubmitButton(pht('Pin Application')) - ->addCancelButton($this->getPanelURI()); - } - - $unpin = $request->getStr('unpin'); - if ($unpin) { - $app = idx($apps, $unpin); - if ($app) { - if ($request->isFormPost()) { - $pinned = array_diff($pinned, array($unpin)); - - $this->writePinnedApplications($preferences, $pinned); - - return id(new AphrontRedirectResponse()) - ->setURI($this->getPanelURI()); - } - - return $this->newDialog() - ->setTitle(pht('Unpin Application')) - ->addHiddenInput('unpin', $unpin) - ->appendParagraph( - pht( - 'Unpin the %s application from your home page?', - phutil_tag('strong', array(), $app->getName()))) - ->addSubmitButton(pht('Unpin Application')) - ->addCancelButton($this->getPanelURI()); - } - } - - $order = $request->getStrList('order'); - if ($order && $request->validateCSRF()) { - $this->writePinnedApplications($preferences, $order); - - return id(new AphrontRedirectResponse()) - ->setURI($this->getPanelURI()); - } - - $list_id = celerity_generate_unique_node_id(); - - $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer) - ->setID($list_id) - ->setDrag(true); - - Javelin::initBehavior( - 'reorder-applications', - array( - 'listID' => $list_id, - 'panelURI' => $this->getPanelURI(), - )); - - foreach ($app_list as $key => $application) { - if ($key == 'PhabricatorApplicationsApplication') { - continue; - } - - $icon = $application->getIcon(); - if (!$icon) { - $icon = 'fa-globe'; - } - - $item = id(new PHUIObjectItemView()) - ->setHeader($application->getName()) - ->setImageIcon($icon) - ->setGrippable(true); - - $item->addAction( - id(new PHUIListItemView()) - ->setIcon('fa-times') - ->setHref($this->getPanelURI().'?unpin='.$key) - ->setWorkflow(true)); - - $item->addSigil('pinned-application'); - $item->setMetadata( - array( - 'applicationClass' => $key, - )); - - $list->addItem($item); - } - - $header = id(new PHUIHeaderView()) - ->setHeader(pht('Pinned Applications')) - ->addActionLink( - id(new PHUIButtonView()) - ->setTag('a') - ->setText(pht('Pin Application')) - ->setHref($this->getPanelURI().'?add=true') - ->setWorkflow(true) - ->setIcon('fa-thumb-tack')) - ->addActionLink( - id(new PHUIButtonView()) - ->setTag('a') - ->setText(pht('Reset to Defaults')) - ->setHref($this->getPanelURI().'?reset=true') - ->setWorkflow(true) - ->setIcon('fa-recycle')); - - $box = id(new PHUIObjectBoxView()) - ->setHeader($header) - ->setObjectList($list); - - return $box; - } - - private function writePinnedApplications( - PhabricatorUserPreferences $preferences, - $pinned) { - - $pinned_key = PhabricatorPinnedApplicationsSetting::SETTINGKEY; - $this->writeSetting($preferences, $pinned_key, $pinned); - } - -} diff --git a/src/view/layout/AphrontSideNavFilterView.php b/src/view/layout/AphrontSideNavFilterView.php index 9dd3720646..87c0d920e8 100644 --- a/src/view/layout/AphrontSideNavFilterView.php +++ b/src/view/layout/AphrontSideNavFilterView.php @@ -204,7 +204,6 @@ final class AphrontSideNavFilterView extends AphrontView { private function renderFlexNav() { require_celerity_resource('phabricator-nav-view-css'); - require_celerity_resource('phui-profile-menu-css'); $nav_classes = array(); $nav_classes[] = 'phabricator-nav'; @@ -310,7 +309,7 @@ final class AphrontSideNavFilterView extends AphrontView { $classes[] = 'phui-navigation-shell'; if ($this->getIsProfileMenu()) { - $classes[] = 'phui-profile-menu'; + $classes[] = 'phui-profile-menu phui-basic-nav'; } else { $classes[] = 'phui-basic-nav'; } diff --git a/src/view/phui/PHUIListItemView.php b/src/view/phui/PHUIListItemView.php index 0ca942dd6a..7b6e55a697 100644 --- a/src/view/phui/PHUIListItemView.php +++ b/src/view/phui/PHUIListItemView.php @@ -30,6 +30,7 @@ final class PHUIListItemView extends AphrontTagView { private $hideInApplicationMenu; private $icons = array(); private $openInNewWindow = false; + private $tooltip; public function setOpenInNewWindow($open_in_new_window) { $this->openInNewWindow = $open_in_new_window; @@ -176,6 +177,11 @@ final class PHUIListItemView extends AphrontTagView { return $this->icons; } + public function setTooltip($tooltip) { + $this->tooltip = $tooltip; + return $this; + } + protected function getTagName() { return 'li'; } @@ -185,7 +191,7 @@ final class PHUIListItemView extends AphrontTagView { $classes[] = 'phui-list-item-view'; $classes[] = 'phui-list-item-'.$this->type; - if ($this->icon) { + if ($this->icon || $this->profileImage) { $classes[] = 'phui-list-item-has-icon'; } @@ -230,6 +236,16 @@ final class PHUIListItemView extends AphrontTagView { 'align' => 'E', ); } else { + if ($this->tooltip) { + Javelin::initBehavior('phabricator-tooltips'); + $sigil = 'has-tooltip'; + $meta = array( + 'tip' => $this->tooltip, + 'align' => 'E', + 'size' => 300, + ); + } + $external = null; if ($this->isExternal) { $external = " \xE2\x86\x97"; diff --git a/webroot/rsrc/css/aphront/tooltip.css b/webroot/rsrc/css/aphront/tooltip.css index f2c3151373..49bbfa7309 100644 --- a/webroot/rsrc/css/aphront/tooltip.css +++ b/webroot/rsrc/css/aphront/tooltip.css @@ -5,17 +5,24 @@ .jx-tooltip-container { position: absolute; padding: 5px; + opacity: 1; + transition: opacity 0.25s ease; +} + +.jx-tooltip-hidden { + opacity: 0; } .jx-tooltip-inner { position: relative; - background: rgba({$alphablack}, .9); + background: #000; border-radius: 3px; } .jx-tooltip { color: #f9f9f9; font-size: {$normalfontsize}; + -webkit-font-smoothing: antialiased; padding: 6px 8px; overflow: hidden; white-space: pre-wrap; diff --git a/webroot/rsrc/css/application/base/main-menu-view.css b/webroot/rsrc/css/application/base/main-menu-view.css index 2bafa7f8f5..54eb8fc5cd 100644 --- a/webroot/rsrc/css/application/base/main-menu-view.css +++ b/webroot/rsrc/css/application/base/main-menu-view.css @@ -164,10 +164,7 @@ right: 0; position: absolute; font-size: {$normalfontsize}; - border-width: 1px; - border-color: {$lightblueborder}; - border-radius: 3px; - border-style: solid; + border: none; background-color: #fff; height: 28px; padding: 3px 28px 3px 52px; @@ -186,7 +183,6 @@ background: #fff; opacity: 1; color: {$darkbluetext}; - border-color: {$sky}; box-shadow: none; } diff --git a/webroot/rsrc/css/application/base/phabricator-application-launch-view.css b/webroot/rsrc/css/application/base/phabricator-application-launch-view.css deleted file mode 100644 index 714fa849e6..0000000000 --- a/webroot/rsrc/css/application/base/phabricator-application-launch-view.css +++ /dev/null @@ -1,103 +0,0 @@ -/** - * @provides phabricator-application-launch-view-css - */ - - -/* - Application List ---------------------------------------------------------- - - Spacing container for the list of large application buttons. - -*/ - - -.application-tile-group { - overflow: hidden; -} - - -/* - Application Launch Button ------------------------------------------------- - - Spacing container for the list of large application buttons. - -*/ - -a.phabricator-application-launch-container, -div.phabricator-application-launch-container { - display: block; - float: left; - overflow: hidden; - position: relative; - text-decoration: none; - width: 100%; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - padding: 4px 0; -} - -.device-phone div.phabricator-application-launch-container { - display: none; -} - -.phabricator-application-launch-icon { - position: absolute; - width: 38px; - height: 18px; - top: 6px; - left: 0; - font-size: 18px; - text-align: center; - vertical-align: bottom; - color: {$darkbluetext}; - text-shadow: {$whitetextshadow}; -} - -.device-desktop a.phabricator-application-launch-container:hover { - background-color: rgba({$alphablack},.07); - text-decoration: none; -} - -.device-desktop a.phabricator-application-launch-container:hover - .phabricator-application-launch-icon { - color: {$sky}; -} - -.phabricator-application-launch-name { - display: block; - font-weight: bold; - color: {$darkbluetext}; - font-size: {$normalfontsize}; - margin-left: 36px; -} - -.phabricator-application-launch-description { - color: {$bluetext}; - font-size: {$smallestfontsize}; - margin-left: 36px; - text-overflow: ellipsis; - width: 150px; - overflow: hidden; - white-space: nowrap; - display: inline-block; - padding: 2px 0 0 0; -} - -.phabricator-application-launch-attention { - position: absolute; - top: 8px; - right: 8px; - color: {$darkbluetext}; - font-weight: bold; - font-size: {$smallerfontsize}; -} - -.phabricator-application-attention-count { - color: {$fire}; -} - -a.phabricator-application-launch-phone-only { - display: none; -} - -.device-phone a.phabricator-application-launch-phone-only { - display: block; -} diff --git a/webroot/rsrc/css/application/base/phui-theme.css b/webroot/rsrc/css/application/base/phui-theme.css index 5313f2099b..d2a2c85ac7 100644 --- a/webroot/rsrc/css/application/base/phui-theme.css +++ b/webroot/rsrc/css/application/base/phui-theme.css @@ -5,7 +5,7 @@ /*--- Header Colors ----------------------------------------------------------*/ .phui-theme-blindigo .phabricator-main-menu-background { - background: #41506e; + background: #4a5f88; } .phui-theme-dark .phabricator-main-menu-background { diff --git a/webroot/rsrc/css/application/search/application-search-view.css b/webroot/rsrc/css/application/search/application-search-view.css index 1320df9c0f..aa1b5c4f97 100644 --- a/webroot/rsrc/css/application/search/application-search-view.css +++ b/webroot/rsrc/css/application/search/application-search-view.css @@ -6,6 +6,10 @@ background-color: #fff; } +.application-search-view .phui-crumbs-view { + background-color: #fff; +} + .application-search-view .application-search-results.phui-object-box { margin: 0; padding: 0 16px 24px; @@ -17,7 +21,7 @@ } .application-search-view .application-search-results .phui-profile-header { - padding: 16px 8px; + padding: 22px 8px; border-bottom: 1px solid {$thinblueborder}; } diff --git a/webroot/rsrc/css/phui/calendar/phui-calendar-list.css b/webroot/rsrc/css/phui/calendar/phui-calendar-list.css index d5a4a89dc9..f7d5e24683 100644 --- a/webroot/rsrc/css/phui/calendar/phui-calendar-list.css +++ b/webroot/rsrc/css/phui/calendar/phui-calendar-list.css @@ -66,7 +66,7 @@ .phui-calendar-list-item-empty { color: {$lightgreytext}; - padding: 0 12px; + padding: 0; font-style: italic; } diff --git a/webroot/rsrc/css/phui/phui-basic-nav-view.css b/webroot/rsrc/css/phui/phui-basic-nav-view.css index 30647e3ece..b1db0d4010 100644 --- a/webroot/rsrc/css/phui/phui-basic-nav-view.css +++ b/webroot/rsrc/css/phui/phui-basic-nav-view.css @@ -19,26 +19,26 @@ display: table-cell; position: relative; vertical-align: top; - width: {$menu.profile.width}; - max-width: {$menu.profile.width}; margin-top: 0; overflow: hidden; } -.phui-basic-nav.phui-navigation-shell .phabricator-nav-local { - width: 205px; - padding-top: 4px; - padding-right: 8px; +.phabricator-home.device-phone .phabricator-nav-content { + display: none; } -.phui-basic-nav .phabricator-side-menu { - background-color: {$page.sidenav}; +.phabricator-home .phui-basic-nav .phabricator-side-menu { + background: transparent; +} + +.phui-basic-nav.phui-navigation-shell .phabricator-nav-local { + width: 205px; + padding-top: 12px; + padding-right: 8px; } .phui-two-column-view .phui-basic-nav.phui-navigation-shell .phabricator-nav-local { - width: {$menu.profile.width}; - max-width: {$menu.profile.width}; padding-right: 0; padding-top: 0; } @@ -55,13 +55,12 @@ display: block; white-space: nowrap; text-decoration: none; - font-size: 13px; -webkit-font-smoothing: antialiased; } .phui-basic-nav .phabricator-side-menu .phui-list-item-href { display: block; - padding: 6px 8px 6px 24px; + padding: 6px 8px 6px 20px; color: {$darkbluetext}; border-top-right-radius: 3px; border-bottom-right-radius: 3px; @@ -69,10 +68,30 @@ text-overflow: ellipsis } +.phui-basic-nav .phabricator-side-menu .phui-list-item-has-icon + .phui-list-item-href { + padding-left: 12px; + } + .phui-basic-nav .phabricator-side-menu .phui-list-item-icon { - margin-left: -12px; + margin-left: -4px; text-align: center; - width: 24px; + width: 30px; +} + +.phui-basic-nav .phabricator-side-menu .phui-divider { + border-bottom: 1px solid rgba({$alphablack},.08); + margin: 0 0 8px 8px; + padding: 8px 0 0 0; +} + +.phui-basic-nav .phabricator-side-menu .phui-list-item-icon.phuihead-small { + display: inline-block; + height: 16px; + width: 16px; + border-radius: 3px; + background-size: 100%; + margin: -2px 7px -2px 3px; } .phui-basic-nav .phabricator-side-menu .phui-list-item-selected { @@ -91,7 +110,7 @@ .phui-basic-nav .phabricator-side-menu .phui-list-item-selected .phui-list-item-href { - padding-left: 20px; + margin-left: -4px; } .phui-basic-nav .phabricator-side-menu .phui-list-item-type-label { @@ -108,3 +127,12 @@ text-decoration: none; background-color: rgba({$alphablack},.07); } + +.phui-basic-nav .phabricator-side-menu .phui-list-item-type-link + + .phui-list-item-type-label { + margin-top: 12px; +} + +.phui-basic-nav .phui-profile-segment-bar { + padding: 4px 4px 8px 12px; +} diff --git a/webroot/rsrc/css/phui/phui-box.css b/webroot/rsrc/css/phui/phui-box.css index ef0816f826..9dc99c6f8c 100644 --- a/webroot/rsrc/css/phui/phui-box.css +++ b/webroot/rsrc/css/phui/phui-box.css @@ -49,10 +49,11 @@ .phui-object-box.phui-box-blue div.phui-info-severity-nodata, .phui-object-box.phui-box-grey div.phui-info-severity-nodata { - background: transparent; - padding: 20px 4px 24px; + background: #fff; + padding: 32px 0; text-align: center; border: none; + margin: 0; color: {$greytext}; } diff --git a/webroot/rsrc/css/phui/phui-profile-menu.css b/webroot/rsrc/css/phui/phui-profile-menu.css deleted file mode 100644 index 6f8934dd39..0000000000 --- a/webroot/rsrc/css/phui/phui-profile-menu.css +++ /dev/null @@ -1,162 +0,0 @@ -/** - * @provides phui-profile-menu-css - */ - -.device-desktop .phui-profile-menu .phabricator-nav-local { - width: {$menu.profile.width.collapsed}; - max-width: {$menu.profile.width.collapsed}; -} - -.device-desktop .phui-profile-menu .phabricator-nav-content { - display: table-cell; - margin-left: 0; -} - -.phui-profile-menu .phui-basic-nav { - width: 205px; -} - -.phui-profile-menu .phabricator-side-menu { - background: #dee0e7; - width: 240px; -} - -.phabricator-side-menu .phui-profile-menu-footer-1 { - background: #dee0e7; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-view { - position: relative; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-href { - display: block; - text-decoration: none; - padding: 0 8px 0 48px; - height: 48px; - font-size: {$biggerfontsize}; - -webkit-font-smoothing: antialiased; - line-height: 22px; - overflow: hidden; - color: {$darkbluetext}; - text-overflow: ellipsis; - line-height: 48px; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-icon, -.phui-profile-menu .phabricator-side-menu - .phui-list-item-href .phui-list-item-icon { - position: absolute; - top: 12px; - left: 13px; - font-size: 24px; - width: 24px; - height: 24px; - line-height: 24px; - text-align: center; - color: {$darkbluetext}; - background-size: 100%; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-href { - text-align: center; - padding: 42px 4px 14px; - line-height: 14px; - height: auto; - font-size: {$smallerfontsize}; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-name { - display: block; - overflow: hidden; - text-overflow: ellipsis; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-icon, -.phui-profile-menu .phabricator-side-menu .phui-list-item-href - .phui-list-item-icon { - top: 14px; - left: 32px; -} - -.phui-profile-menu .phabricator-side-menu - .phui-list-item-disabled - .phui-list-item-icon { - color: {$lightgreytext}; -} - -.phui-profile-menu .phabricator-side-menu .phui-icon-view { - border-radius: 3px; -} - -.device-desktop .phui-profile-menu .phabricator-side-menu - .phui-list-item-href:hover { - background-color: rgba({$alphablack},0.05); -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-selected - .phui-list-item-href { - background-color: rgba({$alphablack},0.1); -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-selected - .phui-list-item-href:hover { - background-color: rgba({$alphablack},0.15); -} - -.phui-profile-menu .phabricator-side-menu .phui-divider { - margin: 4px 0; - border-bottom: 1px solid rgba({$alphablack}, 0.2); -} - -.phui-profile-menu .phabricator-side-menu .phui-motivator { - white-space: normal; - padding: 18px 15px; - font-size: 12px; - color: {$darkbluetext}; -} - -.phui-profile-menu .phabricator-side-menu .phui-motivator .phui-icon-view { - position: static; - font-size: 12px; - color: {$darkbluetext}; -} - -.phui-profile-menu .phabricator-side-menu .phui-profile-menu-error { - color: rgba({$alphawhite}, 0.5); - font-size: {$smallerfontsize}; - padding: 16px; -} - -.phui-profile-menu .phabricator-side-menu .phui-profile-menu-error { - padding: 16px 8px; - overflow: hidden; - text-overflow: ellipsis; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-disabled - .phui-list-item-href, -.phui-profile-menu .phui-list-sidenav .phui-list-item-disabled - .phui-list-item-href { - color: rgba({$lightgreytext}); -} - -.phui-profile-menu .phabricator-side-menu .phui-profile-segment-bar { - color: {$darkbluetext}; - font-size: {$smallerfontsize}; - -webkit-font-smoothing: antialiased; - padding: 8px 12px 16px; -} - -.phui-profile-menu .phabricator-side-menu .phui-profile-segment-bar { - padding: 8px 8px 16px; -} - -.phui-profile-menu .phabricator-side-menu .phui-profile-menu-spacer { - box-sizing: border-box; - height: {$menu.profile.item.height}; -} - -!print .phui-profile-menu .phabricator-side-menu { - display: none; -} diff --git a/webroot/rsrc/css/phui/phui-segment-bar-view.css b/webroot/rsrc/css/phui/phui-segment-bar-view.css index 92665165ba..b3ce7677e3 100644 --- a/webroot/rsrc/css/phui/phui-segment-bar-view.css +++ b/webroot/rsrc/css/phui/phui-segment-bar-view.css @@ -7,14 +7,14 @@ margin-bottom: 4px; } -.phui-profile-menu-collapsed .phui-segment-bar-label { - width: 74px; +.phui-basic-nav .phui-segment-bar-label { + width: 180px; overflow: hidden; text-overflow: ellipsis; } .phui-segment-bar-segments { - background: {$lightgreybackground}; + background: rgba({$alphablue}, .1); border-radius: 4px; position: relative; overflow: hidden; diff --git a/webroot/rsrc/css/phui/workboards/phui-workboard-color.css b/webroot/rsrc/css/phui/workboards/phui-workboard-color.css index 13c9847af9..b16184e34b 100644 --- a/webroot/rsrc/css/phui/workboards/phui-workboard-color.css +++ b/webroot/rsrc/css/phui/workboards/phui-workboard-color.css @@ -60,6 +60,10 @@ body.phui-workboard-color .phabricator-side-menu .phui-profile-menu-footer-1 { color: rgba({$alphawhite},.8); } +.phui-workboard-color .phui-segment-bar-label { + color: rgba({$alphawhite},.8); +} + /* Gradients */ .phui-workboard-gradient-red { diff --git a/webroot/rsrc/css/phui/workboards/phui-workboard.css b/webroot/rsrc/css/phui/workboards/phui-workboard.css index 43fd3a85e4..10450ad836 100644 --- a/webroot/rsrc/css/phui/workboards/phui-workboard.css +++ b/webroot/rsrc/css/phui/workboards/phui-workboard.css @@ -32,7 +32,7 @@ } .device-desktop .project-board-wrapper .phui-workboard-view-shadow { - left: {$menu.profile.width.collapsed}; + left: 212px; } !print .project-board-wrapper .phui-workboard-view-shadow { diff --git a/webroot/rsrc/js/core/ToolTip.js b/webroot/rsrc/js/core/ToolTip.js index 0d09a31eba..01bfc4935d 100644 --- a/webroot/rsrc/js/core/ToolTip.js +++ b/webroot/rsrc/js/core/ToolTip.js @@ -46,7 +46,7 @@ JX.install('Tooltip', { var node = JX.$N( 'div', - { className: 'jx-tooltip-container' }, + { className: 'jx-tooltip-container jx-tooltip-hidden' }, node_inner); node.style.maxWidth = scale + 'px'; @@ -61,6 +61,7 @@ JX.install('Tooltip', { // Jump through some hoops trying to auto-position the tooltip var pos = self._getSmartPosition(align, root, node); pos.setPos(node); + JX.DOM.alterClass(node, 'jx-tooltip-hidden', false); }, _getSmartPosition: function (align, root, node) { diff --git a/webroot/rsrc/js/core/behavior-tooltip.js b/webroot/rsrc/js/core/behavior-tooltip.js index 8b9b8d4f23..336a5b28d0 100644 --- a/webroot/rsrc/js/core/behavior-tooltip.js +++ b/webroot/rsrc/js/core/behavior-tooltip.js @@ -26,7 +26,7 @@ JX.behavior('phabricator-tooltips', function() { JX.Tooltip.show( e.getNode('has-tooltip'), - data.size || 120, + data.size || 160, data.align || 'N', data.tip); });