Saturday, April 12, 2008

Todoist Sidebar - Firefox Add-On

Note: please see the latest update.

I recently switched from Google Notebook to Todoist for my to-do lists. I'd searched a while for a list manager that could do hierarchical tasks, and Todoist looks like the only one that does, at least for free. It does hierarchical projects too, in fact.

One hack I saw on their site described a way to load Todoist into Firefox's sidebar, basically by bookmarking a simplified view of the site and checking "Load this bookmark in the sidebar." Nice!

My joy soon soured though, when I noticed that adding a task has the side-effect of loading the Todoist website into the main browser window, browsing over whatever site you already have in the current tab. Not so nice.

Plus, I don't like the fact the button to open the sidebar (really just a bookmark) doesn't toggle -- to close the sidebar, you have to mouse all the way over to the sidebar's close button! Ridiculous! And though you can define a keyword for the bookmark which allows easy access through the address bar, there's no way to define a keyboard shortcut to hide the sidebar.

So, I put together a Firefox add-on which solves these problems, which I have creatively christened Todoist Sidebar.

Some perhaps non-obvious things to note:

  • Left-click the toolbar button to toggle the Todoist sidebar.
  • Middle-click the toolbar button to open Todoist in a new tab.
  • The default keyboard shortcut is Alt+Shift+2 on Windows and Linux, and Cmd+Shift+2 on the Mac.
  • The keyboard shortcut can be customized by modifying the string values
    todoist-sidebar.key and todoist-sidebar.modifiers in about:config, according to Mozilla's XUL:key specification. A Firefox restart is required for the changes to take effect. Setting either of these values to blank disables the keyboard shortcut.

All of this will probably be moot once Google continues their world conquest by rolling out their Calendar tasks implementation. But hey, it will be fun while it lasts...

Right now the add-on is hosted in the Firefox add-on sandbox.


10/15/08 update: Okay, Amir, the creator of Todoist, contacted me a bit ago all the way from Denmark to collaborate on the Todoist Sidebar, and he has updated it and now maintains it on the Todoist website! He blogged about it at http://amix.dk/blog/viewEntry/19333. Please go there to install. Woohoo!

5/15/08 update: Hm, it seems to still exhibit the naughty toggle behavior described in the comments on initial install. Restarting Firefox makes the problem go away. I'll look into this at some point. Lame!

4/28/08 update: Version 1.0.2 fixes the previously mentioned bug where any key press triggers the sidebar. Also the default key accelerator is now Alt+Shift+2 for Windows and Linux, and Cmd+Shift+2 for the Mac.

4/26/08 update: Please note that currently there is a bug with the default installation where every key press toggles the sidebar (see comments). This is due to my incorrectly implementing the default shortcut key. Also, the intended default is a bit problematic because it tends to interfere with the Tools menu accelerator.

I plan to change the default to Alt+Shift+2 (Cmd+Shift+2 on the Mac) when I get the chance. In the meantime, you can do this yourself by setting todoist-sidebar.key to "2" and todoist-sidebar.modifiers to "alt shift" for Windows/Linux or "accel shift" for the Mac in about:config.

4/24/08 update: Please note that some users are experiencing behavior where every key they type (or some subset) toggles the sidebar (see comments). This may possibly be remedied by fiddling with the todoist-sidebar.modifiers setting in about:config. Please be patient and I'll look into this shortly.

8 comments:

Bram said...

The extension looks great. I came up with the original hack to put Todoist in the sidebar. I love how you improved it.

As you hint at towards the end of the post, I worry how long Todoist holds out. I switched to Remember the Milk, because of how well it integrates better with Gmail than Todoist (and an amazing iPhone site). It's only a matter of time before the full on Google Task Manager.

bookwormdragon said...

I greatly enjoy this extension, and thank you for creating it. It was one of the key factors involved in my decision to switch to Todoist. However, just one little problem. On the Firefox 2.0 nightly builds, the Todoist bar is constantly popping out whenever I hit the TAB button or the T button. This means it pops out whenever I use CTRL+TAB or ALT+TAB or type the letter T. Very irritating. I was able to fix this by editing the about:config entries that you mentioned, changing the keys to ones that I don't use for other purposes, by I wanted to let you know. If this occurs on other builds, less advanced users may be frightened away from this extension, not knowing how easy the fix is.
Below is a list of the other extensions I use, just in case it is one of them causing the conflict:
Application: Firefox 2.0.0.15pre (2008041804)
Operating System: WINNT (x86-msvc)

- Adblock Plus 0.7.5.4
- All-in-One Sidebar 0.7.5
- Autohide 1.1.5
- ColorfulTabs 2.0.10
- Compact Menu 2 2.0.3
- Custom Buttons² 2.0.7.5
- Deepest Sender 0.8.0
- del.icio.us IncSearch 1.10.2
- DOM Inspector 1.8.1.15pre
- Extension List Dumper 1.13.1
- Favicon Picker 2 0.3.4.3
- Findbar Basics 1.3.08
- FoxyTunes 2.9.5.31
- Google Notebook 1.0.0.19
- Google Toolbar for Firefox 3.0.20070525W
- LastTab 2.0.5
- Locationbar² 0.9.1
- Menu Editor 1.2.3.3
- Nightly Tester Tools 1.3
- Nuke Anything Enhanced 0.68
- QuietUrl 1.4.0.0
- Story Monitor 0.92
- Talkback 2.0.0.11
- Todoist Sidebar 1.0.1
- Undo Closed Tabs Button 2.0
- Update Scanner 2.0.15
- User Agent Switcher 0.6.11

Eddie said...

Vic,

I used the sidebar a few times and loved it - and then...

Realized that every keystroke I was making in the normal browser window was tabbing the sidebar on and off.

I am a total novice to programming, but if you give me the NAME of the file on my MAC to change the code to only put the sidebar on with something like "Shift `" then that would be great.

Looking forward to using,

Eddie

Vic said...

Thanks for the comments, everyone.

bookwormdragon and eddie, sorry that the strange behavior is happening. I did notice that same thing with certain values of todoist-sidebar.modifiers. I think I have bad values for the "modifiers" default. I'll keep investigating when I get back into town.

eddie, you don't need to change any files, simply enter

about:config

in your Firefox address bar and hit enter, then type

todoist-sidebar

in the search field, double-click the value

todoist-sidebar.modifiers

and play around with the values (restarting Firefox each time, unfortunately). For example, setting it to something like

control alt

should specify that Ctrl+Option+T will toggle the sidebar.

The documentation for what is valid is at http://developer.mozilla.org/en/docs/XUL:key (look at the "modifiers" attribute), but I suspect that it is not that precise or at least out of date.

Eric said...

Unfortunately, once I open this side bar once, it seems to override all of the other sidebars (ie bookmarks, history). So basically, if I later press CTRL + B to open the bookmarks sidebar, it just opens the todoist one again. Only way to reset is to close Firefox...Very annoying.

Anonymous said...

I'm experiencing the same problme as Eric (above); It's annoying that I have to restart FF every time.

Eric said...

I realized that if you upgrade to FF3 that the problem of the TD sidebar over-riding other sidebars disappears.

Anonymous said...

Hi, I just started using Todoist and would like to use this Firefox extension that you have created, but can't figure out how to install.
The info on Todoist help page says "Run extension.." but I don't know how to do this.

The Firefox instructions tell you how to add through Firefox Add-ons page; however, the version that appears here will not install because it is incompatible with FF3. Can you please upload the latest version to the FF Add-ons page? or provide instruction on how to add extension? Greatly appreciated, thanks :)