From f77c5c514b5d0e46ad9353af359dc737e0518f9a Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 12 Mar 2015 11:21:12 -0700 Subject: [PATCH] Show shorter time in Conpherence, revisit spacing/colors Summary: This adds a parameter for time only on Conpherence Transactions, although grepping around, Conpherence might be the only user of this View at this point. Since we have the date markers separately, we can use just the timestamp for a cleaner feel. Also updated a bit of the spacing and colors to match Conpherence Full. Ref T7531 Test Plan: A lot of Photoshop, and different types of chats. {F336204} Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7531 Differential Revision: https://secure.phabricator.com/D12049 --- resources/celerity/map.php | 4 +-- .../storage/ConpherenceTransaction.php | 6 ++-- .../view/ConpherenceTransactionView.php | 3 +- .../layout/PhabricatorTransactionView.php | 19 +++++++++--- .../conpherence/durable-column.css | 31 +++++++++++++------ 5 files changed, 44 insertions(+), 19 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 4f778f2c69..5ebd331bba 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -44,7 +44,7 @@ return array( 'rsrc/css/application/config/config-welcome.css' => '6abd79be', 'rsrc/css/application/config/setup-issue.css' => '22270af2', 'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2', - 'rsrc/css/application/conpherence/durable-column.css' => '587fc261', + 'rsrc/css/application/conpherence/durable-column.css' => 'e3433ca7', 'rsrc/css/application/conpherence/menu.css' => 'c6ac5299', 'rsrc/css/application/conpherence/message-pane.css' => '5930260a', 'rsrc/css/application/conpherence/notification.css' => '04a6e10a', @@ -514,7 +514,7 @@ return array( 'changeset-view-manager' => '88be0133', 'config-options-css' => '7fedf08b', 'config-welcome-css' => '6abd79be', - 'conpherence-durable-column-view' => '587fc261', + 'conpherence-durable-column-view' => 'e3433ca7', 'conpherence-menu-css' => 'c6ac5299', 'conpherence-message-pane-css' => '5930260a', 'conpherence-notification-css' => '04a6e10a', diff --git a/src/applications/conpherence/storage/ConpherenceTransaction.php b/src/applications/conpherence/storage/ConpherenceTransaction.php index a27b7ce359..836ab38f51 100644 --- a/src/applications/conpherence/storage/ConpherenceTransaction.php +++ b/src/applications/conpherence/storage/ConpherenceTransaction.php @@ -55,18 +55,18 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction { case ConpherenceTransactionType::TYPE_TITLE: if ($old && $new) { $title = pht( - '%s renamed this conpherence from "%s" to "%s".', + '%s renamed this Thread from "%s" to "%s".', $this->renderHandleLink($author_phid), $old, $new); } else if ($old) { $title = pht( - '%s deleted the conpherence name "%s".', + '%s deleted the Thread name "%s".', $this->renderHandleLink($author_phid), $old); } else { $title = pht( - '%s named this conpherence "%s".', + '%s named this Thread "%s".', $this->renderHandleLink($author_phid), $new); } diff --git a/src/applications/conpherence/view/ConpherenceTransactionView.php b/src/applications/conpherence/view/ConpherenceTransactionView.php index a0f5633ac0..502bb25e6d 100644 --- a/src/applications/conpherence/view/ConpherenceTransactionView.php +++ b/src/applications/conpherence/view/ConpherenceTransactionView.php @@ -79,7 +79,8 @@ final class ConpherenceTransactionView extends AphrontView { $author = $handles[$transaction->getAuthorPHID()]; $transaction_view = id(new PhabricatorTransactionView()) ->setUser($user) - ->setEpoch($transaction->getDateCreated()); + ->setEpoch($transaction->getDateCreated()) + ->setTimeOnly(true); if ($this->getShowContentSource()) { $transaction_view->setContentSource($transaction->getContentSource()); } diff --git a/src/view/layout/PhabricatorTransactionView.php b/src/view/layout/PhabricatorTransactionView.php index c2f9cf8f83..dbe2e6e3bc 100644 --- a/src/view/layout/PhabricatorTransactionView.php +++ b/src/view/layout/PhabricatorTransactionView.php @@ -10,6 +10,7 @@ final class PhabricatorTransactionView extends AphrontView { private $anchorText; private $isPreview; private $classes = array(); + private $timeOnly; public function setImageURI($uri) { $this->imageURI = $uri; @@ -47,6 +48,11 @@ final class PhabricatorTransactionView extends AphrontView { return $this; } + public function setTimeOnly($time) { + $this->timeOnly = $time; + return $this; + } + public function render() { if (!$this->user) { throw new Exception(pht('Call setUser() before render()!')); @@ -64,7 +70,7 @@ final class PhabricatorTransactionView extends AphrontView { $header = phutil_tag_div( 'phabricator-transaction-header grouped', - array($info, $actions)); + array($actions, $info)); return phutil_tag( 'div', @@ -93,9 +99,13 @@ final class PhabricatorTransactionView extends AphrontView { } if ($this->isPreview) { - $info[] = 'PREVIEW'; + $info[] = pht('PREVIEW'); } else if ($this->epoch) { - $info[] = phabricator_datetime($this->epoch, $this->user); + if ($this->timeOnly) { + $info[] = phabricator_time($this->epoch, $this->user); + } else { + $info[] = phabricator_datetime($this->epoch, $this->user); + } } if ($this->anchorName) { @@ -118,7 +128,8 @@ final class PhabricatorTransactionView extends AphrontView { return phutil_tag( 'span', - array('class' => 'phabricator-transaction-info'), + array( + 'class' => 'phabricator-transaction-info',), $info); } diff --git a/webroot/rsrc/css/application/conpherence/durable-column.css b/webroot/rsrc/css/application/conpherence/durable-column.css index 778e736855..05bb57eee8 100644 --- a/webroot/rsrc/css/application/conpherence/durable-column.css +++ b/webroot/rsrc/css/application/conpherence/durable-column.css @@ -103,7 +103,6 @@ left: 0; right: 0; overflow-x: hidden; - overflow-y: auto; border-top: 1px solid {$thinblueborder}; } @@ -132,33 +131,46 @@ .conpherence-durable-column-transactions .phabricator-transaction-detail .phabricator-transaction-header { background: none; - padding: 0; + padding: 0 0 4px 0; } .conpherence-durable-column-transactions .date-marker { border-top: 1px solid {$thinblueborder}; - margin: 20px 0px 4px; + margin: 20px 0px 8px; } .conpherence-durable-column-transactions .date-marker .date { position: relative; top: -11px; - left: 8px; + left: 0; background-color: #fff; - color: {$lightgreytext}; + color: {$lightbluetext}; font-size: 12px; - padding: 0 4px; + padding: 0 6px 0 0; } .conpherence-durable-column-transactions .phabricator-transaction-detail .phabricator-transaction-header .phabricator-transaction-info { - margin: 3px 0px 0px 0px; - color: {$lightgreytext}; + color: {$lightbluetext}; + float: none; + font-size: 12px; +} + +.conpherence-durable-column-transactions .phabricator-transaction-detail +.phabricator-transaction-header .phui-link-person { + color: {$darkbluetext}; + padding: 0 8px 0 0; +} + +.conpherence-durable-column-transactions .phabricator-transaction-detail +.phabricator-transaction-content .phui-link-person { + font-weight: bold; + color: {$darkbluetext}; } .conpherence-durable-column-transactions .phabricator-transaction-detail .phabricator-transaction-content { - padding: 0; + padding: 0 0 8px 0; } .conpherence-durable-column-textarea { @@ -182,6 +194,7 @@ border-top-color: {$sky}; border-bottom-color: {$sky}; box-shadow: none; + opacity: 0.6; } .conpherence-durable-column-footer {