I finally finished my patches to add threaded comments to Typo. I haven’t updated this site yet, but my test server is up and running with the threaded code. The same code also adds subject lines for comments and keeps track of commenters email addresses (if they choose to submit them).

The Ruby side of threaded comments was really easy, but getting all of the Javascript to allow threaded comment editing completely in-place using Ajax was a royal pain in the neck. It’s been years since I last touched Javascript, so I was forced to do a lot of googling. It would have been a lot easier if I’d just created a new page for comment editing and then bounced the user between that and the comment display page, but it wouldn’t have been as cool.

Next up, I’m going to add support for RubyPants, so I can get smart quotes and dashes working correctly again. Typo’s current code for text filtering assumes that you only want to apply a single filter to each item; I’m not sure if I’ll just create a ‘markdown+rubypants’ filter or add support for stacking filters. I can think of a couple other filters that would be useful, but I don’t know that I really want to create a management interface for filter stacking.

After that, I’m going to add the first bit of comment authentication. I’d like to have my comments automatically tagged so I can apply visual effects to the comments–see Mike Davidson’s blog for a nice example of the effect that I’d like to achieve. In the short run, my goal is to add an optional user_id field to the comment field and then link that to the users table. Then I’ll add a css_class field to the users table and use it when generating comments.

Once that’s done, I’ll start in on modifying the CSS files that come with Typo. Right now, this blog looks identical to every other Typo blog out there, and I really don’t care for that.