@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Re-implement one line stories.

Summary: This puts back the 'one line' story we previously had with the updated design.

Test Plan: Review my feed.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6666

+37 -26
+1 -1
src/__celerity_resource_map__.php
··· 3830 3830 ), 3831 3831 'phui-feed-story-css' => 3832 3832 array( 3833 - 'uri' => '/res/e5d6825b/rsrc/css/phui/phui-feed-story.css', 3833 + 'uri' => '/res/5d7ab26c/rsrc/css/phui/phui-feed-story.css', 3834 3834 'type' => 'css', 3835 3835 'requires' => 3836 3836 array(
-1
src/applications/feed/story/PhabricatorFeedStory.php
··· 17 17 private $handles = array(); 18 18 private $objects = array(); 19 19 20 - 21 20 /* -( Loading Stories )---------------------------------------------------- */ 22 21 23 22
+5 -3
src/applications/feed/story/PhabricatorFeedStoryAudit.php
··· 23 23 $this->linkTo($commit_phid))); 24 24 25 25 $comments = $this->getValue('content'); 26 - 27 26 $view->setImage($this->getHandle($author_phid)->getImageURI()); 28 - $content = $this->renderSummary($this->getValue('content')); 29 - $view->appendChild($content); 27 + 28 + if ($comments) { 29 + $content = $this->renderSummary($this->getValue('content')); 30 + $view->appendChild($content); 31 + } 30 32 31 33 return $view; 32 34 }
+14 -2
src/applications/feed/story/PhabricatorFeedStoryDifferential.php
··· 20 20 21 21 $action = $data->getValue('action'); 22 22 23 + switch ($action) { 24 + case DifferentialAction::ACTION_CREATE: 25 + case DifferentialAction::ACTION_CLOSE: 26 + $full_size = true; 27 + break; 28 + default: 29 + $full_size = false; 30 + break; 31 + } 32 + 23 33 $view->setImage($this->getHandle($data->getAuthorPHID())->getImageURI()); 24 - $content = $this->renderSummary($data->getValue('feedback_content')); 25 - $view->appendChild($content); 34 + if ($full_size) { 35 + $content = $this->renderSummary($data->getValue('feedback_content')); 36 + $view->appendChild($content); 37 + } 26 38 27 39 return $view; 28 40 }
+3 -4
src/applications/feed/story/PhabricatorFeedStoryManiphest.php
··· 32 32 // Don't repeat this at home! 33 33 $comments = $data->getValue('comments'); 34 34 $content = $this->renderSummary($comments); 35 + $view->appendChild($content); 35 36 break; 36 - default: 37 - // I think this is just for create 37 + case ManiphestAction::ACTION_CREATE: 38 38 $content = $this->renderSummary($data->getValue('description')); 39 + $view->appendChild($content); 39 40 break; 40 41 } 41 - 42 - $view->appendChild($content); 43 42 44 43 $href = $this->getHandle($data->getValue('taskPHID'))->getURI(); 45 44 $view->setHref($href);
+6 -2
src/applications/feed/story/PhabricatorFeedStoryPhriction.php
··· 65 65 } 66 66 67 67 $view->setImage($this->getHandle($author_phid)->getImageURI()); 68 - $content = $this->renderSummary($data->getValue('content')); 69 - $view->appendChild($content); 68 + switch ($action) { 69 + case PhrictionActionConstants::ACTION_CREATE: 70 + $content = $this->renderSummary($data->getValue('content')); 71 + $view->appendChild($content); 72 + break; 73 + } 70 74 71 75 return $view; 72 76 }
+3 -1
src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php
··· 44 44 45 45 $xaction->setHandles($this->getHandles()); 46 46 $view->setTitle($xaction->getTitleForFeed()); 47 - $view->appendChild($xaction->getBodyForFeed()); 47 + if (nonempty($xaction->getBodyForFeed())) { 48 + $view->appendChild($xaction->getBodyForFeed()); 49 + } 48 50 49 51 $view->setImage( 50 52 $this->getHandle(
-1
src/applications/uiexample/examples/PHUIFeedStoryExample.php
··· 128 128 ->setImage(celerity_get_resource_uri('/rsrc/image/people/harding.png')) 129 129 ->setImageHref('http://en.wikipedia.org/wiki/Warren_G._Harding') 130 130 ->setEpoch(1) 131 - ->setOneLine(true) 132 131 ->setAppIcon('differential-dark') 133 132 ->setUser($user); 134 133
+4 -10
src/view/phui/PHUIFeedStoryView.php
··· 10 10 private $epoch; 11 11 private $viewed; 12 12 private $href; 13 - private $oneline = false; 14 13 private $pontification = null; 15 14 private $tokenBar = array(); 16 15 private $projects = array(); ··· 33 32 34 33 public function setEpoch($epoch) { 35 34 $this->epoch = $epoch; 36 - return $this; 37 - } 38 - 39 - public function setOneLine($oneline) { 40 - $this->oneline = $oneline; 41 35 return $this; 42 36 } 43 37 ··· 86 80 } 87 81 88 82 public function setPontification($text, $title = null) { 89 - $this->setOneLine(false); 90 83 if ($title) { 91 84 $title = phutil_tag('h3', array(), $title); 92 85 } ··· 130 123 public function render() { 131 124 132 125 require_celerity_resource('phui-feed-story-css'); 126 + $oneline = $this->isEmptyContent($this->renderChildren()); 133 127 134 128 $body = null; 135 129 $foot = null; ··· 174 168 } 175 169 176 170 $ol_foot = null; 177 - if ($this->oneline) { 171 + if ($oneline) { 178 172 $ol_foot = phutil_tag( 179 173 'div', 180 174 array( ··· 236 230 $body_content); 237 231 } 238 232 239 - if ($this->oneline) { 233 + if ($oneline) { 240 234 $foot = null; 241 235 } else { 242 236 $foot = phutil_tag( ··· 250 244 } 251 245 252 246 $classes = array('phui-feed-story'); 253 - if ($this->oneline) { 247 + if ($oneline) { 254 248 $classes[] = 'phui-feed-story-oneline'; 255 249 } 256 250
+1 -1
webroot/rsrc/css/phui/phui-feed-story.css
··· 86 86 } 87 87 88 88 .phui-feed-story-oneline .phui-feed-story-head { 89 - padding: 4px; 89 + padding: 8px; 90 90 } 91 91 92 92 .phui-feed-story-oneline .phui-feed-story-body {