diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index 24e7363586..6c3cb156f1 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -2400,7 +2400,7 @@ celerity_register_resource_map(array( ), 'phabricator-application-launch-view-css' => array( - 'uri' => '/res/d6b6235b/rsrc/css/application/base/phabricator-application-launch-view.css', + 'uri' => '/res/8aee0702/rsrc/css/application/base/phabricator-application-launch-view.css', 'type' => 'css', 'requires' => array( @@ -2625,7 +2625,7 @@ celerity_register_resource_map(array( ), 'phabricator-nav-view-css' => array( - 'uri' => '/res/28580773/rsrc/css/aphront/phabricator-nav-view.css', + 'uri' => '/res/df20ec17/rsrc/css/aphront/phabricator-nav-view.css', 'type' => 'css', 'requires' => array( @@ -3238,7 +3238,7 @@ celerity_register_resource_map(array( ), array( 'packages' => array( - 'b4c8105f' => + 'f95d7445' => array( 'name' => 'core.pkg.css', 'symbols' => @@ -3282,7 +3282,7 @@ celerity_register_resource_map(array( 36 => 'phabricator-object-item-list-view-css', 37 => 'global-drag-and-drop-css', ), - 'uri' => '/res/pkg/b4c8105f/core.pkg.css', + 'uri' => '/res/pkg/f95d7445/core.pkg.css', 'type' => 'css', ), 'c90b892e' => @@ -3472,19 +3472,19 @@ celerity_register_resource_map(array( 'reverse' => array( 'aphront-attached-file-view-css' => '83f07678', - 'aphront-crumbs-view-css' => 'b4c8105f', - 'aphront-dialog-view-css' => 'b4c8105f', - 'aphront-error-view-css' => 'b4c8105f', - 'aphront-form-view-css' => 'b4c8105f', + 'aphront-crumbs-view-css' => 'f95d7445', + 'aphront-dialog-view-css' => 'f95d7445', + 'aphront-error-view-css' => 'f95d7445', + 'aphront-form-view-css' => 'f95d7445', 'aphront-headsup-action-list-view-css' => 'ec01d039', - 'aphront-headsup-view-css' => 'b4c8105f', - 'aphront-list-filter-view-css' => 'b4c8105f', - 'aphront-pager-view-css' => 'b4c8105f', - 'aphront-panel-view-css' => 'b4c8105f', - 'aphront-table-view-css' => 'b4c8105f', - 'aphront-tokenizer-control-css' => 'b4c8105f', - 'aphront-tooltip-css' => 'b4c8105f', - 'aphront-typeahead-control-css' => 'b4c8105f', + 'aphront-headsup-view-css' => 'f95d7445', + 'aphront-list-filter-view-css' => 'f95d7445', + 'aphront-pager-view-css' => 'f95d7445', + 'aphront-panel-view-css' => 'f95d7445', + 'aphront-table-view-css' => 'f95d7445', + 'aphront-tokenizer-control-css' => 'f95d7445', + 'aphront-tooltip-css' => 'f95d7445', + 'aphront-typeahead-control-css' => 'f95d7445', 'differential-changeset-view-css' => 'ec01d039', 'differential-core-view-css' => 'ec01d039', 'differential-inline-comment-editor' => 'ac53d36a', @@ -3498,7 +3498,7 @@ celerity_register_resource_map(array( 'differential-table-of-contents-css' => 'ec01d039', 'diffusion-commit-view-css' => 'c8ce2d88', 'diffusion-icons-css' => 'c8ce2d88', - 'global-drag-and-drop-css' => 'b4c8105f', + 'global-drag-and-drop-css' => 'f95d7445', 'inline-comment-summary-css' => 'ec01d039', 'javelin-aphlict' => 'c90b892e', 'javelin-behavior' => 'fbeded59', @@ -3568,48 +3568,48 @@ celerity_register_resource_map(array( 'javelin-util' => 'fbeded59', 'javelin-vector' => 'fbeded59', 'javelin-workflow' => 'fbeded59', - 'lightbox-attachment-css' => 'b4c8105f', + 'lightbox-attachment-css' => 'f95d7445', 'maniphest-task-summary-css' => '83f07678', 'maniphest-transaction-detail-css' => '83f07678', 'phabricator-busy' => 'c90b892e', 'phabricator-content-source-view-css' => 'ec01d039', - 'phabricator-core-buttons-css' => 'b4c8105f', - 'phabricator-core-css' => 'b4c8105f', - 'phabricator-crumbs-view-css' => 'b4c8105f', - 'phabricator-directory-css' => 'b4c8105f', + 'phabricator-core-buttons-css' => 'f95d7445', + 'phabricator-core-css' => 'f95d7445', + 'phabricator-crumbs-view-css' => 'f95d7445', + 'phabricator-directory-css' => 'f95d7445', 'phabricator-drag-and-drop-file-upload' => 'ac53d36a', 'phabricator-dropdown-menu' => 'c90b892e', 'phabricator-file-upload' => 'c90b892e', - 'phabricator-filetree-view-css' => 'b4c8105f', - 'phabricator-flag-css' => 'b4c8105f', - 'phabricator-form-view-css' => 'b4c8105f', - 'phabricator-header-view-css' => 'b4c8105f', - 'phabricator-jump-nav' => 'b4c8105f', + 'phabricator-filetree-view-css' => 'f95d7445', + 'phabricator-flag-css' => 'f95d7445', + 'phabricator-form-view-css' => 'f95d7445', + 'phabricator-header-view-css' => 'f95d7445', + 'phabricator-jump-nav' => 'f95d7445', 'phabricator-keyboard-shortcut' => 'c90b892e', 'phabricator-keyboard-shortcut-manager' => 'c90b892e', - 'phabricator-main-menu-view' => 'b4c8105f', + 'phabricator-main-menu-view' => 'f95d7445', 'phabricator-menu-item' => 'c90b892e', - 'phabricator-nav-view-css' => 'b4c8105f', + 'phabricator-nav-view-css' => 'f95d7445', 'phabricator-notification' => 'c90b892e', - 'phabricator-notification-css' => 'b4c8105f', - 'phabricator-notification-menu-css' => 'b4c8105f', - 'phabricator-object-item-list-view-css' => 'b4c8105f', + 'phabricator-notification-css' => 'f95d7445', + 'phabricator-notification-menu-css' => 'f95d7445', + 'phabricator-object-item-list-view-css' => 'f95d7445', 'phabricator-object-selector-css' => 'ec01d039', 'phabricator-paste-file-upload' => 'c90b892e', 'phabricator-prefab' => 'c90b892e', 'phabricator-project-tag-css' => '83f07678', - 'phabricator-remarkup-css' => 'b4c8105f', + 'phabricator-remarkup-css' => 'f95d7445', 'phabricator-shaped-request' => 'ac53d36a', - 'phabricator-side-menu-view-css' => 'b4c8105f', - 'phabricator-standard-page-view' => 'b4c8105f', + 'phabricator-side-menu-view-css' => 'f95d7445', + 'phabricator-standard-page-view' => 'f95d7445', 'phabricator-textareautils' => 'c90b892e', 'phabricator-tooltip' => 'c90b892e', - 'phabricator-transaction-view-css' => 'b4c8105f', - 'phabricator-zindex-css' => 'b4c8105f', - 'sprite-apps-large-css' => 'b4c8105f', - 'sprite-gradient-css' => 'b4c8105f', - 'sprite-icon-css' => 'b4c8105f', - 'sprite-menu-css' => 'b4c8105f', - 'syntax-highlighting-css' => 'b4c8105f', + 'phabricator-transaction-view-css' => 'f95d7445', + 'phabricator-zindex-css' => 'f95d7445', + 'sprite-apps-large-css' => 'f95d7445', + 'sprite-gradient-css' => 'f95d7445', + 'sprite-icon-css' => 'f95d7445', + 'sprite-menu-css' => 'f95d7445', + 'syntax-highlighting-css' => 'f95d7445', ), )); diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php index 5a89f581c8..9642a57fba 100644 --- a/src/applications/base/PhabricatorApplication.php +++ b/src/applications/base/PhabricatorApplication.php @@ -198,6 +198,18 @@ abstract class PhabricatorApplication { } + /** + * On the Phabricator homepage sidebar, this function returns the URL for + * a quick create X link which is displayed in the wide button only. + * + * @return string + * @task ui + */ + public function getQuickCreateURI() { + return null; + } + + /* -( Application Management )--------------------------------------------- */ diff --git a/src/applications/calendar/application/PhabricatorApplicationCalendar.php b/src/applications/calendar/application/PhabricatorApplicationCalendar.php index 15c3016551..a80635503c 100644 --- a/src/applications/calendar/application/PhabricatorApplicationCalendar.php +++ b/src/applications/calendar/application/PhabricatorApplicationCalendar.php @@ -32,6 +32,10 @@ final class PhabricatorApplicationCalendar extends PhabricatorApplication { return true; } + public function getQuickCreateURI() { + return $this->getBaseURI().'status/create/'; + } + public function getRoutes() { return array( '/calendar/' => array( diff --git a/src/applications/directory/controller/PhabricatorDirectoryController.php b/src/applications/directory/controller/PhabricatorDirectoryController.php index 041b88f14e..70391fa2d7 100644 --- a/src/applications/directory/controller/PhabricatorDirectoryController.php +++ b/src/applications/directory/controller/PhabricatorDirectoryController.php @@ -123,7 +123,7 @@ abstract class PhabricatorDirectoryController extends PhabricatorController { } if ($is_small_tiles) { - while (count($tiles) % 4) { + while (count($tiles) % 3) { $tiles[] = id(new PhabricatorApplicationLaunchView()); } $nav->addLabel($groups[$group]); diff --git a/src/applications/maniphest/application/PhabricatorApplicationManiphest.php b/src/applications/maniphest/application/PhabricatorApplicationManiphest.php index 98a7093012..787c5eb6f7 100644 --- a/src/applications/maniphest/application/PhabricatorApplicationManiphest.php +++ b/src/applications/maniphest/application/PhabricatorApplicationManiphest.php @@ -32,6 +32,10 @@ final class PhabricatorApplicationManiphest extends PhabricatorApplication { ); } + public function getQuickCreateURI() { + return $this->getBaseURI().'task/create/'; + } + public function getRoutes() { return array( '/T(?P[1-9]\d*)' => 'ManiphestTaskDetailController', diff --git a/src/applications/meta/view/PhabricatorApplicationLaunchView.php b/src/applications/meta/view/PhabricatorApplicationLaunchView.php index 101b240520..68e9079a17 100644 --- a/src/applications/meta/view/PhabricatorApplicationLaunchView.php +++ b/src/applications/meta/view/PhabricatorApplicationLaunchView.php @@ -29,6 +29,7 @@ final class PhabricatorApplicationLaunchView extends AphrontView { $content = array(); $icon = null; + $create_button = null; if ($application) { $content[] = phutil_render_tag( 'span', @@ -90,15 +91,36 @@ final class PhabricatorApplicationLaunchView extends AphrontView { 'style' => nonempty(implode('; ', $styles), null), ), ''); + + $classes = array(); + if ($application->getQuickCreateURI()) { + $classes[] = 'phabricator-application-create-icon'; + $classes[] = 'sprite-icon'; + $classes[] = 'action-new-grey'; + $plus_icon = phutil_render_tag( + 'span', + array( + 'class' => implode(' ', $classes), + )); + + $create_button = phutil_render_tag( + 'a', + array( + 'href' => $application->getQuickCreateURI(), + 'class' => 'phabricator-application-launch-create', + ), + $plus_icon); + $classes = array(); + $classes[] = 'application-tile-create'; + } } - $classes = array(); $classes[] = 'phabricator-application-launch-container'; if ($this->fullWidth) { $classes[] = 'application-tile-full'; } - return phutil_render_tag( + $app_button = phutil_render_tag( $application ? 'a' : 'div', array( 'class' => implode(' ', $classes), @@ -106,5 +128,7 @@ final class PhabricatorApplicationLaunchView extends AphrontView { ), $icon. $this->renderSingleView($content)); + + return $app_button.$create_button; } } diff --git a/src/applications/paste/application/PhabricatorApplicationPaste.php b/src/applications/paste/application/PhabricatorApplicationPaste.php index f7f2531fac..8b0f9c6dd5 100644 --- a/src/applications/paste/application/PhabricatorApplicationPaste.php +++ b/src/applications/paste/application/PhabricatorApplicationPaste.php @@ -18,6 +18,10 @@ final class PhabricatorApplicationPaste extends PhabricatorApplication { return self::GROUP_UTILITIES; } + public function getQuickCreateURI() { + return $this->getBaseURI().'create/'; + } + public function getRoutes() { return array( '/P(?P[1-9]\d*)' => 'PhabricatorPasteViewController', diff --git a/webroot/rsrc/css/aphront/phabricator-nav-view.css b/webroot/rsrc/css/aphront/phabricator-nav-view.css index 3a79c53a65..a9338387fb 100644 --- a/webroot/rsrc/css/aphront/phabricator-nav-view.css +++ b/webroot/rsrc/css/aphront/phabricator-nav-view.css @@ -77,9 +77,15 @@ .phabricator-side-menu-home .phabricator-nav-column-background, .phabricator-side-menu-home .phabricator-nav-local { - width: 300px; + width: 240px; } .device-desktop .phabricator-side-menu-home .phabricator-nav-content { - margin-left: 300px; + margin-left: 240px; +} + +/* Chrome annoyingly has a url display over the nav + if the nav is the tallest page (home) */ +.phabricator-menu-view { + margin-bottom: 40px; } diff --git a/webroot/rsrc/css/application/base/phabricator-application-launch-view.css b/webroot/rsrc/css/application/base/phabricator-application-launch-view.css index e67e14fdc4..3ca67e1057 100644 --- a/webroot/rsrc/css/application/base/phabricator-application-launch-view.css +++ b/webroot/rsrc/css/application/base/phabricator-application-launch-view.css @@ -25,8 +25,8 @@ a.phabricator-application-launch-container, div.phabricator-application-launch-container { display: block; float: left; - width: 73px; - height: 70px; + width: 78px; + height: 66px; overflow: hidden; position: relative; @@ -37,10 +37,33 @@ div.phabricator-application-launch-container { } a.application-tile-full { - width: 100%; + width: 240px; height: 52px; } +a.application-tile-full.application-tile-create { + width: 210px; + height: 52px; + border-right: none; +} + +.application-tile-full + .phabricator-application-launch-create { + display: block; + float: right; + width: 28px; + border-top: 1px solid #080909; + border-bottom: 1px solid #080909; + border-left: 1px solid #080909; + height: 52px; + position: relative; +} + +a.phabricator-application-launch-create:hover { + background-image: url('/rsrc/image/texture/dark-menu-hover.png'); + color: #fff; + text-decoration: none; +} + a.phabricator-application-launch-container:hover { text-decoration: none; } @@ -54,20 +77,29 @@ a.phabricator-application-launch-container:hover { .phabricator-application-launch-icon { display: block; position: absolute; - left: 23px; - top: 13px; + left: 25px; + top: 10px; width: 28px; height: 28px; } +.phabricator-application-create-icon { + display: block; + position: absolute; + right: 7px; + top: 20px; + width: 14px; + height: 14px; +} + .application-tile-full .phabricator-application-launch-icon { top: 12px; - left: 12px; + left: 10px; } .phabricator-application-launch-name { display: block; - margin-top: 46px; + margin-top: 42px; font-weight: bold; font-size: 11px; text-align: center; @@ -76,10 +108,10 @@ a.phabricator-application-launch-container:hover { } .application-tile-full .phabricator-application-launch-name { - font-size: 12px; - margin-top: 12px; + font-size: 13px; + margin-top: 11px; text-align: left; - margin-left: 52px; + margin-left: 48px; } @@ -87,7 +119,7 @@ a.phabricator-application-launch-container:hover { color: #bfbfbf; font-size: 11px; margin-top: 24px; - margin-left: 52px; + margin-left: 48px; } .phabricator-application-beta, @@ -110,11 +142,27 @@ a.phabricator-application-launch-container:hover { .phabricator-application-beta { left: 4px; - background-color: #ff8f00; + background-color: rgb(109, 92, 41); } .application-tile-full .phabricator-application-launch-attention { top: 16px; - right: 12px; + right: 8px; } +.application-tile-full .phabricator-application-launch-create { + display: inline-block; + float: right; + background: rgb(0, 122, 255); + border-radius: 5px; + color: white; + font-weight: bold; + padding: 1px 6px 2px; + border: 2px solid #333; + font-size: 11px; + box-shadow: 0 0px 2px #000; +} + +.phabricator-application-launch-create { + display: none; +}