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

T6895, Comment edit history should not provide action dropdown for transactions.

Summary: Fixes T6895, When viewing comment edit history, user should not see a dropdown for each comment edit transaction.

Test Plan: Edit task comment, view comment edit history, comment transactions should not provide a dropdown with action items.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6895

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

authored by

lkassianik and committed by
epriestley
98ec225c fa47c269

+25 -3
+2 -1
src/applications/transactions/controller/PhabricatorApplicationTransactionCommentHistoryController.php
··· 68 68 ->setUser($user) 69 69 ->setObjectPHID($obj_phid) 70 70 ->setTransactions($xactions) 71 - ->setShowEditActions(false); 71 + ->setShowEditActions(false) 72 + ->setHideCommentOptions(true); 72 73 73 74 $dialog = id(new AphrontDialogView()) 74 75 ->setUser($user)
+12 -1
src/applications/transactions/view/PhabricatorApplicationTransactionView.php
··· 16 16 private $pager; 17 17 private $renderAsFeed; 18 18 private $renderData = array(); 19 + private $hideCommentOptions = false; 19 20 20 21 public function setRenderAsFeed($feed) { 21 22 $this->renderAsFeed = $feed; ··· 105 106 106 107 public function getRenderData() { 107 108 return $this->renderData; 109 + } 110 + 111 + public function setHideCommentOptions($hide_comment_options) { 112 + $this->hideCommentOptions = $hide_comment_options; 113 + return $this; 114 + } 115 + 116 + public function getHideCommentOptions() { 117 + return $this->hideCommentOptions; 108 118 } 109 119 110 120 public function buildEvents($with_hiding = false) { ··· 388 398 ->setTransactionPHID($xaction->getPHID()) 389 399 ->setUserHandle($xaction->getHandle($xaction->getAuthorPHID())) 390 400 ->setIcon($xaction->getIcon()) 391 - ->setColor($xaction->getColor()); 401 + ->setColor($xaction->getColor()) 402 + ->setHideCommentOptions($this->getHideCommentOptions()); 392 403 393 404 list($token, $token_removed) = $xaction->getToken(); 394 405 if ($token) {
+11 -1
src/view/phui/PHUITimelineEventView.php
··· 25 25 private $isNormalComment; 26 26 private $quoteRef; 27 27 private $reallyMajorEvent; 28 + private $hideCommentOptions = false; 28 29 29 30 public function setQuoteRef($quote_ref) { 30 31 $this->quoteRef = $quote_ref; ··· 164 165 return $this; 165 166 } 166 167 168 + public function setHideCommentOptions($hide_comment_options) { 169 + $this->hideCommentOptions = $hide_comment_options; 170 + return $this; 171 + } 172 + 173 + public function getHideCommentOptions() { 174 + return $this->hideCommentOptions; 175 + } 176 + 167 177 public function setToken($token, $removed = false) { 168 178 $this->token = $token; 169 179 $this->tokenRemoved = $removed; ··· 259 269 $menu = null; 260 270 $items = array(); 261 271 $has_menu = false; 262 - if (!$this->getIsPreview()) { 272 + if (!$this->getIsPreview() && !$this->getHideCommentOptions()) { 263 273 foreach ($this->getEventGroup() as $event) { 264 274 $items[] = $event->getMenuItems($this->anchor); 265 275 if ($event->hasChildren()) {