From 8fe3c80b6c49ef815847afb619d9345daf338302 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 20 Feb 2011 10:00:29 -0800 Subject: [PATCH] Make header alignment/layout less horrible. Summary: s repruhsent Test Plan: Reviewers: CC: --- .../DifferentialCommitMessageData.php | 2 +- .../DifferentialCommitMessage.php | 2 - .../standard/PhabricatorStandardPageView.php | 41 ++++++++++++------- .../application/base/standard-page-view.css | 39 ++++++++++++------ 4 files changed, 55 insertions(+), 29 deletions(-) diff --git a/src/applications/differential/data/commitmessage/DifferentialCommitMessageData.php b/src/applications/differential/data/commitmessage/DifferentialCommitMessageData.php index 61aafe1e4f..7e31f7e24b 100644 --- a/src/applications/differential/data/commitmessage/DifferentialCommitMessageData.php +++ b/src/applications/differential/data/commitmessage/DifferentialCommitMessageData.php @@ -93,7 +93,7 @@ class DifferentialCommitMessageData { } $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles($handles); + ->loadHandles(); if ($this->mode == self::MODE_AMEND) { if ($reviewer) { diff --git a/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php b/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php index 152ef02d0e..42ad2d9d99 100755 --- a/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php +++ b/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php @@ -388,8 +388,6 @@ class DifferentialCommitMessage { $data = (int)preg_replace('/[^\d]/', '', $data); break; case 'CC': - $data = preg_replace('/\s+/', ' ', $data); - break; case 'Reviewers': case 'Reviewed By': $data = array_filter(preg_split('/[\s,]+/', $data)); diff --git a/src/view/page/standard/PhabricatorStandardPageView.php b/src/view/page/standard/PhabricatorStandardPageView.php index 660e09cc9b..3077055124 100755 --- a/src/view/page/standard/PhabricatorStandardPageView.php +++ b/src/view/page/standard/PhabricatorStandardPageView.php @@ -132,20 +132,23 @@ class PhabricatorStandardPageView extends AphrontPageView { $tabs = array(); foreach ($this->tabs as $name => $tab) { - $tabs[] = phutil_render_tag( + $tab_markup = phutil_render_tag( 'a', array( 'href' => idx($tab, 'href'), + ), + phutil_escape_html(idx($tab, 'name'))); + $tab_markup = phutil_render_tag( + 'td', + array( 'class' => ($name == $this->selectedTab) ? 'phabricator-selected-tab' : null, ), - phutil_escape_html(idx($tab, 'name'))); + $tab_markup); + $tabs[] = $tab_markup; } $tabs = implode('', $tabs); - if ($tabs) { - $tabs = ''.$tabs.''; - } $login_stuff = null; $request = $this->getRequest(); @@ -215,15 +218,25 @@ class PhabricatorStandardPageView extends AphrontPageView { '
'. $login_stuff. '
'. - 'Phabricator '. - phutil_render_tag( - 'a', - array( - 'href' => $this->getBaseURI(), - 'class' => 'phabricator-head-appname', - ), - phutil_escape_html($this->getApplicationName())). - $tabs. + '
'. + ''. + ''. + ''. + $tabs. + ''. + '
'. + phutil_render_tag( + 'a', + array( + 'href' => $this->getBaseURI(), + 'class' => 'phabricator-head-appname', + ), + phutil_escape_html($this->getApplicationName())). + '
'. ''. $this->bodyContent. '
'. diff --git a/webroot/rsrc/css/application/base/standard-page-view.css b/webroot/rsrc/css/application/base/standard-page-view.css index b9ef2b35b2..812d8ecd7d 100644 --- a/webroot/rsrc/css/application/base/standard-page-view.css +++ b/webroot/rsrc/css/application/base/standard-page-view.css @@ -13,32 +13,45 @@ } .phabricator-standard-header { - background: #003366; + background: #006699; color: white; - padding: 1em 1em 0.5em 1em; overflow: hidden; position: relative; } +.phabricator-primary-navigation { + padding-top: 12px; + padding-bottom: 8px; + padding-left: 24px; +} + .phabricator-standard-header a { color: white; } -.phabricator-standard-header .phabricator-head-tabs { - padding: 0 1em; +.phabricator-primary-navigation th, +.phabricator-primary-navigation td { + vertical-align: bottom; font-size: 13px; - font-weight: bold; + border-bottom: 6px solid transparent; + padding-bottom: 4px; } -.phabricator-standard-header .phabricator-head-tabs a { - border-bottom: 3px solid transparent; - padding: 0.5em 0.75em; - position: relative; - bottom: 2px; +.phabricator-primary-navigation th.phabricator-logo { + font-size: 16px; + padding-top: 8px; + padding-left: 24px; + padding-right: 6px; } -.phabricator-standard-header .phabricator-head-tabs a.phabricator-selected-tab { - border-bottom-color: #cccccc; +.phabricator-primary-navigation td { + padding-left: 10px; + padding-right: 10px; +} + +.phabricator-primary-navigation td.phabricator-selected-tab { + border-bottom-color: #ffffff; + background: #3377aa; } .phabricator-standard-header .phabricator-head-appname { @@ -48,6 +61,8 @@ .phabricator-login-details { float: right; + padding: 6px 24px 0; + font-size: 12px; } .phabricator-page-foot {