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

Group similar transaction comments in Conpherence

Summary: Adds a CSS class if comments come in from the same user in the past 2 minutes for cleaner UI. Note will have to find some better display UI when comment editing comes.

Test Plan: Test lots of random Conpherence messages with different transactions, different people, and quick commenting.

Reviewers: scp, epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+33 -3
+3 -3
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'conpherence.pkg.css' => '3f5d038e', 10 + 'conpherence.pkg.css' => '9402e1af', 11 11 'conpherence.pkg.js' => '11f3e07e', 12 12 'core.pkg.css' => '55d32e63', 13 13 'core.pkg.js' => '32939240', ··· 49 49 'rsrc/css/application/conpherence/durable-column.css' => '63114a54', 50 50 'rsrc/css/application/conpherence/header-pane.css' => '517de9fe', 51 51 'rsrc/css/application/conpherence/menu.css' => '78c7b811', 52 - 'rsrc/css/application/conpherence/message-pane.css' => 'bbbb8a9b', 52 + 'rsrc/css/application/conpherence/message-pane.css' => '0d7dff02', 53 53 'rsrc/css/application/conpherence/notification.css' => '6cdcc253', 54 54 'rsrc/css/application/conpherence/participant-pane.css' => '7bba0b56', 55 55 'rsrc/css/application/conpherence/transaction.css' => '46253e19', ··· 621 621 'conpherence-durable-column-view' => '63114a54', 622 622 'conpherence-header-pane-css' => '517de9fe', 623 623 'conpherence-menu-css' => '78c7b811', 624 - 'conpherence-message-pane-css' => 'bbbb8a9b', 624 + 'conpherence-message-pane-css' => '0d7dff02', 625 625 'conpherence-notification-css' => '6cdcc253', 626 626 'conpherence-participant-pane-css' => '7bba0b56', 627 627 'conpherence-thread-manager' => '01774ab2',
+20
src/applications/conpherence/ConpherenceTransactionRenderer.php
··· 78 78 ->setFullDisplay($full_display); 79 79 80 80 foreach ($transactions as $transaction) { 81 + $collapsed = false; 81 82 if ($previous_transaction) { 82 83 $previous_day = phabricator_format_local_time( 83 84 $previous_transaction->getDateCreated(), ··· 87 88 $transaction->getDateCreated(), 88 89 $user, 89 90 'Ymd'); 91 + 92 + // See if same user / time 93 + $previous_author = $previous_transaction->getAuthorPHID(); 94 + $current_author = $transaction->getAuthorPHID(); 95 + $previous_time = $previous_transaction->getDateCreated(); 96 + $current_time = $transaction->getDateCreated(); 97 + $previous_type = $previous_transaction->getTransactionType(); 98 + $current_type = $transaction->getTransactionType(); 99 + if (($previous_author == $current_author) && 100 + ($previous_type == $current_type)) { 101 + // Group messages within the last x seconds 102 + if (($current_time - $previous_time) < 120) { 103 + $collapsed = true; 104 + } 105 + } 106 + 90 107 // date marker transaction time! 91 108 if ($previous_day != $current_day) { 92 109 $date_marker_transaction->setDateCreated( ··· 97 114 } 98 115 $transaction_view = id(clone $transaction_view_template) 99 116 ->setConpherenceTransaction($transaction); 117 + if ($collapsed) { 118 + $transaction_view->addClass('conpherence-transaction-collapsed'); 119 + } 100 120 101 121 $rendered_transactions[] = $transaction_view->render(); 102 122 $previous_transaction = $transaction;
+10
webroot/rsrc/css/application/conpherence/message-pane.css
··· 390 390 max-height: 200px; 391 391 } 392 392 393 + .conpherence-transaction-collapsed .conpherence-transaction-image, 394 + .conpherence-transaction-collapsed .conpherence-transaction-header { 395 + display: none; 396 + } 397 + 398 + .conpherence-message-pane 399 + .conpherence-transaction-collapsed.conpherence-transaction-view { 400 + margin-top: 0; 401 + margin-bottom: 0; 402 + }