List.js
listjs.com
listjs.com
Your examples need to be online. Without exception.
As soon as I have to download and run local examples, honestly I just completely lose interest. That may seem impatient, a snap judgment, arbitrary and irrational. It is in fact all of these but it doesn't matter.
There's no reason you can't have your demos online. It makes it super easy for anyone to check out.
I'm not saying a standalone is invaluable, but if you're bragging about how it's only 7k, shouldn't there also be a 5k version for people already using the most popular JavaScript library in use today?
http://trends.builtwith.com/javascript/jQuery http://w3techs.com/technologies/overview/javascript_library/...
That people are now taking the time to create pure JS solutions is nothing but a good thing, and there's certainly no reason why people should have to depend on a third party library if they don't want to.
Finally, your latter point about filesize is a false economy, because a 5k version still requires a 30kb DOM abstraction as a dependency. And since the thing has no external dependencies, why on earth would you want to hobble it with one it doesn't even need?
All these pure JS scripts and utilities get a nice new home in my bookmarks bar, because they're a lot more valuable to me than a shoddy jQuery plugin.
The main drawback is that it doesn't help people learn Javascript at all. And then it's hard to get information and help with JS because practically every result returns a jQuery plugin or something that uses jQuery. And as a result of that people think, "oh, I need jQuery installed to do some javascript on my site." And then other people complain, "this script isn't jQuery I can't-" ... oh.
Wouldn't it actually be better if JS implementations were actually standardised so its behaviour across browsers was totally predictable and reliable?
> redefines a bunch of jQuery functions
Just clocked this. jQuery redefines more than just a bunch of javascript functions as well as then redefining its own. It's a bit of a mess.
It would also be way better for developers if all computers had infinite memory.
It's just not in the cards though.
jQuery standardizes the mess that is JavaScript implementations so that developers can worry about their application instead of the browser. I don't think you should lament jQuery for being so popular, you should lament browser manufacturers (ahem, Microsoft) and the W3C for not creating and following good JavaScript specifications.
That's like blaming Dennis Ritchie for killing the Assembly community.
But one point with only allowing id i.e is consistency.
In fact I think with _.fiter() you could probably do this in a few lines.
collection.each(function(model) {
model.set({visible: matchesSearch(model)});
});
And then, in your view: model.bind("change:visible", function() {
$(this.el).toggle(model.get("visible"));
});
... assuming that you have a "matchesSearch" function that can tell you if a given model matches the current search term.and redesign your site...easily the biggest violation of my eyes ever.
There's a fair amount of merit to downvoted comments having their contrast lowered.
Especially the lowest contrast, after several downvotes, that's just stupid, because it's pretty much unreadable unless you select the text. So you know there's text, but you can't really read it, then why show it at all?
Edit: Ok, apparently it's supposed to discourage using HN as a blog (http://news.ycombinator.com/item?id=2807183). I still think it's odd.
If I have the time to dig up the article I am thinking about, I will add it to this post.
(Here is the HN thread on the contrastrebellion site: http://news.ycombinator.com/item?id=2807047)
Anyway - each to their own. It looked okay to me, apart from some tiny script in places. (Safari, OSX 10.4, 1280x854)
I prefer white-on-black. To me, reading black-on-white feels somewhat akin to staring into a projector.
In fact, I'd say the Contrast Rebellion logo is the biggest violation of my eyes. Scrolling up and down doesn't seem right...
hosted by (mt) Media Temple
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.
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
EDIT: I see now that your front page is an example, with source code. That wasn't obvious to me.
The examples page had a similar problem. The examples (pretty close to the fold) looked like comments. I went to read the comments, seeing if anyone had suggested live examples be put on the site.
The contact list example won't let me add contacts if I click "edit" on one row, then delete that row. The table also seems to degrade if you remove all elements.
"Documentation" and "Source" link to the same (Github) page. At least link to README.md for the documentation. Why is the "Download" link bold?
The front page has no indication of the name of this library above the fold.
I also added a note about that the contacts-example could contain bugs. My purpose with the example is the show the possibilities with add(), values() and remove(). There fore I have tried to minimize the amount of code (and there by some functionalities). But I will of course fix real bugs if there are any.
The Documentation-link now leads to the readme!
Thanks for your input!
Overall a great script though.
that said, i quickly learned that it's better to use data- attributes and copy them into the class when necessary. otherwise you end up with utilities like getCategoryFromClassName()
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.
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.
But I am working on a solution for auto-loading data from callbacks or showing more items in list on the fly. But the problem is that most solutions are dependent on how the HTML/CSS around the list is implemented, which is something I want to avoid. Im thinking a lot about it, though.
Nice stuff!
This script (looks cool, btw) comes in at 7k. It seems very easy to me to add "7k here, another 7k there" and next thing you know your page needs to go on a diet.
Question is: what's the threshold that everyone follows?
As long as you combine your scripts, and use Google's APIs to load the cached version of common libraries like JQuery and JQuery UI. You could easily be using 10 of these libraries and still be wayy ahead of the curve as far as bandwidth is concerned.
-Add pagination. I don't mean dynamic/AJAXed pagination -- The entire list can still be loaded in the background (which would still make the list sorting/filtering possible).
So nice work, and thanks.
Example 2 at http://listjs.com/examples.html uses tables e.g
Everything is created dynamically. The js that creates the demo is
userList = new QCSmartList({
dataUrl: 'users.json',
columns: [
{field:'email'},
{field:'surname'},
{field:'firstname', header:'Name'},
{field:'points'}
],
containerId: 'user-list',
name: 'users',
varName: 'userList'
});
If anyone's interested I can try and get some updated code/demo up later on today (it's only morning here)I'm sure there are tons of awesome libraries I don't know about.
That is absolutely the most important thing for a library. First page, right after the name. A functional example of what it does.
That huge logo on the homepage is pointless. Replace it with a nice lickable demo (you can move the logo to the header or something), and the page will be twice as effective.
Just my .02.
Once I got to look at the actual example, it looks good :).