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

Remove the "authored" subheader from commits

Summary:
Ref T13552. I'm trying to reduce the number of direct callers to commit authorship metadata. This header seems low-value enough to simply remove; this information is shown more clearly and prominently in the "Provenance" UI.

In particular, commits have multiple dates (authored, committed, pushed) but this header shows only one. It currently shows the author identity and the commit date, which isn't entirely correct. And it potentially uses an "Identity" as a timeline actor, which is conceptually fine but not entirely firm ground.

Test Plan: Viewed a commit, saw no more subheader.

Maniphest Tasks: T13552

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

-48
-48
src/applications/diffusion/controller/DiffusionCommitController.php
··· 183 183 } 184 184 185 185 $curtain = $this->buildCurtain($commit, $repository); 186 - $subheader = $this->buildSubheaderView($commit, $commit_data); 187 186 $details = $this->buildPropertyListView( 188 187 $commit, 189 188 $commit_data, ··· 483 482 484 483 $view = id(new PHUITwoColumnView()) 485 484 ->setHeader($header) 486 - ->setSubheader($subheader) 487 485 ->setCurtain($curtain) 488 486 ->setMainColumn( 489 487 array( ··· 758 756 } 759 757 760 758 return $view; 761 - } 762 - 763 - private function buildSubheaderView( 764 - PhabricatorRepositoryCommit $commit, 765 - PhabricatorRepositoryCommitData $data) { 766 - 767 - $viewer = $this->getViewer(); 768 - $drequest = $this->getDiffusionRequest(); 769 - $repository = $drequest->getRepository(); 770 - 771 - if ($repository->isSVN()) { 772 - return null; 773 - } 774 - 775 - $author_phid = $commit->getAuthorDisplayPHID(); 776 - $author_name = $data->getAuthorName(); 777 - $author_epoch = $data->getCommitDetail('authorEpoch'); 778 - $date = null; 779 - if ($author_epoch !== null) { 780 - $date = phabricator_datetime($author_epoch, $viewer); 781 - } 782 - 783 - if ($author_phid) { 784 - $handles = $viewer->loadHandles(array($author_phid)); 785 - $image_uri = $handles[$author_phid]->getImageURI(); 786 - $image_href = $handles[$author_phid]->getURI(); 787 - $author = $handles[$author_phid]->renderLink(); 788 - } else if (strlen($author_name)) { 789 - $author = $author_name; 790 - $image_uri = null; 791 - $image_href = null; 792 - } else { 793 - return null; 794 - } 795 - 796 - $author = phutil_tag('strong', array(), $author); 797 - if ($date) { 798 - $content = pht('Authored by %s on %s.', $author, $date); 799 - } else { 800 - $content = pht('Authored by %s.', $author); 801 - } 802 - 803 - return id(new PHUIHeadThingView()) 804 - ->setImage($image_uri) 805 - ->setImageHref($image_href) 806 - ->setContent($content); 807 759 } 808 760 809 761 private function buildComments(PhabricatorRepositoryCommit $commit) {