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

Diffusion commit feed: fix commit title repeated twice

Summary:
Before this change any commit in your web feed had a duplicated commit
title. Old example:

> FooBar committed REPOFOO 132abc: add documentation (authored by FooBar)
> add documentation

After this change the commit title "add documentation" is repeated only once.

| Before | After |
|---------------------|---------------------|
| {F313288,size=full} | {F313289,size=full} |

So the web feed is slimmer and less distracting, more space for more useful info.

Having a NULL body seems OK. In fact, the upstream caller already skips
body rendering in that case:

https://we.phorge.it/source/phorge/browse/master/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php;0fe0b9f681d0da79b313e0907933665930074704$157-160

P.S.

If you think it would be nice to show a second line in the body web feed,
we think so too! Look at the mentioned task and please propose that feature.
This is just an early UX fix to avoid to repeat the same info twice.

Closes T15489

Test Plan:
Before this change, look at your web feeds about commits and reproduce
the original problem.

Apply this change and restart phd and do some commits and appreciate
that you do not see anymore duplicated commit titles in each commit feed.

Your email notifications are unchanged.

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15489

Differential Revision: https://we.phorge.it/D25824

+7 -2
+7 -2
src/applications/audit/storage/PhabricatorAuditTransaction.php
··· 427 427 public function getBodyForFeed(PhabricatorFeedStory $story) { 428 428 switch ($this->getTransactionType()) { 429 429 case self::TYPE_COMMIT: 430 - $data = $this->getNewValue(); 431 - return $story->renderSummary($data['summary']); 430 + // At the moment commits have the very same title, 431 + // and the very same body in web feeds. 432 + // Maybe better to just show one of them. 433 + // https://we.phorge.it/T15489 434 + // $data = $this->getNewValue(); 435 + // return $story->renderSummary($data['summary']); 436 + return null; 432 437 } 433 438 return parent::getBodyForFeed($story); 434 439 }