Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15415141
D12037.id28973.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
10 KB
Referenced Files
None
Subscribers
None
D12037.id28973.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -44,7 +44,7 @@
'rsrc/css/application/config/config-welcome.css' => '6abd79be',
'rsrc/css/application/config/setup-issue.css' => '22270af2',
'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2',
- 'rsrc/css/application/conpherence/durable-column.css' => '9207426d',
+ 'rsrc/css/application/conpherence/durable-column.css' => '9275e4a3',
'rsrc/css/application/conpherence/menu.css' => 'c6ac5299',
'rsrc/css/application/conpherence/message-pane.css' => '5930260a',
'rsrc/css/application/conpherence/notification.css' => '04a6e10a',
@@ -351,9 +351,9 @@
'rsrc/js/application/aphlict/behavior-aphlict-status.js' => 'ea681761',
'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18',
'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de',
- 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '11e2dcf2',
- 'rsrc/js/application/conpherence/behavior-durable-column.js' => '5fc7fac0',
- 'rsrc/js/application/conpherence/behavior-menu.js' => '6bc52765',
+ 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => 'efef202b',
+ 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'd8dab826',
+ 'rsrc/js/application/conpherence/behavior-menu.js' => 'e476c952',
'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861',
'rsrc/js/application/conpherence/behavior-widget-pane.js' => '2c1cd7f5',
'rsrc/js/application/countdown/timer.js' => 'e4cc26b3',
@@ -513,11 +513,11 @@
'changeset-view-manager' => '88be0133',
'config-options-css' => '7fedf08b',
'config-welcome-css' => '6abd79be',
- 'conpherence-durable-column-view' => '9207426d',
+ 'conpherence-durable-column-view' => '9275e4a3',
'conpherence-menu-css' => 'c6ac5299',
'conpherence-message-pane-css' => '5930260a',
'conpherence-notification-css' => '04a6e10a',
- 'conpherence-thread-manager' => '11e2dcf2',
+ 'conpherence-thread-manager' => 'efef202b',
'conpherence-update-css' => '1099a660',
'conpherence-widget-pane-css' => '3d575438',
'differential-changeset-view-css' => '6a8b172a',
@@ -557,7 +557,7 @@
'javelin-behavior-boards-dropdown' => '0ec56e1d',
'javelin-behavior-choose-control' => '6153c708',
'javelin-behavior-config-reorder-fields' => '14a827de',
- 'javelin-behavior-conpherence-menu' => '6bc52765',
+ 'javelin-behavior-conpherence-menu' => 'e476c952',
'javelin-behavior-conpherence-pontificate' => '21ba5861',
'javelin-behavior-conpherence-widget-pane' => '2c1cd7f5',
'javelin-behavior-countdown-timer' => 'e4cc26b3',
@@ -584,7 +584,7 @@
'javelin-behavior-diffusion-locate-file' => '6d3e1947',
'javelin-behavior-diffusion-pull-lastmodified' => '2b228192',
'javelin-behavior-doorkeeper-tag' => 'e5822781',
- 'javelin-behavior-durable-column' => '5fc7fac0',
+ 'javelin-behavior-durable-column' => 'd8dab826',
'javelin-behavior-error-log' => '6882e80a',
'javelin-behavior-fancy-datepicker' => 'c51ae228',
'javelin-behavior-global-drag-and-drop' => '07f199d8',
@@ -899,16 +899,6 @@
'javelin-install',
'javelin-util',
),
- '11e2dcf2' => array(
- 'javelin-dom',
- 'javelin-util',
- 'javelin-stratcom',
- 'javelin-install',
- 'javelin-workflow',
- 'javelin-router',
- 'javelin-behavior-device',
- 'javelin-vector',
- ),
'13c739ea' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -1219,15 +1209,6 @@
'javelin-dom',
'javelin-vector',
),
- '5fc7fac0' => array(
- 'javelin-behavior',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-scrollbar',
- 'javelin-quicksand',
- 'phabricator-keyboard-shortcut',
- 'conpherence-thread-manager',
- ),
'5fefb143' => array(
'javelin-behavior',
'javelin-dom',
@@ -1268,18 +1249,6 @@
'69adf288' => array(
'javelin-install',
),
- '6bc52765' => array(
- 'javelin-behavior',
- 'javelin-dom',
- 'javelin-util',
- 'javelin-stratcom',
- 'javelin-workflow',
- 'javelin-behavior-device',
- 'javelin-history',
- 'javelin-vector',
- 'phabricator-shaped-request',
- 'conpherence-thread-manager',
- ),
'6c2b09a2' => array(
'javelin-install',
'javelin-util',
@@ -1811,6 +1780,15 @@
'javelin-util',
'phabricator-shaped-request',
),
+ 'd8dab826' => array(
+ 'javelin-behavior',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-scrollbar',
+ 'javelin-quicksand',
+ 'phabricator-keyboard-shortcut',
+ 'conpherence-thread-manager',
+ ),
'dbbf48b6' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -1860,6 +1838,18 @@
'javelin-dom',
'javelin-uri',
),
+ 'e476c952' => array(
+ 'javelin-behavior',
+ 'javelin-dom',
+ 'javelin-util',
+ 'javelin-stratcom',
+ 'javelin-workflow',
+ 'javelin-behavior-device',
+ 'javelin-history',
+ 'javelin-vector',
+ 'phabricator-shaped-request',
+ 'conpherence-thread-manager',
+ ),
'e4cc26b3' => array(
'javelin-behavior',
'javelin-dom',
@@ -1907,6 +1897,16 @@
'javelin-install',
'javelin-util',
),
+ 'efef202b' => array(
+ 'javelin-dom',
+ 'javelin-util',
+ 'javelin-stratcom',
+ 'javelin-install',
+ 'javelin-workflow',
+ 'javelin-router',
+ 'javelin-behavior-device',
+ 'javelin-vector',
+ ),
'f24f3253' => array(
'javelin-behavior',
'javelin-dom',
diff --git a/src/applications/conpherence/controller/ConpherenceColumnViewController.php b/src/applications/conpherence/controller/ConpherenceColumnViewController.php
--- a/src/applications/conpherence/controller/ConpherenceColumnViewController.php
+++ b/src/applications/conpherence/controller/ConpherenceColumnViewController.php
@@ -6,6 +6,24 @@
public function handleRequest(AphrontRequest $request) {
$user = $request->getUser();
+ $latest_conpherences = array();
+ $latest_participant = id(new ConpherenceParticipantQuery())
+ ->withParticipantPHIDs(array($user->getPHID()))
+ ->setLimit(6)
+ ->execute();
+ if ($latest_participant) {
+ $conpherence_phids = mpull($latest_participant, 'getConpherencePHID');
+ $latest_conpherences = id(new ConpherenceThreadQuery())
+ ->setViewer($user)
+ ->withPHIDs($conpherence_phids)
+ ->needParticipantCache(true)
+ ->execute();
+ $latest_conpherences = mpull($latest_conpherences, null, 'getPHID');
+ $latest_conpherences = array_select_keys(
+ $latest_conpherences,
+ $conpherence_phids);
+ }
+
$conpherence = null;
if ($request->getInt('id')) {
$conpherence = id(new ConpherenceThreadQuery())
@@ -14,13 +32,7 @@
->needTransactions(true)
->setTransactionLimit(ConpherenceThreadQuery::TRANSACTION_LIMIT)
->executeOne();
- } else {
- // TODO - should be pulling more data than this to build the
- // icon bar, etc, kind of always
- $latest_participant = id(new ConpherenceParticipantQuery())
- ->withParticipantPHIDs(array($user->getPHID()))
- ->setLimit(1)
- ->execute();
+ } else if ($latest_participant) {
$participant = head($latest_participant);
$conpherence = id(new ConpherenceThreadQuery())
->setViewer($user)
@@ -45,6 +57,7 @@
$durable_column = id(new ConpherenceDurableColumnView())
->setUser($user)
->setSelectedConpherence($conpherence)
+ ->setConpherences($latest_conpherences)
->setStyle(null);
$response = array(
diff --git a/src/applications/conpherence/view/ConpherenceDurableColumnView.php b/src/applications/conpherence/view/ConpherenceDurableColumnView.php
--- a/src/applications/conpherence/view/ConpherenceDurableColumnView.php
+++ b/src/applications/conpherence/view/ConpherenceDurableColumnView.php
@@ -129,7 +129,36 @@
}
private function buildIconBar() {
- return null;
+ $icons = array();
+ $selected_conpherence = $this->getSelectedConpherence();
+ $conpherences = $this->getConpherences();
+
+ foreach ($conpherences as $conpherence) {
+ $classes = array('conpherence-durable-column-thread-icon');
+ if ($selected_conpherence->getID() == $conpherence->getID()) {
+ $classes[] = 'selected';
+ }
+ $data = $conpherence->getDisplayData($this->getUser());
+ $image = $data['image'];
+ $icons[] =
+ javelin_tag(
+ 'a',
+ array(
+ 'href' => '/conpherence/columnview/',
+ 'class' => implode(' ', $classes),
+ 'sigil' => 'conpherence-durable-column-thread-icon',
+ 'meta' => array(
+ 'threadID' => $conpherence->getID(),
+ ),
+ ),
+ phutil_tag(
+ 'span',
+ array(
+ 'style' => 'background-image: url('.$image.')',
+ ),
+ ''));
+ }
+ return $icons;
}
private function buildHeader() {
diff --git a/webroot/rsrc/css/application/conpherence/durable-column.css b/webroot/rsrc/css/application/conpherence/durable-column.css
--- a/webroot/rsrc/css/application/conpherence/durable-column.css
+++ b/webroot/rsrc/css/application/conpherence/durable-column.css
@@ -55,10 +55,36 @@
.conpherence-durable-column-icon-bar {
height: 34px;
- padding: 5px 16px;
+ padding: 5px 12px;
border-bottom: 1px solid {$thinblueborder};
}
+.conpherence-durable-column-icon-bar .conpherence-durable-column-thread-icon {
+ float: left;
+ display: block;
+ width: 30px;
+ height: 30px;
+ margin: 0px 8px 0px 0px;
+ border: 2px solid transparent;
+ border-radius: 3px;
+}
+
+.conpherence-durable-column-icon-bar
+.conpherence-durable-column-thread-icon.selected {
+ border-color: {$blueborder};
+}
+
+.conpherence-durable-column-icon-bar
+.conpherence-durable-column-thread-icon span {
+ position: relative;
+ display: block;
+ width: 26px;
+ height: 26px;
+ top: 2px;
+ left: 2px;
+ background-size: 26px 26px;
+}
+
.conpherence-durable-column-body {
position: absolute;
top: 44px;
diff --git a/webroot/rsrc/js/application/conpherence/behavior-durable-column.js b/webroot/rsrc/js/application/conpherence/behavior-durable-column.js
--- a/webroot/rsrc/js/application/conpherence/behavior-durable-column.js
+++ b/webroot/rsrc/js/application/conpherence/behavior-durable-column.js
@@ -141,6 +141,15 @@
}
});
+ JX.Stratcom.listen(
+ 'click',
+ 'conpherence-durable-column-thread-icon',
+ function (e) {
+ e.kill();
+ var data = e.getNodeData('conpherence-durable-column-thread-icon');
+ threadManager.loadThreadByID(data.threadID);
+ });
+
function _getColumnBodyNode() {
var column = JX.$('conpherence-durable-column');
return JX.DOM.find(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 21, 4:18 AM (2 w, 22 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7714958
Default Alt Text
D12037.id28973.diff (10 KB)
Attached To
Mode
D12037: Conpherence - add icon-based room switcher to durable column view
Attached
Detach File
Event Timeline
Log In to Comment