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

Support object mentions in Calendar Event descriptions

Summary:
Ref T7924. This:

- Adds support for remarkup block changes to Modular Transactions.
- Exposes remarkup changes from the Calendar event "Description" transaction.

This makes stuff like mentions and file embeds work properly.

Test Plan:
Mentioned a task in an event description, saw a mention appear on the task.

Uploaded a file to an event description, saw the file become "Attached" to the event.

(Neither of these worked properly before.)

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7924

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

+24
+11
src/applications/calendar/xaction/PhabricatorCalendarEventDescriptionTransaction.php
··· 39 39 ->setNewText($this->getNewValue()); 40 40 } 41 41 42 + public function newRemarkupChanges() { 43 + $changes = array(); 44 + 45 + $changes[] = $this->newRemarkupChange() 46 + ->setOldValue($this->getOldValue()) 47 + ->setNewValue($this->getNewValue()); 48 + 49 + return $changes; 50 + } 51 + 52 + 42 53 }
+4
src/applications/transactions/storage/PhabricatorModularTransaction.php
··· 149 149 return parent::renderChangeDetails($viewer); 150 150 } 151 151 152 + final protected function newRemarkupChanges() { 153 + return $this->getTransactionImplementation()->newRemarkupChanges(); 154 + } 155 + 152 156 }
+9
src/applications/transactions/storage/PhabricatorModularTransactionType.php
··· 67 67 throw new PhutilMethodNotImplementedException(); 68 68 } 69 69 70 + public function newRemarkupChanges() { 71 + return array(); 72 + } 73 + 70 74 final public function setStorage( 71 75 PhabricatorApplicationTransaction $xaction) { 72 76 $this->storage = $xaction; ··· 251 255 private function isTextMode() { 252 256 $target = $this->getStorage()->getRenderingTarget(); 253 257 return ($target == PhabricatorApplicationTransaction::TARGET_TEXT); 258 + } 259 + 260 + final protected function newRemarkupChange() { 261 + return id(new PhabricatorTransactionRemarkupChange()) 262 + ->setTransaction($this->getStorage()); 254 263 } 255 264 256 265 }