Page MenuHomePhabricator

Quicksand - make notification and message counts update as you navigate around
ClosedPublic

Authored by btrahan on Apr 21 2015, 10:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 10:50 PM
Unknown Object (File)
Mon, Apr 22, 1:34 AM
Unknown Object (File)
Sat, Apr 20, 10:33 AM
Unknown Object (File)
Sat, Apr 20, 10:33 AM
Unknown Object (File)
Sat, Apr 20, 10:33 AM
Unknown Object (File)
Sat, Apr 20, 10:19 AM
Unknown Object (File)
Sat, Apr 20, 9:53 AM
Unknown Object (File)
Thu, Apr 11, 7:24 PM
Subscribers

Details

Summary

Ref T7573. Unify code to fetch these counts and do some light formatting since we're going to need to do the same thing for some conpherence-specific ajax in the durable column (See T7708).

Test Plan

loaded up two tabs, one with a durable column on and one without. in the without browser, i read some messages, decrementing my unread count. when i navigated again in the durable column browser, the count updated correctly. with no notifications, commented on a task with another user to get a notification and it showed up properly. visited the task by clicking not the notification and the bubble count decremented correctly

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Quicksand - make notification and message counts update as you navigate around.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
src/applications/aphlict/query/AphlictDropdownDataQuery.php
7

will lose the needContent thing; thought I needed it but didn't

webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js
34

this bit can probably be safely removed

Possible inline issue / possible fix? Maybe I'm misreading or misremembering.

webroot/rsrc/externals/javelin/lib/Quicksand.js
147

I think this is wrong or misleading. This won't get set when you press "back", only when you navigate forward after pressing back. So I think events with "backNav" set are actually forward navigation events following back-navigation events.

195

It might be cleaner to pass some fresh (or whatever) flag here, and then pass isFresh on the event, to indicate that the data is fresh from the server.

In particular, even if backNav is accurate, we don't want to update when the user presses "Forward" after pressing "Back" -- only when we get fresh new data from the server.

btrahan edited edge metadata.

address feedback

epriestley edited edge metadata.

Cool, the rest of this looks good to me.

This is a sort of interesting example of T7447, too -- the ghosts are detached from their original context, and there's pretty much nowhere we could put them to make them work better, but it doesn't feel too confusing to me. However, this has like 4 comments and they were all written in the last 10 minutes so they're fresh in my memory, I'm not sure if it's good enough to do well in that easy case.

This revision is now accepted and ready to land.Apr 21 2015, 10:44 PM
This revision was automatically updated to reflect the committed changes.