Live data from Hacker News

InstaCSS: the CSS docs you always wish you had

instacss.com

61–70 of 93 posts

Re: InstaCSS: the CSS docs you always wish you had

#61
post #60
post #53

Hey there, creator of instacss here. Thanks for all the feedback! I posted this as a Show HN last week, but it's nice to see that someone has re-discovered it: http://news.ycombinator.com/item?id=3222253 . Since then I've added a few features, one of which being the ability to have permalinks so that you could use it as a google chrome search. This is why I push to the url bar as you type. I'm really open to feedback…

Would be nice if you share some of the used backend technology

Here you go :) https://github.com/rgarcia/instacss

Data is scraped mostly from MDN using node-scraper and then thrown into mongodb for storage.

Backend is also node and just provides a json endpoint for pulling the entire db client-side (along with serving up index.html and all the client-side js).

Frontend is all backbonejs, which makes writing the search function pretty insanely simple: https://github.com/rgarcia/instacss/blob/master/static/js/vi...

Both backend and frontend code is organized using requirejs, which I am pretty much in love with.

Re: InstaCSS: the CSS docs you always wish you had

#63
post #27
post #11

how is it better than google -> check the first result?

It's faster and more consistent--I don't have to worry about which site I'm getting information from each time.

faster? I think it's less practical since it needs you to add a new bookmark (and I have way too much of those)

Re: InstaCSS: the CSS docs you always wish you had

#64
post #58

I think your DNS for www.instacss.com is broken: ;; ANSWER SECTION: www.instacss.com. 300 IN CNAME http://morning-warrior-3377.herokuapp.com/ . CNAME accepts only hostnames or (depends on your RFC-acceptance-level) a FQDN. No URI/URL

Ah, thanks--I've been meaning to fix this. Should be working shortly.

Re: InstaCSS: the CSS docs you always wish you had

#65
post #46

Hey, pretty cool but you should have a delay between when the user types something and when the url gets updated and a query gets made. i.e. some sort of definition of "user stopped typing". This improves usability by a ton. Second is, maybe you should have a sidebar on the right that shows you clickable / keyboard navigatable titles of all the search results so I don't have to scroll down browsing.

Agreed. The back button is made almost useless since it is stuffed with each intermediate typed character.

This is a separate question. The URL can be updated without creating browser history.

Re: InstaCSS: the CSS docs you always wish you had

#66
post #44

Nice! It's great that it has detailed version support info, like: *Support for multiple, comma-separated, background images was added in Gecko 1.9.2.* but I wish it showed what fraction of web users that represents. Maybe with a little green/red fuel gauge icon.

The OP said he's pulling the data from MDN (Mozilla Dev Network I think?), which means all the comments are only going to be Firefox-related. What I would want is for it to show all browsers and what version the feature is available in (but if he's automating the data pull, this probably isn't going to happen I imagine).

Re: InstaCSS: the CSS docs you always wish you had

#68
post #53

Hey there, creator of instacss here. Thanks for all the feedback! I posted this as a Show HN last week, but it's nice to see that someone has re-discovered it: http://news.ycombinator.com/item?id=3222253 . Since then I've added a few features, one of which being the ability to have permalinks so that you could use it as a google chrome search. This is why I push to the url bar as you type. I'm really open to feedback…

Just add a short delay between the keypress & the search/url push, and add a check to see if the query is the same. If after a ~second or so the query is the same, do the search and update the URL.

Re: InstaCSS: the CSS docs you always wish you had

#69
post #31

Oh look, it's another site that loads nothing with JavaScript off. What is wrong with you? Progressively enhance, or gracefully degrade, or display something other than a completely blank page to non-JavaScript visitors. I harbor many doubts re: your competence in the realm of usability.

I wish I could downvote this.

Re: InstaCSS: the CSS docs you always wish you had

#70
post #53

Hey there, creator of instacss here. Thanks for all the feedback! I posted this as a Show HN last week, but it's nice to see that someone has re-discovered it: http://news.ycombinator.com/item?id=3222253 . Since then I've added a few features, one of which being the ability to have permalinks so that you could use it as a google chrome search. This is why I push to the url bar as you type. I'm really open to feedback…

Just add a short delay between the keypress & the search/url push, and add a check to see if the query is the same. If after a ~second or so the query is the same, do the search and update the URL.

Yes please! This was the first thing I noticed, maybe my netbook is too slow but I do a lot of coding on the little thing.

The way I solved this in a similar auto-complete app was using a setTimeOut to prevent updating or requesting data unless no key had been pressed in the last 0.2 seconds or so:

    var updateId = 0;
    function searchKeypress(e) {
      if ((e || window.event).keyCode == 13) {
        updateCookie(radioStations.selected);
        document.location = radioStations.selected.links[0].url;
      }
      clearTimeout(updateId);
      updateId = setTimeout(searchUpdate, 200);
    }
Disclaimer: this piece of code is about 4 years old and as you can see it doesn't even use jQuery, but I trust it demonstrates the principle well enough.
Post reply on HN