[Pro] Perpetual scroll

Hello,

Has anybody got an idea as to how to do perpertual scroll in FWT? Along the lines of Pinterest.

Many thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The key to this effect would be to pre-paginate your content onto separate pages, one per chunk that you expect to load. Getting the effect to happen is a very short JavaScript away. Setting up your initial page correctly and setting up the subsequent page fragments that will be inserted is a much more complex process, not just because it’s Freeway and you’re swimming up the waterfall, but because you have to be so fantastically precise in order to coerce JavaScript into doing nearly anything. If you’re not afraid to roll up your sleeves, it’s definitely do-able. Let me know and I’ll get the gerbils to typing…

Walter

On Jan 10, 2013, at 9:48 AM, John-Paul Kernot wrote:

Hello,

Has anybody got an idea as to how to do perpertual scroll in FWT? Along the lines of Pinterest.

Many thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Is this the same thing as loading page content in bits, or is it more
loading CMS or data-generated content in bits? Either way, sounds
interesting. :slight_smile:


Ernie Simpson

On Thu, Jan 10, 2013 at 12:15 PM, Walter Lee Davis email@hiddenwrote:

The key to this effect would be to pre-paginate your content onto
separate pages, one per chunk that you expect to load. Getting the effect
to happen is a very short JavaScript away. Setting up your initial page
correctly and setting up the subsequent page fragments that will be
inserted is a much more complex process, not just because it’s Freeway and
you’re swimming up the waterfall, but because you have to be so
fantastically precise in order to coerce JavaScript into doing nearly
anything. If you’re not afraid to roll up your sleeves, it’s definitely
do-able. Let me know and I’ll get the gerbils to typing…

Walter

On Jan 10, 2013, at 9:48 AM, John-Paul Kernot wrote:

Hello,

Has anybody got an idea as to how to do perpertual scroll in FWT? Along
the lines of Pinterest.

Many thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ve shown here before how to lazy-load images based on current scroll offsets. That works great for a crazy-tall page with a grid of photos on it. (I developed it for a slideshow program, which did a skeuomorphic light-table interface where you could move “slides” around and star the ones you loved. Took ages to load without the lazy-loading, though. That was very much database-driven.

I was thinking that the way to approach this in Freeway would be to create multiple carefully-named-and-constructed pages, to be inserted by JavaScript into the content container just before the marker item. You’d do something like the following:

Make your main page, following best inline-construction practices for your content area. In that content area, you would add the first “page” worth of content, followed (inline) with a marker item, like a spinning “more content loading” indicator. There would be an observer function on the page which would watch the marker to see if it was visible on the screen. If it was, the next “page” would be requested with an Ajax.Updater request, and the content would be inserted before the marker. Since you used best practices, that would shove the marker back off-screen below the “fold”, and the process would start over again, waiting until your visitor scrolled that marker back on screen. When you ran out of next content, the script would remove the marker itself and the process would terminate.

You’d want to apply the PHP Make Insert Page Action to each of the extra content pages, and probably build your content there as inline content in the PageDiv (double-click an empty page and you’re directly inside the PageDiv, ready to build right there at the outer boundaries of the document). The result would be an HTML fragment with just your content, ready to be slipped inside the content area on your main page. You’d also want to follow some sort of naming strategy, so instead of having to maintain a global variable and keep passing it back and forth, you could just increment a number to figure out what the “next” page should be. So content_001.html, content_002.html, etc. Whenever you got a 404 from the request, you’d just remove the marker element and stop the process of asking for a higher number.

Walter

On Jan 10, 2013, at 4:17 PM, Ernie Simpson wrote:

Is this the same thing as loading page content in bits, or is it more
loading CMS or data-generated content in bits? Either way, sounds
interesting. :slight_smile:


Ernie Simpson

On Thu, Jan 10, 2013 at 12:15 PM, Walter Lee Davis email@hiddenwrote:

The key to this effect would be to pre-paginate your content onto
separate pages, one per chunk that you expect to load. Getting the effect
to happen is a very short JavaScript away. Setting up your initial page
correctly and setting up the subsequent page fragments that will be
inserted is a much more complex process, not just because it’s Freeway and
you’re swimming up the waterfall, but because you have to be so
fantastically precise in order to coerce JavaScript into doing nearly
anything. If you’re not afraid to roll up your sleeves, it’s definitely
do-able. Let me know and I’ll get the gerbils to typing…

Walter

On Jan 10, 2013, at 9:48 AM, John-Paul Kernot wrote:

Hello,

Has anybody got an idea as to how to do perpertual scroll in FWT? Along
the lines of Pinterest.

Many thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options