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 on how to do this without screwing with people's back buttons, since I agree that's pretty bad.
Though the MDN docs are down right now check out the replaceState method. It allows to write over the url (on the same domain) without creating a new history object. This is a textbook example of where using replaceState would make sense.
An idea would be to separate the history push from the loading of the resources, and only push history after an action that denotes the user has found the result they were looking for (blur of input, pressing enter, etc) to avoid a search history filled with every keystroke of a query.
A different take would be to never automatically push the results to the url bar, but still parse the address bar for queries, and provide a permalink for each result with the hash in it.
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.
Love it. One thought - have standardized CSS listed first. I type in "background" and get "-webkit-background-composite" as a first result. I'd probably want to see just "background" come up, followed by declarations less popular. Regardless of this minor issue, I'll be using this regularly. Thanks for this!
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.
* Default to sort by relevence: Put the more relevant matching properties at the top. For example, I type "backg" instead the highest result being the obscure "-webkit-background-composite" ... actually most relevant result "background" which should be the first result instead of the third.
* Default results list to condensed format: Instead of showing the full verbose docs for every matching result instead show a sparse summary of each result with a option to expand it. If there's only one matching result then show the complete doc for it
* Nice example palette for standard colors. How about an example palette for the standard font families?
Edit: ugh, that doesn't actually work. It only gives you p-z. Hey instacss! Please provide us with a link to the actual document. Preferably in plain HTML so we can download it. Alternately, anybody care to scrape this thing and post it in full?
One minor bug: I notice the anchor (and results!) changing as I type and backspace, but if I backspace all the way to an empty it is stuck on the single-letter anchor. Would be nice if it cleared out entirely and took me back to the empty front page.
Any chance of getting it to apply the filter on page load as well? It appears that it's not possible to link to a result set. i.e., if I send someone a link to http://instacss.com/#background in order for results to be shown they must perform a keypress of some sort in the search field.
edit: Apparently if you've searched something before it does display it on page load (after a brief delay)? So it seems this link might not be a good example URL. But hopefully you can just edit the URL and submit it directly to see what I'm talking about.
It would be nice to show something more useful on the front page before the user types anything into the search box. Like an index or a table of contents or so.
I wouldn't say these are the css docks I wish I always had. see I want better presentation. I don't really want to scroll through the actual CSS docs from W3C, I want to get some quick view of what my search query returned (property, {values}, notes). After that I could click on the entry for that property and read it's docs. It's just information overload. Nice work though, but that's my suggestions.
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).
I typed "^color$" and it wreaked havoc on my page history. Usually, I open the story in the same window then hit the back button to see the comments. This time it took me handful clicks before I get to my previous page.
[+] [-] rgarcia|14 years ago|reply
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 on how to do this without screwing with people's back buttons, since I agree that's pretty bad.
[+] [-] xutopia|14 years ago|reply
[+] [-] morrow|14 years ago|reply
A different take would be to never automatically push the results to the url bar, but still parse the address bar for queries, and provide a permalink for each result with the hash in it.
[+] [-] danielsoneg|14 years ago|reply
[+] [-] level09|14 years ago|reply
[+] [-] tomlin|14 years ago|reply
[+] [-] pilgrim689|14 years ago|reply
[+] [-] makmanalp|14 years ago|reply
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.
[+] [-] mckoss|14 years ago|reply
[+] [-] snorkel|14 years ago|reply
* Default to sort by relevence: Put the more relevant matching properties at the top. For example, I type "backg" instead the highest result being the obscure "-webkit-background-composite" ... actually most relevant result "background" which should be the first result instead of the third.
* Default results list to condensed format: Instead of showing the full verbose docs for every matching result instead show a sparse summary of each result with a option to expand it. If there's only one matching result then show the complete doc for it
* Nice example palette for standard colors. How about an example palette for the standard font families?
[+] [-] Stuk|14 years ago|reply
I would also like it if the search box was in the fixed header, so I don't have to scroll back to the top to re-search.
Otherwise nice tool!
[+] [-] antonp|14 years ago|reply
[+] [-] chris_partridge|14 years ago|reply
[+] [-] mike-cardwell|14 years ago|reply
Takes regular expressions as user input. Probably DOS'able.
After looking at it for a few seconds, I realised that it's doing the regex matching on the client side, so it's ok.
If you ever accept arbitrary regular expressions as user input, be very careful: https://www.owasp.org/index.php/Regular_expression_Denial_of...
[+] [-] highace|14 years ago|reply
[+] [-] ashconnor|14 years ago|reply
[+] [-] leeoniya|14 years ago|reply
[+] [-] donbronson|14 years ago|reply
[+] [-] antidaily|14 years ago|reply
[+] [-] timbonicus|14 years ago|reply
[+] [-] estel|14 years ago|reply
[+] [-] zenijin|14 years ago|reply
[+] [-] rgarcia|14 years ago|reply
[+] [-] billybob|14 years ago|reply
[+] [-] saurabh|14 years ago|reply
[+] [-] akhkharu|14 years ago|reply
[+] [-] jasonkester|14 years ago|reply
http://instacss.com/#a
Edit: ugh, that doesn't actually work. It only gives you p-z. Hey instacss! Please provide us with a link to the actual document. Preferably in plain HTML so we can download it. Alternately, anybody care to scrape this thing and post it in full?
[+] [-] cleverjake|14 years ago|reply
[+] [-] judofyr|14 years ago|reply
[+] [-] obeattie|14 years ago|reply
[+] [-] leeoniya|14 years ago|reply
[+] [-] angerman|14 years ago|reply
[+] [-] initself|14 years ago|reply
[+] [-] uptown|14 years ago|reply
[+] [-] rmoriz|14 years ago|reply
;; 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
[+] [-] rgarcia|14 years ago|reply
[+] [-] joeshaw|14 years ago|reply
[+] [-] mikedougherty|14 years ago|reply
edit: Apparently if you've searched something before it does display it on page load (after a brief delay)? So it seems this link might not be a good example URL. But hopefully you can just edit the URL and submit it directly to see what I'm talking about.
[+] [-] perlgeek|14 years ago|reply
[+] [-] alexhaefner|14 years ago|reply
[+] [-] tlb|14 years ago|reply
[+] [-] jordanlev|14 years ago|reply
[+] [-] maw|14 years ago|reply
[+] [-] csomar|14 years ago|reply