[Rails] Re: "Show more" feature in Rails app
daze wrote in post #993901:
> You know the very common "Older posts"/"Show more" link at the bottom
> of your Facebook news feed? You know, it functions as a way to show
> more posts or whatever... it generates more content and allows you to
> scroll down more.
>
> I'm kind of surprised there isn't a nice gem that creates that
> functionality... After all, it is common. It's kind of like
> will_paginate, I guess.
>
> I would love to make such a gem/plugin myself, but I don't have the
> experience/skills to....
>
> This is just a thought to the Rails community - who knows, maybe
> there's someone out there who's looking for something to do... a
> plugin/gem like this would be awesome.
I have seen a number of implementations of this, but by far the best one
I have seen is implemented on the Apple store. They have
implemented this "endless page" concept in a way the user barely notices
it (as long as they have a decently fast internet connection).
One of the issues with the endless page is how to deal with the scroll
bar. On many endless page implementations I've seen, the scrollbar is
practically useless. Often the use may try to guess that what they are
looking for will be found near the end of the list. They may try to grab
the scrollbar thumb and pull it to the bottom of the scrollbar. A lot of
the endless page solutions don't handle this well at all.
The trick employed in the endless page implementation on the Apple
store (best example know of using this technique) is to create a
container DIV large enough to hold the entire results. This forces the
scrollbar to behave properly. In order to do this one must be able to
calculate the total size of the unpaginated result set. This isn't too
bad if you are able to render each item with the equal vertical heights.
This is the case for many scenarios, but not all.
Using AJAX each row is fetched and displayed as the row gets scrolled
into view. You'll noticed that the Apple store uses their
standard spinner/loading animated icon and then nicely fades in the
row/cell content. It's a very nice effect for those cases where this
works.
Example:
http://store.apple.com/us/browse/home/shop_ipod/ipod_accessories/headphones?mco=MTM5MTc2OTU
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home