Page MenuHomePhabricator

D16632.id40039.diff
No OneTemporary

D16632.id40039.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
*/
return array(
'names' => array(
- 'conpherence.pkg.css' => '3f5d038e',
+ 'conpherence.pkg.css' => '9402e1af',
'conpherence.pkg.js' => '11f3e07e',
'core.pkg.css' => '55d32e63',
'core.pkg.js' => '32939240',
@@ -49,7 +49,7 @@
'rsrc/css/application/conpherence/durable-column.css' => '63114a54',
'rsrc/css/application/conpherence/header-pane.css' => '517de9fe',
'rsrc/css/application/conpherence/menu.css' => '78c7b811',
- 'rsrc/css/application/conpherence/message-pane.css' => 'bbbb8a9b',
+ 'rsrc/css/application/conpherence/message-pane.css' => '0d7dff02',
'rsrc/css/application/conpherence/notification.css' => '6cdcc253',
'rsrc/css/application/conpherence/participant-pane.css' => '7bba0b56',
'rsrc/css/application/conpherence/transaction.css' => '46253e19',
@@ -621,7 +621,7 @@
'conpherence-durable-column-view' => '63114a54',
'conpherence-header-pane-css' => '517de9fe',
'conpherence-menu-css' => '78c7b811',
- 'conpherence-message-pane-css' => 'bbbb8a9b',
+ 'conpherence-message-pane-css' => '0d7dff02',
'conpherence-notification-css' => '6cdcc253',
'conpherence-participant-pane-css' => '7bba0b56',
'conpherence-thread-manager' => '01774ab2',
diff --git a/src/applications/conpherence/ConpherenceTransactionRenderer.php b/src/applications/conpherence/ConpherenceTransactionRenderer.php
--- a/src/applications/conpherence/ConpherenceTransactionRenderer.php
+++ b/src/applications/conpherence/ConpherenceTransactionRenderer.php
@@ -78,6 +78,7 @@
->setFullDisplay($full_display);
foreach ($transactions as $transaction) {
+ $collapsed = false;
if ($previous_transaction) {
$previous_day = phabricator_format_local_time(
$previous_transaction->getDateCreated(),
@@ -87,6 +88,22 @@
$transaction->getDateCreated(),
$user,
'Ymd');
+
+ // See if same user / time
+ $previous_author = $previous_transaction->getAuthorPHID();
+ $current_author = $transaction->getAuthorPHID();
+ $previous_time = $previous_transaction->getDateCreated();
+ $current_time = $transaction->getDateCreated();
+ $previous_type = $previous_transaction->getTransactionType();
+ $current_type = $transaction->getTransactionType();
+ if (($previous_author == $current_author) &&
+ ($previous_type == $current_type)) {
+ // Group messages within the last x seconds
+ if (($current_time - $previous_time) < 120) {
+ $collapsed = true;
+ }
+ }
+
// date marker transaction time!
if ($previous_day != $current_day) {
$date_marker_transaction->setDateCreated(
@@ -97,6 +114,9 @@
}
$transaction_view = id(clone $transaction_view_template)
->setConpherenceTransaction($transaction);
+ if ($collapsed) {
+ $transaction_view->addClass('conpherence-transaction-collapsed');
+ }
$rendered_transactions[] = $transaction_view->render();
$previous_transaction = $transaction;
diff --git a/webroot/rsrc/css/application/conpherence/message-pane.css b/webroot/rsrc/css/application/conpherence/message-pane.css
--- a/webroot/rsrc/css/application/conpherence/message-pane.css
+++ b/webroot/rsrc/css/application/conpherence/message-pane.css
@@ -390,3 +390,13 @@
max-height: 200px;
}
+.conpherence-transaction-collapsed .conpherence-transaction-image,
+.conpherence-transaction-collapsed .conpherence-transaction-header {
+ display: none;
+}
+
+.conpherence-message-pane
+ .conpherence-transaction-collapsed.conpherence-transaction-view {
+ margin-top: 0;
+ margin-bottom: 0;
+}

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 27, 11:20 AM (3 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7223264
Default Alt Text
D16632.id40039.diff (3 KB)

Event Timeline