mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 02:42:40 +01:00
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
This commit is contained in:
parent
85f51c5430
commit
9acdd88893
1 changed files with 7 additions and 2 deletions
|
@ -427,8 +427,13 @@ final class PhabricatorAuditTransaction
|
||||||
public function getBodyForFeed(PhabricatorFeedStory $story) {
|
public function getBodyForFeed(PhabricatorFeedStory $story) {
|
||||||
switch ($this->getTransactionType()) {
|
switch ($this->getTransactionType()) {
|
||||||
case self::TYPE_COMMIT:
|
case self::TYPE_COMMIT:
|
||||||
$data = $this->getNewValue();
|
// At the moment commits have the very same title,
|
||||||
return $story->renderSummary($data['summary']);
|
// and the very same body in web feeds.
|
||||||
|
// Maybe better to just show one of them.
|
||||||
|
// https://we.phorge.it/T15489
|
||||||
|
// $data = $this->getNewValue();
|
||||||
|
// return $story->renderSummary($data['summary']);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
return parent::getBodyForFeed($story);
|
return parent::getBodyForFeed($story);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue