Page MenuHomePhabricator

Make Conpherence threads update in real time, very roughly
ClosedPublic

Authored by epriestley on Jun 11 2014, 8:29 PM.
Tags
None
Referenced Files
F14476123: D9486.id.diff
Sat, Dec 28, 12:06 AM
Unknown Object (File)
Tue, Dec 24, 2:52 AM
Unknown Object (File)
Thu, Dec 19, 12:45 AM
Unknown Object (File)
Mon, Dec 9, 3:45 PM
Unknown Object (File)
Fri, Nov 29, 8:53 PM
Unknown Object (File)
Fri, Nov 29, 8:53 PM
Unknown Object (File)
Fri, Nov 29, 8:53 PM
Unknown Object (File)
Fri, Nov 29, 12:29 PM
Subscribers

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Make Conpherence threads update in real time, very roughly.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: joshuaspence.
src/applications/conpherence/controller/ConpherenceViewController.php
100

This works differentally from regular notifications I think... Is that intentional? Regular notifications are based on subscriptions rather than pageObjects.

src/applications/notification/client/PhabricatorNotificationClient.php
36

It might be useful to log stuff here... even if we want to ignore the exception.

src/applications/conpherence/controller/ConpherenceViewController.php
100

The normal "This object has been updated, click to reload." special notifications are based on pageObjects. This is more similar to those -- for now, I only want a user to receive these updates if they have the thread open in a browser window.

(Eventually we could send them to all thread participants and make the UI fancier, but this is rough as-is without trying to get crazy.)

So, it's intentional that the thread PHID being open in a browser window (not the user's participation in a thread) is used to figure out whether you get a notification or not.

src/applications/notification/client/PhabricatorNotificationClient.php
36

I'll fix this.

  • Slightly simpler logic for posting updates.
  • Log exceptions.
  • Remove a stray JX.log().
This revision is now accepted and ready to land.Jun 11 2014, 8:46 PM
epriestley updated this revision to Diff 22710.

Closed by commit rP4bc561f17bc8 (authored by @epriestley).