Tag Archives: contacts

A glimpse of a new address book for Thunderbird

I’ve been working on a new address book for Thunderbird.

And I’m making progress.

I’ve reached a point where I feel like the back-end can do something useful, and I want to start worrying about how the front-end works and feels and functions.

Now I’ve got a web-based super-early prototype for you to try.

A screenshot of the mockup in my Firefox browser.

Some caveats:

  1. Bear in mind this thing is super early, and super incomplete.
  2. The primary goal of this version of the prototype is to determine if the general layout makes sense
  3. Adding contacts, and adding new fields to existing contacts does not work
  4. Expect hacky hacky crap code if you look inside the mockup. Here there be monsters.
  5. The menu button in the right-top corner does not work
  6. I’ve only tested / developed in Firefox. Other browsers are not supported, and I don’t plan to sweat about it too much.

Wow, so it sounds like this thing doesn’t do a whole lot. So what does it do?

  1. It loads a list of 500 fake contacts for you to browse through.
  2. It allows you to see the email addresses for each contact that has an email address
  3. Simple searching works
  4. Different contact categories can be viewed
  5. Gives you a sense of how the layout would be. Hide Firefox’s navigation bar for bonus points!

There’s also a big fat FEEDBACK button at the top of the mock. Please give me feedback. Or click here to go to the form directly. Am I heading in the right direction?

Here’s the link to the mock-up. Give it a whirl!

And here’s the Github repository if you want to cry while reading my crappy mockup code.

Expect more of these.

Rambling about a new Address Book for Thunderbird

Hey all.

I’ve been pretty bad about talking about the address book. Sorry about that. I’ve been pretty busy helping to get Instant Messaging shipped for TB 15.

But with IM polished off, I’ve (once again) started refocusing my attention to the address book.

So where am I?

The Ensemble Project

In short, I’m writing an add-on to experiment with approaches to a new address book. I’m calling it “Thunderbird Ensemble”, because every project needs a cool code name.

The add-on is in its very very early stages. Nothing is usable. Nothing is stable or guaranteed. There’s no UI yet, but there are some tests.

You can track my progress here.

Here are some highlights, implementation details and unstructured thoughts about the add-on, and where I’m going with it:

SQLite Storage Back-end

I’ve chosen to use SQLite (via mozStorage) for the contact database. I was originally toying with using indexedDB, but it’s lack of support for substring searches (which is necessary for things like auto-complete) wasn’t very appealing. I briefly toyed with throwing my own indexing layer on TOP of indexedDB, and then I realized that I was probably reinventing the wheel.

So SQLite it is!

Diffs, Diffs Everywhere

Contact records are a representation of the fields and meta data about a contact. My add-on will be able to calculate diffs between records, and those diffs can be applied on top of records to make changes.

So, for example, suppose I decide to make some changes to a contact – I add some email addresses, remove a phone number, and change a birthday. I’m effectively creating a diff.

Now we apply the diff on top of the original contact, and send the resulting contact record to the datastore for storage.

If the storage happens to be on the network, and the original record we applied the diff on to was out of date, we should get a fresh copy of the contact record, apply the diff, and try again.

Conflict Resolution

With diffs comes conflicts resolution – but conflict resolution is never a pleasant experience, and I’d like the user to not have to deal with that if possible.

My solution is to just be optimistic – if a diff is asking to remove something that isn’t there, great! Mission accomplished! If the diff is adding something that already exists, no problem! We skip!

And for things that get changed, like birthdays, we simply say that the last writer wins.

Maybe that’s naive, but that’s the approach that I’m taking.

What do I have?

I can create contact records, diff them, apply diffs, and “merge” two records together. And I have tests for all of that work.

I’ve got the start of the SQLite backend working (basically, we can set up the database…but that’s it.)

I’m currently working on importing old Thunderbird contacts into Ensemble’s notion of contact records.

After that, I’ll work on getting them written to the database.

Comments? Questions? Complaints? Ask them here. It’s still really early on in the process, but if you find bugs in my code, please file issues on GitHub.

A Slight Redirection

Last week, I wrote a post about a plan to extend the up-and-coming B2G Contacts App into the next iteration of Thunderbird’s address book.

After careful consideration, we’re going to redirect that effort a little bit.

Instead of working on the Gaia Contacts App, I’ll instead be focusing on making the underlying Contacts API work on desktop (at least for Thunderbird).

We will then design an address book for Thunderbird, distinct from the Gaia Contacts app, to operate on top of the Contacts API.

I’m really sorry about the confusion. I made a mistake, and misinterpreted a few lines in an email, got excited, and then put up a blog post about it. My bad, and I’m sorry.  Here’s a puppy:

http://www.mylot.com/w/image/2397146.aspx

Ultimately, this is likely a good direction; extending a mobile application like the Contacts app to be a fully functional desktop address book was, in hindsight, a bit of a long-shot.

Anyhow, this is all implementation detail. The good news is that Thunderbird will be getting a new address book, and now we have full-reign to design the user experience and interface ourselves!

Hey, what about Thunderbird’s new address book?

UPDATE (May 7th, 2012): Some of the information in this post is now out of date / inaccurate.  See this post for more information.

This happens every couple of months – I go total heads down on a project, and I don’t blog. That’s no good for people who are interested in what I’m doing.

Filelink

So lately, I’ve been busy helping to get Filelink ready for its Thunderbird 13 debut. Filelink is a feature that allows users to upload attachments to Dropbox and YouSendIt (and more, soon), and then insert links into the emails instead of the whole attachments.

That’s a good thing. Every time you send a large attachment through e-mail, Tim Berners-Lee cries.

The Filelink work is almost done, which leads me to…

Address book

I went to some lengths last year to extend and improve the Thunderbird address book, and it’s still in pretty rough shape. For a while now, I’ve wanted to redesign it from the ground up – but some other project usually gets in the way before I can really tackle it.

With Filelink out of the way, I think I might get some time to hack on this.

But…I think I’m going to be taking a round-about route. Before I go into this, I’m going to need to mention The Kilimanjaro Event…

The Kilimanjaro Event

Damon Sicore is the VP of Engineering at Mozilla, and he recently posted about a new initiative at Mozilla, called The Kilimanjaro Event.

Salient point:

The Kilimanjaro Event is the point in time (not a release) when we realize a tightly integrated set of products that enables users to use the ID of their choice to find and install Web apps from HTML5 App marketplaces–including one created by Mozilla–and have those apps and appropriate data synchronized amongst devices.  It is important to point out that the Kilimanjaro Event is not a single release.  It is an incremental effort where we deliver a series of releases and features to each of our products that result in and enable an end-to-end user experience across these efforts.

One of the key components involved in reaching The Kilimanjaro Event is the mobile operating system that Mozilla is working on, code-named Boot2Gecko (or B2G).

Boot2Gecko (B2G)

Put simply, B2G runs web apps. Period. The B2G dialer?  Web app. The settings manager? Web app. The lock screen? Web app.

The contacts manager?

You guessed it.

The Contacts App

B2G will ship with a series of apps (Gaia) – and among those will be an app for managing your contacts. I’ve gotten myself involved there, and have started getting my hands dirty in Gaia code.

So what’s the plan? How does this affect Thunderbird?

My idea is to work on this app for B2G, get it shipped, and then attempt to bring it over to Thunderbird, expanding it and specializing it where necessary.

This offers a number of advantages:

  1. The Contacts app for B2G will be entirely HTML5/JS/CSS based, meaning a lower barrier to entry for hacking on
  2. The Contacts app makes use of the Contacts API, which allows us to add an arbitrary number of email addresses, phone numbers, and all the other goodness that you’d normally expect from a modern address book
  3. Part of the Kilimanjaro Event is to have “apps and appropriate data synchronized amongst devices”. This includes contact data. This means that if we can get Firefox Sync brought over to Thunderbird, and rely on the Contacts API for contact storage, we can likely get contact synchronization pretty cheaply.  That means that your Thunderbird contacts will be synchronized with your B2G phone (or whichever device is running the Contacts app).  Not bad!
  4. Synchronizing with services like Facebook, Google Contacts, LinkedIn, etc – this is something that’s on the eventual roadmap for the Contacts app.  Thunderbird can ride that wave too.
  5. Importing from services like those listed above are a pretty high priority, and will likely be supported sooner rather than later.

Now, a couple of things that worry me a little:

  1. I don’t want to fork the Contacts app, meaning that I want the core to remain the same as it exists in Gaia. Instead, I want to layer more code on top of the app in order to make it make sense in the context of a desktop application. Possible? Sure. Tricky? Almost certainly.
  2. The Contacts API isn’t currently supported for desktop right now – the WebAPI team is working hard on getting it working right for mobile first.  Desktop is a distant goal.
  3. Also, the Contacts API is defined as an interface for accessing the device address book.  For a phone, it’s obvious what that is.  For a desktop, it means the OS address book.  This means that, unless I’m misunderstanding, TB contacts will be going directly into the OSX address book, Windows Contacts, what-have-you.  If no such service exists in the OS, Gecko puts together a fallback database for you.

Papercuts

Along with this contacts work, there are a bunch of long-standing Thunderbird papercuts that I want to smash through. Here’s a partial list of them.

I’m hoping to drop that list to close to zero for TB 15.  Fingers crossed!

Anyhow, this appears to be my current trajectory, until further notice.

Sync Thunderbird with your Google Contacts

There are a bunch of add-ons out there to help you sync Thunderbird with your Google Contacts.

I want to share my favourite one with you.

Simply named, “Google Contacts”, this add-on automatically detects if you have a GMail account in your profile, and does the rest of the heavy lifting for you.

Honestly, it’s as easy as falling off a bike.

Get it here.

So a big thank you to the add-on developer, H. Ogi!