Live data from Hacker News

List.js

listjs.com

11–20 of 90 posts

Re: List.js

#11
We would use such a JS file for large lists.

Is there a performant way to use this kind of JS files without loading the full database table into the frontend? I couldn't find anything in the documentation.

Re: List.js

#12
Thanks, but you really need to change that to 7 KB. I thought to myself "7 MB? What a weird JS library" and was about to close the page.

Re: List.js

#13

We would use such a JS file for large lists. Is there a performant way to use this kind of JS files without loading the full database table into the frontend? I couldn't find anything in the documentation.

There is: give the list a fixed height and a scrollbar to display more. Load the first two or so pages immediately and render them, then request more right away (or as the user scrolls, if they scroll faster than you can load them). As the user scrolls, remove dom elements that are more than a page above or below the visible area to keep the number of nodes small. Obviously, cache the data (and the removed nodes) so that when the user scrolls back to the same spot you can load them again quickly.

If performance is important and you have a lot of data, this is an enormously tricky thing to get right, and perhaps impossible in a general case.

Note that fast scrolling of lots of data is a little-noticed but extremely optimized operation in the OS X and iPhone UI, and has undoubtedly received multiple man-years of attention.

Re: List.js

#14
post #8

Also... 6.899kb is confusing. In many countries/locales(?) that would mean almost 7MB. Maybe 6.9kb should be used instead, or 6899bytes or something like that.

Hehe, its fix'd now. 7 KB!

Re: List.js

#15
What search algorithm are you using for the list searching?

I tried [monkey game] and would have expected Monkey Island to show up.

Also, clicking 'edit' I would expect the table row being edited to be edited inline (it's confusing that the focus jumps down to the input boxes)

Potentially really useful but needs a bit of polishing I think - great work though.

Re: List.js

#17
post #4

kinda neat...but...you need to read: http://contrastrebellion.com/ and redesign your site...easily the biggest violation of my eyes ever.

That's an awful website too. White text on dark background is a complete readability failure, no matter how much contrast it provides.

Re: List.js

#18
Is there a similar library that can be used with tables? I like the function and this looks easy to use but my site uses tables over lists.

Re: List.js

#19

What search algorithm are you using for the list searching? I tried [monkey game] and would have expected Monkey Island to show up. Also, clicking 'edit' I would expect the table row being edited to be edited inline (it's confusing that the focus jumps down to the input boxes) Potentially really useful but needs a bit of polishing I think - great work though.

It's using a really simple algorithm, but I will definitely update it in later releases!

I may update the examples but, I want to keep them as simple as possible, just enough to show some of the possibilities with List.js

Post reply on HN