Why was "Make Text Smaller/Bigger" Removed?

With the release of Propane 1.0 I've had to disable the "Make Text X" menu options in the view menu.

The Short Explanation

The brief version of 'why?' is: caught between a rock and a hard place of two different WebKit problems, it's the best option I've got.

A workaround for setting your preferred text size appears at the end of this article.

The Long Explanation

The long version of 'why?' is as follows (for those interested - otherwise just skip to the workaround):

The WebKit that ships with Safari 4 includes full-page-zooming which, for many web sites, is a great feature.

For Propane/Campfire it's less desirable. One of the main features of Propane is that you can use a much smaller window to chat than if you were using a browser. If you full-page-zoom to a larger size you're likely to see clipping of any displayed images.

For this reason, Propane uses text-only zooming.

Unfortunately there is a bug in the way that WebKit is calculating the page height with text-only zooming and it reports a page height smaller than it should for any zoom factor other than the default (1.0). As a result, the Campfire javascript running in Propane scrolls the window to the wrong location every time a new message arrives.

Propane 0.9.8 included a workaround for this bug by patching the Campfire javascript to delegate all page height calculations and auto-scrolling to Propane.

And that's when I started to get my first ever widespread reports of Propane crashing. Since then I've tried various techniques for accurately calculating the page height while avoiding crashes in the javascript engine - none of them have worked universally.

The affected users had no choice but to use a specially-prepared version of Propane that didn't try to accurately calculate the page height or scroll to the right location.

The Tough Choice

The most fundamental objective I have for Propane is for it to be software you can trust. It's all well and good to have an easy way to change text size but if you miss messages because it's scrolled to the wrong spot, or if it crashes... it's kind of missing the point of being a client for Campfire.

I hate to take away a feature but the most sensible thing to do is to disable the menu options for changing text size until I have a reliable alternative that works for everyone.

I hope you all understand and I'm sorry for all of the mess surrounding these bugs - setting the text size shouldn't be such a drama.

The Workaround

You can still influence the size of the text in Propane with the CSS files found in ~/Library/Application Support/Propane/styles.

In the cf_chat.css file you will find a declaration that looks similar to this:

tbody#chat div, tbody#chat span {
  font-size: 0.9em ! important;
}

The above declaration is what ships with Propane by default and results in chat text just a bit smaller (90% of the default size) than you'd see when viewing Campfire in Safari.

For those of you unfamiliar with CSS, if you make the following change to the font-size line:

font-size: 1.2em ! important;

your text will be about 20% larger than you might see using Campfire in Safari.

Your changes won't take effect in any currently-running chats unless you reload them. I find the simplest thing is to quit Propane (without closing any chats) and then launch Propane again. Any chats that were open when Propane quit will be re-opened automatically.

Again, I'm sorry something simple like setting the text size has to be such a production but it's preferable to Propane being unreliable.