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

Implemented fallback for unimplemented notifications with silly message.

Summary:
Most notifications are not implemented, a fallback message should
be displayed for these cases.

Test Plan: Commented out renderNotificationView in PhabricatorFeedStoryManiphest and watched the notifications render.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: ddfisher, keebuhm, aran, Korvin

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

authored by

John-Ashton Allen and committed by
epriestley
1f3b058d b6955582

+22 -2
+5 -2
src/applications/feed/story/PhabricatorFeedStory.php
··· 29 29 30 30 abstract public function renderView(); 31 31 32 - // TODO: Restore this once subclasses actually implement it. 33 - // abstract public function renderNotificationView(); 32 + // TODO: Make abstract once all subclasses implement it. 33 + public function renderNotificationView() { 34 + return id(new PhabricatorFeedStoryUnknown($this->data)) 35 + ->renderNotificationView(); 36 + } 34 37 35 38 public function getRequiredHandlePHIDs() { 36 39 return array();
+17
src/applications/feed/story/PhabricatorFeedStoryUnknown.php
··· 34 34 return $view; 35 35 } 36 36 37 + public function renderNotificationView() { 38 + $data = $this->getStoryData(); 39 + 40 + $view = new PhabricatorNotificationStoryView(); 41 + 42 + $view->setTitle('A wild notifcation appeared!'); 43 + $view->setEpoch($data->getEpoch()); 44 + 45 + $view->appendChild( 46 + 'This is an unrenderable feed story of type '. 47 + '"'.phutil_escape_html($data->getStoryType()).'".'); 48 + 49 + 50 + return $view; 51 + 52 + } 53 + 37 54 }