From 687e5c0962b4bae749dd6a82d961b5eb0046f788 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 2 Apr 2012 15:21:02 -0700 Subject: [PATCH] Improve homepage buttons for new users Summary: Show application names, then a human-readable description of what they're for. Eventually we'll have better help / tutorial / onboarding / etc systems too. Test Plan: See screenshot. Reviewers: btrahan, mgummelt Reviewed By: btrahan CC: aran, davidreuss Differential Revision: https://secure.phabricator.com/D2075 --- src/__celerity_resource_map__.php | 44 +++++++++---------- .../PhabricatorDirectoryMainController.php | 39 +++++++++++----- .../directory/phabricator-app-buttons.css | 13 +++--- 3 files changed, 55 insertions(+), 41 deletions(-) diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index 76360a5eec..e8a6ddd8e6 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -1520,7 +1520,7 @@ celerity_register_resource_map(array( ), 'phabricator-app-buttons-css' => array( - 'uri' => '/res/7d97b5e0/rsrc/css/application/directory/phabricator-app-buttons.css', + 'uri' => '/res/4ce62d37/rsrc/css/application/directory/phabricator-app-buttons.css', 'type' => 'css', 'requires' => array( @@ -2022,7 +2022,7 @@ celerity_register_resource_map(array( ), array( 'packages' => array( - '61493db4' => + '943d4357' => array( 'name' => 'core.pkg.css', 'symbols' => @@ -2047,7 +2047,7 @@ celerity_register_resource_map(array( 17 => 'aphront-pager-view-css', 18 => 'phabricator-transaction-view-css', ), - 'uri' => '/res/pkg/61493db4/core.pkg.css', + 'uri' => '/res/pkg/943d4357/core.pkg.css', 'type' => 'css', ), '21d01ed8' => @@ -2194,17 +2194,17 @@ celerity_register_resource_map(array( 'reverse' => array( 'aphront-attached-file-view-css' => 'f45e0b15', - 'aphront-crumbs-view-css' => '61493db4', - 'aphront-dialog-view-css' => '61493db4', - 'aphront-form-view-css' => '61493db4', + 'aphront-crumbs-view-css' => '943d4357', + 'aphront-dialog-view-css' => '943d4357', + 'aphront-form-view-css' => '943d4357', 'aphront-headsup-action-list-view-css' => '18be02e0', - 'aphront-list-filter-view-css' => '61493db4', - 'aphront-pager-view-css' => '61493db4', - 'aphront-panel-view-css' => '61493db4', - 'aphront-side-nav-view-css' => '61493db4', - 'aphront-table-view-css' => '61493db4', - 'aphront-tokenizer-control-css' => '61493db4', - 'aphront-typeahead-control-css' => '61493db4', + 'aphront-list-filter-view-css' => '943d4357', + 'aphront-pager-view-css' => '943d4357', + 'aphront-panel-view-css' => '943d4357', + 'aphront-side-nav-view-css' => '943d4357', + 'aphront-table-view-css' => '943d4357', + 'aphront-tokenizer-control-css' => '943d4357', + 'aphront-typeahead-control-css' => '943d4357', 'differential-changeset-view-css' => '18be02e0', 'differential-core-view-css' => '18be02e0', 'differential-inline-comment-editor' => '06ebcd69', @@ -2262,23 +2262,23 @@ celerity_register_resource_map(array( 'maniphest-task-detail-css' => 'f45e0b15', 'maniphest-task-summary-css' => 'f45e0b15', 'maniphest-transaction-detail-css' => 'f45e0b15', - 'phabricator-app-buttons-css' => '61493db4', + 'phabricator-app-buttons-css' => '943d4357', 'phabricator-content-source-view-css' => '18be02e0', - 'phabricator-core-buttons-css' => '61493db4', - 'phabricator-core-css' => '61493db4', - 'phabricator-directory-css' => '61493db4', + 'phabricator-core-buttons-css' => '943d4357', + 'phabricator-core-css' => '943d4357', + 'phabricator-directory-css' => '943d4357', 'phabricator-drag-and-drop-file-upload' => '06ebcd69', 'phabricator-dropdown-menu' => '21d01ed8', - 'phabricator-jump-nav' => '61493db4', + 'phabricator-jump-nav' => '943d4357', 'phabricator-keyboard-shortcut' => '21d01ed8', 'phabricator-keyboard-shortcut-manager' => '21d01ed8', 'phabricator-menu-item' => '21d01ed8', 'phabricator-object-selector-css' => '18be02e0', 'phabricator-paste-file-upload' => '21d01ed8', - 'phabricator-remarkup-css' => '61493db4', + 'phabricator-remarkup-css' => '943d4357', 'phabricator-shaped-request' => '06ebcd69', - 'phabricator-standard-page-view' => '61493db4', - 'phabricator-transaction-view-css' => '61493db4', - 'syntax-highlighting-css' => '61493db4', + 'phabricator-standard-page-view' => '943d4357', + 'phabricator-transaction-view-css' => '943d4357', + 'syntax-highlighting-css' => '943d4357', ), )); diff --git a/src/applications/directory/controller/main/PhabricatorDirectoryMainController.php b/src/applications/directory/controller/main/PhabricatorDirectoryMainController.php index fb23d40fc7..e170b9a08c 100644 --- a/src/applications/directory/controller/main/PhabricatorDirectoryMainController.php +++ b/src/applications/directory/controller/main/PhabricatorDirectoryMainController.php @@ -523,13 +523,15 @@ final class PhabricatorDirectoryMainController $nav_buttons[] = array( 'Differential', '/differential/', - 'differential'); + 'differential', + 'Code Reviews'); if (PhabricatorEnv::getEnvConfig('maniphest.enabled')) { $nav_buttons[] = array( 'Maniphest', '/maniphest/', - 'maniphest'); + 'maniphest', + 'Tasks'); $nav_buttons[] = array( 'Create Task', '/maniphest/task/create/', @@ -539,34 +541,47 @@ final class PhabricatorDirectoryMainController $nav_buttons[] = array( 'Upload File', '/file/', - 'upload-file'); + 'upload-file', + 'Share Files'); $nav_buttons[] = array( 'Create Paste', '/paste/', - 'create-paste'); + 'create-paste', + 'Share Text'); if (PhabricatorEnv::getEnvConfig('phriction.enabled')) { $nav_buttons[] = array( - 'Browse Wiki', + 'Phriction', '/w/', - 'phriction'); + 'phriction', + 'Browse Wiki'); } $nav_buttons[] = array( - 'Browse Code', + 'Diffusion', '/diffusion/', - 'diffusion'); + 'diffusion', + 'Browse Code'); $nav_buttons[] = array( - 'Audit Code', + 'Audit', '/audit/', - 'audit'); + 'audit', + 'Audit Code'); $view = new AphrontNullView(); $view->appendChild('
'); foreach ($nav_buttons as $info) { - list($name, $uri, $icon) = $info; + // Subtitle is optional. + list($name, $uri, $icon, $subtitle) = array_merge($info, array(null)); + + if ($subtitle) { + $subtitle = + '
'. + phutil_escape_html($subtitle). + '
'; + } $button = phutil_render_tag( 'a', @@ -586,7 +601,7 @@ final class PhabricatorDirectoryMainController 'href' => $uri, 'class' => 'phabricator-button-caption', ), - phutil_escape_html($name)); + phutil_escape_html($name).$subtitle); $view->appendChild( '
'. diff --git a/webroot/rsrc/css/application/directory/phabricator-app-buttons.css b/webroot/rsrc/css/application/directory/phabricator-app-buttons.css index a411c119a2..7708df8897 100644 --- a/webroot/rsrc/css/application/directory/phabricator-app-buttons.css +++ b/webroot/rsrc/css/application/directory/phabricator-app-buttons.css @@ -52,16 +52,15 @@ a.phabricator-button-caption:visited { text-align: center; font-size: 11px; padding: 3px 0; - - color: #444444; - -/* font-weight: bold; - color: #ffffff; - text-shadow: black 1px 1px 2px; -*/ } +.phabricator-app-subtitle { + color: #888888; + font-weight: normal; +} + + .app-icon { position: relative; width: 50px;