Thursday, July 23, 2009

Conveniences

First up today, I would like to clear the issues log that I have been compiling. These are mostly minor issues so I hope to be able to clear them quickly and move onto more interesting topics.

Indeed, the first issue, missing images on the meal pages is a simple omission from the view. I copy & paste the specs for the recipe images and use the same helpers for the meal image. Simple enough.

When I commit the fix, I include the following text in the commit message: "Closes #3". In many SCM solutions, there are post-commit hooks that update tickets. Trac, for instance, has a popular SVN post-commit hook that updates tickets including text like "References #123" or "Closes #123". Github's issue tracker does the same—without even needing to add post-commit software. Nice!

After pushing the fix to github, the issue is automatically closed for me:

The commit even includes a link to the issue:

The automatic issue updater is not quite as full featured as Trac's. It does include the ability to up-vote an issue / feature request. I make immediate use of that feature by up-voting the ability to reference (without closing) issues—in github's own issue tracker.

I have a go at fixing the links between recipes (the only other issue that I am currently tracking). I have to admit defeat, though. The links between records is hard-coded to work with meals, not recipes. My first attempt at fixing it is worth only a complete revert. In git, of course, this is done with:

git checkout .

The last thing I work on today is giving less CSS a try. I would like to see if I can get the rounded corners on the green headers from my legacy application into the new implementation. The existing view:

I create a public/stylesheets/style.less file to hold my minimal CSS definitions. The first thing that I add is color definitions. We use a dark green / light green color scheme (coupled with red in the logo) to give an Italian flavor to the site. The green colors in style.less: