1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 21:02:41 +01:00

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
This commit is contained in:
Chad Little 2015-03-12 11:21:12 -07:00
parent bcc6d90e7b
commit f77c5c514b
5 changed files with 44 additions and 19 deletions

View file

@ -44,7 +44,7 @@ return array(
'rsrc/css/application/config/config-welcome.css' => '6abd79be', 'rsrc/css/application/config/config-welcome.css' => '6abd79be',
'rsrc/css/application/config/setup-issue.css' => '22270af2', 'rsrc/css/application/config/setup-issue.css' => '22270af2',
'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2', '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/menu.css' => 'c6ac5299',
'rsrc/css/application/conpherence/message-pane.css' => '5930260a', 'rsrc/css/application/conpherence/message-pane.css' => '5930260a',
'rsrc/css/application/conpherence/notification.css' => '04a6e10a', 'rsrc/css/application/conpherence/notification.css' => '04a6e10a',
@ -514,7 +514,7 @@ return array(
'changeset-view-manager' => '88be0133', 'changeset-view-manager' => '88be0133',
'config-options-css' => '7fedf08b', 'config-options-css' => '7fedf08b',
'config-welcome-css' => '6abd79be', 'config-welcome-css' => '6abd79be',
'conpherence-durable-column-view' => '587fc261', 'conpherence-durable-column-view' => 'e3433ca7',
'conpherence-menu-css' => 'c6ac5299', 'conpherence-menu-css' => 'c6ac5299',
'conpherence-message-pane-css' => '5930260a', 'conpherence-message-pane-css' => '5930260a',
'conpherence-notification-css' => '04a6e10a', 'conpherence-notification-css' => '04a6e10a',

View file

@ -55,18 +55,18 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
case ConpherenceTransactionType::TYPE_TITLE: case ConpherenceTransactionType::TYPE_TITLE:
if ($old && $new) { if ($old && $new) {
$title = pht( $title = pht(
'%s renamed this conpherence from "%s" to "%s".', '%s renamed this Thread from "%s" to "%s".',
$this->renderHandleLink($author_phid), $this->renderHandleLink($author_phid),
$old, $old,
$new); $new);
} else if ($old) { } else if ($old) {
$title = pht( $title = pht(
'%s deleted the conpherence name "%s".', '%s deleted the Thread name "%s".',
$this->renderHandleLink($author_phid), $this->renderHandleLink($author_phid),
$old); $old);
} else { } else {
$title = pht( $title = pht(
'%s named this conpherence "%s".', '%s named this Thread "%s".',
$this->renderHandleLink($author_phid), $this->renderHandleLink($author_phid),
$new); $new);
} }

View file

@ -79,7 +79,8 @@ final class ConpherenceTransactionView extends AphrontView {
$author = $handles[$transaction->getAuthorPHID()]; $author = $handles[$transaction->getAuthorPHID()];
$transaction_view = id(new PhabricatorTransactionView()) $transaction_view = id(new PhabricatorTransactionView())
->setUser($user) ->setUser($user)
->setEpoch($transaction->getDateCreated()); ->setEpoch($transaction->getDateCreated())
->setTimeOnly(true);
if ($this->getShowContentSource()) { if ($this->getShowContentSource()) {
$transaction_view->setContentSource($transaction->getContentSource()); $transaction_view->setContentSource($transaction->getContentSource());
} }

View file

@ -10,6 +10,7 @@ final class PhabricatorTransactionView extends AphrontView {
private $anchorText; private $anchorText;
private $isPreview; private $isPreview;
private $classes = array(); private $classes = array();
private $timeOnly;
public function setImageURI($uri) { public function setImageURI($uri) {
$this->imageURI = $uri; $this->imageURI = $uri;
@ -47,6 +48,11 @@ final class PhabricatorTransactionView extends AphrontView {
return $this; return $this;
} }
public function setTimeOnly($time) {
$this->timeOnly = $time;
return $this;
}
public function render() { public function render() {
if (!$this->user) { if (!$this->user) {
throw new Exception(pht('Call setUser() before render()!')); throw new Exception(pht('Call setUser() before render()!'));
@ -64,7 +70,7 @@ final class PhabricatorTransactionView extends AphrontView {
$header = phutil_tag_div( $header = phutil_tag_div(
'phabricator-transaction-header grouped', 'phabricator-transaction-header grouped',
array($info, $actions)); array($actions, $info));
return phutil_tag( return phutil_tag(
'div', 'div',
@ -93,10 +99,14 @@ final class PhabricatorTransactionView extends AphrontView {
} }
if ($this->isPreview) { if ($this->isPreview) {
$info[] = 'PREVIEW'; $info[] = pht('PREVIEW');
} else if ($this->epoch) { } else if ($this->epoch) {
if ($this->timeOnly) {
$info[] = phabricator_time($this->epoch, $this->user);
} else {
$info[] = phabricator_datetime($this->epoch, $this->user); $info[] = phabricator_datetime($this->epoch, $this->user);
} }
}
if ($this->anchorName) { if ($this->anchorName) {
Javelin::initBehavior('phabricator-watch-anchor'); Javelin::initBehavior('phabricator-watch-anchor');
@ -118,7 +128,8 @@ final class PhabricatorTransactionView extends AphrontView {
return phutil_tag( return phutil_tag(
'span', 'span',
array('class' => 'phabricator-transaction-info'), array(
'class' => 'phabricator-transaction-info',),
$info); $info);
} }

View file

@ -103,7 +103,6 @@
left: 0; left: 0;
right: 0; right: 0;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto;
border-top: 1px solid {$thinblueborder}; border-top: 1px solid {$thinblueborder};
} }
@ -132,33 +131,46 @@
.conpherence-durable-column-transactions .phabricator-transaction-detail .conpherence-durable-column-transactions .phabricator-transaction-detail
.phabricator-transaction-header { .phabricator-transaction-header {
background: none; background: none;
padding: 0; padding: 0 0 4px 0;
} }
.conpherence-durable-column-transactions .date-marker { .conpherence-durable-column-transactions .date-marker {
border-top: 1px solid {$thinblueborder}; border-top: 1px solid {$thinblueborder};
margin: 20px 0px 4px; margin: 20px 0px 8px;
} }
.conpherence-durable-column-transactions .date-marker .date { .conpherence-durable-column-transactions .date-marker .date {
position: relative; position: relative;
top: -11px; top: -11px;
left: 8px; left: 0;
background-color: #fff; background-color: #fff;
color: {$lightgreytext}; color: {$lightbluetext};
font-size: 12px; font-size: 12px;
padding: 0 4px; padding: 0 6px 0 0;
} }
.conpherence-durable-column-transactions .phabricator-transaction-detail .conpherence-durable-column-transactions .phabricator-transaction-detail
.phabricator-transaction-header .phabricator-transaction-info { .phabricator-transaction-header .phabricator-transaction-info {
margin: 3px 0px 0px 0px; color: {$lightbluetext};
color: {$lightgreytext}; 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 .conpherence-durable-column-transactions .phabricator-transaction-detail
.phabricator-transaction-content { .phabricator-transaction-content {
padding: 0; padding: 0 0 8px 0;
} }
.conpherence-durable-column-textarea { .conpherence-durable-column-textarea {
@ -182,6 +194,7 @@
border-top-color: {$sky}; border-top-color: {$sky};
border-bottom-color: {$sky}; border-bottom-color: {$sky};
box-shadow: none; box-shadow: none;
opacity: 0.6;
} }
.conpherence-durable-column-footer { .conpherence-durable-column-footer {