@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.

Add Pinboard Items to Timeline

Summary: This allows adding of pinboard items to a timeline. I'm hoping we can get this in for Maniphest (Pholio, Cover Image) and Macro (because, Macro), but unsure how to scalably do this. Anyways, here's the front end.

Test Plan:
Make some fake timeline items in UIExamples, test mobile, tablet, and desktop breakpoints.

{F4965798}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+52 -15
+3 -3
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => 'ff161f2d', 11 11 'conpherence.pkg.js' => 'b5b51108', 12 - 'core.pkg.css' => '4937a7d7', 12 + 'core.pkg.css' => '0ab752b2', 13 13 'core.pkg.js' => 'a0c8fb20', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '52b014e7', ··· 173 173 'rsrc/css/phui/phui-spacing.css' => '042804d6', 174 174 'rsrc/css/phui/phui-status.css' => 'd5263e49', 175 175 'rsrc/css/phui/phui-tag-view.css' => 'cc4fd402', 176 - 'rsrc/css/phui/phui-timeline-view.css' => '1d7ef61d', 176 + 'rsrc/css/phui/phui-timeline-view.css' => '313c7f22', 177 177 'rsrc/css/phui/phui-two-column-view.css' => 'ce9fa0b7', 178 178 'rsrc/css/phui/workboards/phui-workboard-color.css' => '783cdff5', 179 179 'rsrc/css/phui/workboards/phui-workboard.css' => '3bc85455', ··· 880 880 'phui-status-list-view-css' => 'd5263e49', 881 881 'phui-tag-view-css' => 'cc4fd402', 882 882 'phui-theme-css' => '9f261c6b', 883 - 'phui-timeline-view-css' => '1d7ef61d', 883 + 'phui-timeline-view-css' => '313c7f22', 884 884 'phui-two-column-view-css' => 'ce9fa0b7', 885 885 'phui-workboard-color-css' => '783cdff5', 886 886 'phui-workboard-view-css' => '3bc85455',
+27 -11
src/applications/uiexample/examples/PHUITimelineExample.php
··· 80 80 ->setTitle(pht('Minor Red Event')) 81 81 ->setColor(PhabricatorTransactions::COLOR_RED); 82 82 83 + // Pinboard!! 84 + $pin1 = id(new PHUIPinboardItemView()) 85 + ->setUser($user) 86 + ->setHeader('user0.png') 87 + ->setImageURI(celerity_get_resource_uri('/rsrc/image/people/user0.png')) 88 + ->setURI(celerity_get_resource_uri('/rsrc/image/people/user0.png')) 89 + ->setImageSize(280, 210); 90 + 91 + $pin2 = id(new PHUIPinboardItemView()) 92 + ->setUser($user) 93 + ->setHeader('user1.png') 94 + ->setImageURI(celerity_get_resource_uri('/rsrc/image/people/user1.png')) 95 + ->setURI(celerity_get_resource_uri('/rsrc/image/people/user1.png')) 96 + ->setImageSize(280, 210); 97 + 98 + $pin3 = id(new PHUIPinboardItemView()) 99 + ->setUser($user) 100 + ->setHeader('user2.png') 101 + ->setImageURI(celerity_get_resource_uri('/rsrc/image/people/user2.png')) 102 + ->setURI(celerity_get_resource_uri('/rsrc/image/people/user1.png')) 103 + ->setImageSize(280, 210); 104 + 83 105 $events[] = id(new PHUITimelineEventView()) 84 106 ->setUserHandle($handle) 85 - ->setIcon('fa-check') 86 - ->setTitle(pht('Historically Important Action')) 87 - ->setColor(PhabricatorTransactions::COLOR_BLACK) 88 - ->setReallyMajorEvent(true); 89 - 107 + ->setIcon('fa-camera-retro') 108 + ->setTitle(pht('Pinboard Image Event')) 109 + ->addPinboardItem($pin1) 110 + ->addPinboardItem($pin2) 111 + ->addPinboardItem($pin3); 90 112 91 113 $events[] = id(new PHUITimelineEventView()) 92 114 ->setUserHandle($handle) ··· 101 123 ->setTitle(str_repeat(pht('Long Text Title').' ', 64)) 102 124 ->appendChild(str_repeat(pht('Long Text Body').' ', 64)) 103 125 ->setColor(PhabricatorTransactions::COLOR_ORANGE); 104 - 105 - $events[] = id(new PHUITimelineEventView()) 106 - ->setUserHandle($handle) 107 - ->setTitle(str_repeat('LongTextEventNoSpaces', 1024)) 108 - ->appendChild(str_repeat('LongTextNoSpaces', 1024)) 109 - ->setColor(PhabricatorTransactions::COLOR_RED); 110 126 111 127 $colors = array( 112 128 PhabricatorTransactions::COLOR_RED,
+16 -1
src/view/phui/PHUITimelineEventView.php
··· 28 28 private $hideCommentOptions = false; 29 29 private $authorPHID; 30 30 private $badges = array(); 31 + private $pinboardItems = array(); 31 32 32 33 public function setAuthorPHID($author_phid) { 33 34 $this->authorPHID = $author_phid; ··· 188 189 189 190 public function getHideCommentOptions() { 190 191 return $this->hideCommentOptions; 192 + } 193 + 194 + public function addPinboardItem(PHUIPinboardItemView $item) { 195 + $this->pinboardItems[] = $item; 196 + return $this; 191 197 } 192 198 193 199 public function setToken($token, $removed = false) { ··· 441 447 ), 442 448 $content); 443 449 450 + // Image Events 451 + $pinboard = null; 452 + if ($this->pinboardItems) { 453 + $pinboard = new PHUIPinboardView(); 454 + foreach ($this->pinboardItems as $item) { 455 + $pinboard->addItem($item); 456 + } 457 + } 458 + 444 459 $content = phutil_tag( 445 460 'div', 446 461 array( 447 462 'class' => implode(' ', $content_classes), 448 463 ), 449 - array($image, $badges, $wedge, $content)); 464 + array($image, $badges, $wedge, $content, $pinboard)); 450 465 451 466 $outer_classes = $this->classes; 452 467 $outer_classes[] = 'phui-timeline-shell';
+6
webroot/rsrc/css/phui/phui-timeline-view.css
··· 429 429 .phui-comment-preview-view { 430 430 margin-bottom: 20px; 431 431 } 432 + 433 + .phui-timeline-view .phui-pinboard-view { 434 + margin: 8px 0 0 0; 435 + padding: 0; 436 + text-align: left; 437 + }