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

Fix some small notification / token issues

Summary:
Fixes T3218.

- Currently, Paste pages don't clear notifications about the paste (notably, token notifications).
- Currently, Paste pages don't show tooltips on tokens.
- `buildApplicationPage()` stopped respecting `pageObjects` (which controls whether "this page has been updated" is shown). Restore that.
- Make `pageObjects` imply "clear notifications on this stuff".

Test Plan: Viewed a tokened Paste. Verified it cleared the notification and hovering over a token showed a tip.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3218

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

+16 -11
+12 -1
src/applications/base/controller/PhabricatorController.php
··· 166 166 $view = $nav; 167 167 } 168 168 169 - $view->setUser($this->getRequest()->getUser()); 169 + $user = $this->getRequest()->getUser(); 170 + $view->setUser($user); 170 171 171 172 $page->appendChild($view); 173 + 174 + $object_phids = idx($options, 'pageObjects', array()); 175 + if ($object_phids) { 176 + $page->appendPageObjects($object_phids); 177 + foreach ($object_phids as $object_phid) { 178 + PhabricatorFeedStoryNotification::updateObjectNotificationViews( 179 + $user, 180 + $object_phid); 181 + } 182 + } 172 183 173 184 if (idx($options, 'device')) { 174 185 $page->setDeviceReady(true);
+1 -3
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 398 398 $page_pane->appendChild($comment_form->render()); 399 399 } 400 400 401 - PhabricatorFeedStoryNotification::updateObjectNotificationViews( 402 - $user, $revision->getPHID()); 403 - 404 401 $object_id = 'D'.$revision->getID(); 405 402 406 403 $top_anchor = id(new PhabricatorAnchorView()) ··· 445 442 $content, 446 443 array( 447 444 'title' => $object_id.' '.$revision->getTitle(), 445 + 'pageObjects' => array($revision->getPHID()), 448 446 )); 449 447 } 450 448
-3
src/applications/maniphest/controller/ManiphestTaskDetailController.php
··· 331 331 $transaction_view->setAuxiliaryFields($aux_fields); 332 332 $transaction_view->setMarkupEngine($engine); 333 333 334 - PhabricatorFeedStoryNotification::updateObjectNotificationViews( 335 - $user, $task->getPHID()); 336 - 337 334 $object_name = 'T'.$task->getID(); 338 335 $actions = $this->buildActionView($task); 339 336
+1
src/applications/paste/controller/PhabricatorPasteViewController.php
··· 70 70 array( 71 71 'title' => $paste->getFullName(), 72 72 'device' => true, 73 + 'pageObjects' => array($paste->getPHID()), 73 74 )); 74 75 } 75 76
-4
src/applications/pholio/controller/PholioMockViewController.php
··· 101 101 $add_comment, 102 102 ); 103 103 104 - PhabricatorFeedStoryNotification::updateObjectNotificationViews( 105 - $user, 106 - $mock->getPHID()); 107 - 108 104 return $this->buildApplicationPage( 109 105 $content, 110 106 array(
+2
src/applications/tokens/event/PhabricatorTokenUIEventListener.php
··· 96 96 ->setViewer($user) 97 97 ->loadHandles(); 98 98 99 + Javelin::initBehavior('phabricator-tooltips'); 100 + 99 101 $list = array(); 100 102 foreach ($tokens_given as $token_given) { 101 103 if (!idx($tokens, $token_given->getTokenPHID())) {