Live data from Hacker News

New Sublime Package Control Site

sublime.wbond.net

1–10 of 50 posts

Re: New Sublime Package Control Site

#2
Really impressed by the progress bar built into the site - I don't know any sites besides YouTube that are doing that!

For anyone else wondering, it looks like the app is powered by Backbone, D3, and Handlebars on the front-end.

Re: New Sublime Package Control Site

#3
I'm not sure what it is, but something feels very wrong to me about sublime package control. It might be the instructions for submitting new packages. It might be the difficulty of installing a bunch of packages at once.

Re: New Sublime Package Control Site

#4
post #3

I'm not sure what it is, but something feels very wrong to me about sublime package control. It might be the instructions for submitting new packages. It might be the difficulty of installing a bunch of packages at once.

It strikes me as harsh to describe those things as "very wrong". Maybe it's just me, but for me, things that are "very wrong" are things like inequality, unconstitutional NSA spying, and watermelons with seeds. You know? Truly important stuff.

edit: Is my tongue-in-cheek opinion really that bad? Am I, too, "very wrong"?

Re: New Sublime Package Control Site

#5
post #3

I'm not sure what it is, but something feels very wrong to me about sublime package control. It might be the instructions for submitting new packages. It might be the difficulty of installing a bunch of packages at once.

I'm more than happy to discuss these things and work with anyone interested on improving them.

Re: New Sublime Package Control Site

#7
post #2

Really impressed by the progress bar built into the site - I don't know any sites besides YouTube that are doing that! For anyone else wondering, it looks like the app is powered by Backbone, D3, and Handlebars on the front-end.

Thanks! I enjoyed playing around with a bunch of front end stuff on the site. I wanted to have a very fluid experience, so in addition to using Backbone with pushState and doing partial page renders, I felt the need to provide some sort of loading indicator. It uses CSS transitions combined with AJAX ready states to animate the loading, and the visuals were modeled after the Chrome loading bar from Android.

I've also got some other subtle touches like when you go from one of the main site pages to a page about a package, I fade out the Package Control logo so it does not compete with the package name.

I'll be posting the website up on GitHub in the next day or two. On the server side it is Bottle.py running on Python 3.3 and using pybars for templating. I used coffeescript with Backbone, D3 and Handlebars as you mentioned, although I did not use the model or collections parts of Backbone. I constructed the beginning of a lightweight framework that feel somewhat declarative in the frontend router so that adding new pages doesn't require any real setup. You write the model code in python to pull data out of the database, then write a handlebars template to display it and then throw in some JS to add interactive elements client-side.

Since I use pybars on the server side and handlebars on the client, I can pre-render the initial page view and then let the client render further screens using just one set of templates. The only downside of using pybars and handlebars is duplicating the helpers.

The other part of the site I am pretty happy with is the search. I use postgres as the database, so I started with the full text searching, but then added some custom functions and triggers to nicely split and weight different parts of the package info. One implementation detail that I think ended up working out decently was weighting results with shorter names higher. This was based on the idea that shorter names mean a larger percentage of the name is a match to the search terms.

Re: New Sublime Package Control Site

#8

So far I've been managing my packages in a GitHub repository and that works well too. Since I keep switching between Mac, Linux and Windows it also allows me to easily share the profile with each installation.

If you just sync your Packages/User/ folder between machines, Package Control will automatically install the correct versions of each package for each OS.

Unfortunately I've found the "sync everything" process that you've outlined leads to issues where users end up installing the OS X version of a package on Windows and then wonder why it doesn't work properly.

Post reply on HN