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

Abbreviate author/committer in Diffusion directory views

Summary:
The tables are currently kind of wide, and the emails for
non-recognized users seem like the least useful parts, so I put them in
tooltips so they're only visible if you want them. On the other hand, it
means you can only view one at a time, and if you're on mobile you can't
see them at all. Overall, not sure whether this is a good idea.

Test Plan:
Load Diffusion pages with some recognized and some
unrecognized users. Hover over the latter and see that emails appear.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

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

+15 -2
+15 -2
src/applications/diffusion/view/DiffusionBrowseTableView.php
··· 33 33 return $this; 34 34 } 35 35 36 + private static function renderName($name) { 37 + $email = new PhutilEmailAddress($name); 38 + if ($email->getDisplayName() || $email->getDomainName()) { 39 + return phutil_render_tag( 40 + 'span', 41 + array( 42 + 'title' => $email->getAddress(), 43 + ), 44 + phutil_escape_html($email->getDisplayName())); 45 + } 46 + return phutil_escape_html($name); 47 + } 48 + 36 49 public static function renderLastModifiedColumns( 37 50 PhabricatorRepository $repository, 38 51 array $handles, ··· 58 71 if ($author_phid && isset($handles[$author_phid])) { 59 72 $author = $handles[$author_phid]->renderLink(); 60 73 } else { 61 - $author = phutil_escape_html($data->getAuthorName()); 74 + $author = self::renderName($data->getAuthorName()); 62 75 } 63 76 64 77 $committer = $data->getCommitDetail('committer'); ··· 67 80 if ($committer_phid && isset($handles[$committer_phid])) { 68 81 $committer = $handles[$committer_phid]->renderLink(); 69 82 } else { 70 - $committer = phutil_escape_html($data->getCommitDetail('committer')); 83 + $committer = self::renderName($data->getCommitDetail('committer')); 71 84 } 72 85 } else { 73 86 $committer = $author;