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.

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 OK
Unit
Unit Tests OK
Build Status
Buildable 17276
Build 23143: Run Core Tests
Build 23142: arc lint + arc unit

Event Timeline

epriestley created this revision.May 26 2017, 6:24 PM
chad edited edge metadata.May 26 2017, 6:26 PM

Wow, so little code. I am amaze!

chad edited the test plan for this revision. (Show Details)May 26 2017, 6:46 PM
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
chad resigned from this revision.May 28 2017, 12:09 AM
epriestley abandoned this revision.May 30 2017, 8:38 PM
chad added a comment.May 30 2017, 8:38 PM

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