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
Unknown Object (File)
Sat, Apr 6, 3:10 AM
Unknown Object (File)
Sat, Mar 30, 10:54 AM
Unknown Object (File)
Mar 14 2024, 4:51 AM
Unknown Object (File)
Mar 5 2024, 4:03 PM
Unknown Object (File)
Feb 9 2024, 2:19 PM
Unknown Object (File)
Feb 7 2024, 5:27 PM
Unknown Object (File)
Feb 3 2024, 12:26 AM
Unknown Object (File)
Jan 29 2024, 10:26 AM
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).