Page MenuHomePhabricator

Automatically AJAX in the first 5 pages of project feed content as the user scrolls
AbandonedPublic

Authored by epriestley on May 26 2017, 6:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 6:58 AM
Unknown Object (File)
Sat, Apr 13, 9:17 PM
Unknown Object (File)
Sat, Apr 13, 3:14 PM
Unknown Object (File)
Sat, Apr 13, 12:09 PM
Unknown Object (File)
Thu, Apr 11, 9:16 AM
Unknown Object (File)
Sun, Apr 7, 3:42 AM
Unknown Object (File)
Sat, Apr 6, 10:39 PM
Unknown Object (File)
Mon, Apr 1, 9:51 AM
Subscribers
None

Details

Summary

Ref T12762. As the user scroll, automatically add the first 5 pages of results to the document. After 5 pages, show the normal footer, etc., and a link to view all results in the Feed application. (Since we don't have design for this link yet, it's just a button at the top for now.)

This implementation covers:

  • Updating the URI as the user scrolls so it's always correct. The URI always shows what the user sees, and any anchors will work correctly.
  • Spatially-accurate scrollbar. Even if the content hasn't AJAXed in yet, we pre-compute the size of the content so the scrollbar is accurate. This lets users navigate to the bottom right away if they want, and avoid the scrollbar "jumping" as they load more content.
  • Very fast. I measured AJAXing in content at an average of 0ms.

Room for improvement:

  • This implementation isn't perfect, ad has a very small (about 30ms on my machine) server-side cost.
Test Plan

Scrolled down the page, saw more content fill in automatically.

Diff Detail

Repository
rP Phabricator
Branch
feed5
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 17276
Build 23143: Run Core Tests
Build 23142: arc lint + arc unit

Event Timeline

Wow, so little code. I am amaze!

epriestley retitled this revision from Automatically AJAX in the first 5 pages of project feed content as the use scrolls to Automatically AJAX in the first 5 pages of project feed content as the user scrolls.May 26 2017, 6:46 PM

I'll admit it took like 30 minutes for me to grok this joke. :)