diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index 413fa3b7ed..ac5f54a34e 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -3830,7 +3830,7 @@ celerity_register_resource_map(array( ), 'phui-feed-story-css' => array( - 'uri' => '/res/e5d6825b/rsrc/css/phui/phui-feed-story.css', + 'uri' => '/res/5d7ab26c/rsrc/css/phui/phui-feed-story.css', 'type' => 'css', 'requires' => array( diff --git a/src/applications/feed/story/PhabricatorFeedStory.php b/src/applications/feed/story/PhabricatorFeedStory.php index 5b9ddd594e..c9d5c35791 100644 --- a/src/applications/feed/story/PhabricatorFeedStory.php +++ b/src/applications/feed/story/PhabricatorFeedStory.php @@ -17,7 +17,6 @@ abstract class PhabricatorFeedStory implements PhabricatorPolicyInterface { private $handles = array(); private $objects = array(); - /* -( Loading Stories )---------------------------------------------------- */ diff --git a/src/applications/feed/story/PhabricatorFeedStoryAudit.php b/src/applications/feed/story/PhabricatorFeedStoryAudit.php index 5fa66fd19f..e9f7f855a6 100644 --- a/src/applications/feed/story/PhabricatorFeedStoryAudit.php +++ b/src/applications/feed/story/PhabricatorFeedStoryAudit.php @@ -23,10 +23,12 @@ final class PhabricatorFeedStoryAudit extends PhabricatorFeedStory { $this->linkTo($commit_phid))); $comments = $this->getValue('content'); - $view->setImage($this->getHandle($author_phid)->getImageURI()); - $content = $this->renderSummary($this->getValue('content')); - $view->appendChild($content); + + if ($comments) { + $content = $this->renderSummary($this->getValue('content')); + $view->appendChild($content); + } return $view; } diff --git a/src/applications/feed/story/PhabricatorFeedStoryDifferential.php b/src/applications/feed/story/PhabricatorFeedStoryDifferential.php index 848bf510e7..4fd7897ad4 100644 --- a/src/applications/feed/story/PhabricatorFeedStoryDifferential.php +++ b/src/applications/feed/story/PhabricatorFeedStoryDifferential.php @@ -20,9 +20,21 @@ final class PhabricatorFeedStoryDifferential extends PhabricatorFeedStory { $action = $data->getValue('action'); + switch ($action) { + case DifferentialAction::ACTION_CREATE: + case DifferentialAction::ACTION_CLOSE: + $full_size = true; + break; + default: + $full_size = false; + break; + } + $view->setImage($this->getHandle($data->getAuthorPHID())->getImageURI()); - $content = $this->renderSummary($data->getValue('feedback_content')); - $view->appendChild($content); + if ($full_size) { + $content = $this->renderSummary($data->getValue('feedback_content')); + $view->appendChild($content); + } return $view; } diff --git a/src/applications/feed/story/PhabricatorFeedStoryManiphest.php b/src/applications/feed/story/PhabricatorFeedStoryManiphest.php index 1b69e4c3ef..7967e8a655 100644 --- a/src/applications/feed/story/PhabricatorFeedStoryManiphest.php +++ b/src/applications/feed/story/PhabricatorFeedStoryManiphest.php @@ -32,15 +32,14 @@ final class PhabricatorFeedStoryManiphest // Don't repeat this at home! $comments = $data->getValue('comments'); $content = $this->renderSummary($comments); + $view->appendChild($content); break; - default: - // I think this is just for create + case ManiphestAction::ACTION_CREATE: $content = $this->renderSummary($data->getValue('description')); + $view->appendChild($content); break; } - $view->appendChild($content); - $href = $this->getHandle($data->getValue('taskPHID'))->getURI(); $view->setHref($href); diff --git a/src/applications/feed/story/PhabricatorFeedStoryPhriction.php b/src/applications/feed/story/PhabricatorFeedStoryPhriction.php index 478e7e514a..e4c18b3e7a 100644 --- a/src/applications/feed/story/PhabricatorFeedStoryPhriction.php +++ b/src/applications/feed/story/PhabricatorFeedStoryPhriction.php @@ -65,8 +65,12 @@ final class PhabricatorFeedStoryPhriction extends PhabricatorFeedStory { } $view->setImage($this->getHandle($author_phid)->getImageURI()); - $content = $this->renderSummary($data->getValue('content')); - $view->appendChild($content); + switch ($action) { + case PhrictionActionConstants::ACTION_CREATE: + $content = $this->renderSummary($data->getValue('content')); + $view->appendChild($content); + break; + } return $view; } diff --git a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php index a1f5ccce72..57190e00d0 100644 --- a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php +++ b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php @@ -44,7 +44,9 @@ class PhabricatorApplicationTransactionFeedStory $xaction->setHandles($this->getHandles()); $view->setTitle($xaction->getTitleForFeed()); - $view->appendChild($xaction->getBodyForFeed()); + if (nonempty($xaction->getBodyForFeed())) { + $view->appendChild($xaction->getBodyForFeed()); + } $view->setImage( $this->getHandle( diff --git a/src/applications/uiexample/examples/PHUIFeedStoryExample.php b/src/applications/uiexample/examples/PHUIFeedStoryExample.php index 1dde6cdeda..c4f4213a81 100644 --- a/src/applications/uiexample/examples/PHUIFeedStoryExample.php +++ b/src/applications/uiexample/examples/PHUIFeedStoryExample.php @@ -128,7 +128,6 @@ final class PHUIFeedStoryExample extends PhabricatorUIExample { ->setImage(celerity_get_resource_uri('/rsrc/image/people/harding.png')) ->setImageHref('http://en.wikipedia.org/wiki/Warren_G._Harding') ->setEpoch(1) - ->setOneLine(true) ->setAppIcon('differential-dark') ->setUser($user); diff --git a/src/view/phui/PHUIFeedStoryView.php b/src/view/phui/PHUIFeedStoryView.php index 892fa3fd1e..e15979dc22 100644 --- a/src/view/phui/PHUIFeedStoryView.php +++ b/src/view/phui/PHUIFeedStoryView.php @@ -10,7 +10,6 @@ final class PHUIFeedStoryView extends AphrontView { private $epoch; private $viewed; private $href; - private $oneline = false; private $pontification = null; private $tokenBar = array(); private $projects = array(); @@ -36,11 +35,6 @@ final class PHUIFeedStoryView extends AphrontView { return $this; } - public function setOneLine($oneline) { - $this->oneline = $oneline; - return $this; - } - public function setImage($image) { $this->image = $image; return $this; @@ -86,7 +80,6 @@ final class PHUIFeedStoryView extends AphrontView { } public function setPontification($text, $title = null) { - $this->setOneLine(false); if ($title) { $title = phutil_tag('h3', array(), $title); } @@ -130,6 +123,7 @@ final class PHUIFeedStoryView extends AphrontView { public function render() { require_celerity_resource('phui-feed-story-css'); + $oneline = $this->isEmptyContent($this->renderChildren()); $body = null; $foot = null; @@ -174,7 +168,7 @@ final class PHUIFeedStoryView extends AphrontView { } $ol_foot = null; - if ($this->oneline) { + if ($oneline) { $ol_foot = phutil_tag( 'div', array( @@ -236,7 +230,7 @@ final class PHUIFeedStoryView extends AphrontView { $body_content); } - if ($this->oneline) { + if ($oneline) { $foot = null; } else { $foot = phutil_tag( @@ -250,7 +244,7 @@ final class PHUIFeedStoryView extends AphrontView { } $classes = array('phui-feed-story'); - if ($this->oneline) { + if ($oneline) { $classes[] = 'phui-feed-story-oneline'; } diff --git a/webroot/rsrc/css/phui/phui-feed-story.css b/webroot/rsrc/css/phui/phui-feed-story.css index edb1e23e18..3352594a7d 100644 --- a/webroot/rsrc/css/phui/phui-feed-story.css +++ b/webroot/rsrc/css/phui/phui-feed-story.css @@ -86,7 +86,7 @@ } .phui-feed-story-oneline .phui-feed-story-head { - padding: 4px; + padding: 8px; } .phui-feed-story-oneline .phui-feed-story-body {