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

Forgot some things in hover card view

Summary:
Refs T1048
- Add IDs to hovercard view
- Fixed title
- Added fatal for no handle

Test Plan: Used in future diff. Verified fatal for no handle. Correct display of title and id

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1048

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

+16 -1
+16 -1
src/view/widget/hovercard/PhabricatorHovercardView.php
··· 11 11 */ 12 12 private $handle; 13 13 14 + private $id; 15 + 14 16 private $title = array(); 15 17 private $detail; 16 18 private $tags = array(); ··· 23 25 private $body; 24 26 25 27 private $color = 'grey'; 28 + 29 + public function setId($id) { 30 + $this->id = $id; 31 + return $this; 32 + } 26 33 27 34 public function setObjectHandle(PhabricatorObjectHandle $handle) { 28 35 $this->handle = $handle; ··· 67 74 } 68 75 69 76 public function render() { 77 + if (!$this->handle) { 78 + throw new Exception("Call setObjectHandle() before calling render()!"); 79 + } 80 + 70 81 $handle = $this->handle; 71 82 $user = $this->getUser(); 72 83 ··· 85 96 ), 86 97 array_interleave(' ', $this->tags)); 87 98 } 88 - $title[] = pht("%s: %s", $handle->getTypeName(), substr($type, 0, 1) . $id); 99 + 100 + $title[] = pht("%s: %s", 101 + $handle->getTypeName(), 102 + $this->title ? $this->title : substr($type, 0, 1) . $id); 89 103 90 104 $body = array(); 91 105 if ($this->detail) { ··· 163 177 return phutil_tag('div', 164 178 array( 165 179 'class' => 'phabricator-hovercard-wrapper', 180 + 'id' => $this->id, 166 181 ), 167 182 $hovercard); 168 183 }