Make Conpherence threads update in real time, very roughly

Summary:
Ref T4083. This needs some work (mostly in the Conpherence JS itself), but is sort of functional. In particular:

  - On thread pages, add the thread as a `pageObject`.
  - After updating a thread, send a new "message" event to the server.
  - Share a little more event posting code.
  - In the browser, use event dispatch to respond to events.
  - Add a listener for the new event type.
  - Update conpherence threads (this part is really yucky).

Test Plan: With multiple browser windows / browsers open, posted a message to a thread, and saw it update everywhere.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: chad, epriestley

Maniphest Tasks: T4083

Differential Revision: https://secure.phabricator.com/D9486
This commit is contained in:
epriestley
2014-06-11 13:52:15 -07:00
parent 84d259cea2
commit 4bc561f17b
9 changed files with 152 additions and 61 deletions

View File

@@ -97,6 +97,7 @@ final class ConpherenceViewController extends
array(
'title' => $title,
'device' => true,
'pageObjects' => array($conpherence->getPHID()),
));
}
@@ -156,7 +157,11 @@ final class ConpherenceViewController extends
'type' => 'hidden',
'name' => 'latest_transaction_id',
'value' => $latest_transaction_id,
'sigil' => 'latest-transaction-id'
'sigil' => 'latest-transaction-id',
'meta' => array(
'threadPHID' => $conpherence->getPHID(),
'threadID' => $conpherence->getID(),
),
),
''))
->render();