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

Changing criteria for showing badges in object timeline view

Summary: Ref T8941

Test Plan: Create an object and create multiple transactions, some time apart to ensure that time clumping isn't interfering. Make sure that events that are large enough to have a dropdown menu show badges under author pic.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T8941

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

+6 -7
+4 -1
src/view/phui/PHUITimelineEventView.php
··· 342 342 // Render "extra" information (timestamp, etc). 343 343 $extra = $this->renderExtra($events); 344 344 345 + $show_badges = false; 346 + 345 347 $group_titles = array(); 346 348 $group_items = array(); 347 349 $group_children = array(); ··· 358 360 359 361 if ($event->hasChildren()) { 360 362 $group_children[] = $event->renderChildren(); 363 + $show_badges = true; 361 364 } 362 365 } 363 366 ··· 382 385 'href' => $this->userHandle->getURI(), 383 386 ), 384 387 ''); 385 - if ($this->badges) { 388 + if ($this->badges && $show_badges) { 386 389 $flex = new PHUIBadgeBoxView(); 387 390 $flex->addItems($this->badges); 388 391 $flex->setCollapsed(true);
+2 -6
src/view/phui/PHUITimelineView.php
··· 224 224 225 225 $user_phids = array(); 226 226 foreach ($events as $key => $event) { 227 - if (!$event->hasChildren()) { 228 - // This is a minor event, so we don't have space to show badges. 229 - unset($events[$key]); 230 - continue; 231 - } 232 - 233 227 $author_phid = $event->getAuthorPHID(); 234 228 if (!$author_phid) { 235 229 unset($events[$key]); ··· 259 253 $awards = mgroup($awards, 'getRecipientPHID'); 260 254 261 255 foreach ($events as $event) { 256 + 262 257 $author_awards = idx($awards, $event->getAuthorPHID(), array()); 258 + 263 259 $badges = array(); 264 260 foreach ($author_awards as $award) { 265 261 $badge = $award->getBadge();