Page MenuHomePhabricator

Quicksand - provide some plumbing for fancier updates
ClosedPublic

Authored by btrahan on Apr 17 2015, 7:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 7:03 AM
Unknown Object (File)
Mon, Dec 16, 7:03 AM
Unknown Object (File)
Mon, Dec 16, 7:03 AM
Unknown Object (File)
Mon, Dec 16, 7:03 AM
Unknown Object (File)
Mon, Dec 16, 7:02 AM
Unknown Object (File)
Wed, Dec 11, 10:32 PM
Unknown Object (File)
Sun, Dec 8, 2:05 PM
Unknown Object (File)
Wed, Dec 4, 8:10 AM
Subscribers

Details

Summary

Ref D12448. Ref T7573. This changes quicksand up a bit so rather than caching just rendered HTML we also cache the initial response from the server. We also fire off a quicksand-redraw event which will let things like the page objects for notifications update correctly while using Quicksand (see D12448).

Test Plan

loaded up /p/btrahan/ Clicked the UI elements to navigate to various profile views up to maniphest. clicked back until back at /p/btrahan/ and it worked. clicked forward until all the way back to maniphest and it worked. clicked back 2x, then clicked new links, then back and it worked

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Quicksand - provide some plumbing for fancier updates.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.

I think this is over-rendering, see inline...

src/view/page/PhabricatorStandardPageView.php
413

This renders a second copy of the entire page, right?

I think we maybe need something like buildQuicksandConfig(), and then renderForQuicksand() does this:

return array(
   'content' => $whatever,
 ) + $this->buildQuicksandConfig();

We'll later just pull the content out of the DOM, effectively, so we don't need to ship a second copy down on the initial request.

yeah, sounds right. caught another inline too.

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

this should be moved to below the invoke

btrahan edited edge metadata.

changes as discussed plus

  • wrapper function to make sure JX.History getting consistently called too
  • rebase

One inline, does it actually work properly?

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

We did not call "JX.History.push()" here before, but now we do. I'd expect this to cause a phantom entry in the history -- you'd have to press "back" twice to get off the page. No?

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

After further testing, yeah that's true. Doh. I'll revert that bit.

I'm trying to resolve an issue that doesn't reproduce in Safari but does reproduce in Chrome / Firefox on my Mac.

  • visit a profile with a "clean" browser load and the durable column open
  • click feed
  • click calendar
  • click back (feed)
  • click back (should be profile; is stuck on feed)
  • click back again if possible (should be whatever; is stuck on feed)

revert efforts to set JX.History consistently as initial entry creates phantom entry

epriestley edited edge metadata.
This revision is now accepted and ready to land.Apr 20 2015, 10:43 PM

I'll see if I can reproduce that, sounds spooky. No idea what might be doing it offhand.

This revision was automatically updated to reflect the committed changes.

I'll see if I can reproduce that, sounds spooky. No idea what might be doing it offhand.

Its very spooky. If you start at the home page and click to the profile things work fine. Have to start from the profile page.