# First Milestone of the Awesometab has landed!

Awesometab is the project name for a tab developed by Nihanth Subramanya during the Google Summer of Code 2013 (via Mozilla) which allows to quickly start the conversation you want to start. The suggestions will be based on several parameters like frequency and recency of previous conversations and will show the most likely results when you open the new conversation-tab. It will also include already ongoing conversations (Switch to conversation) and suggestions for multi user chats such as IRC channels and XMPP chatrooms on the servers that you’re connected to.

## What’s this milestone that has landed already?

After problems with the sheer size of the patch during last years GSoC project, we decided to split this year’s projects into smaller parts that can land as soon as they are ready.

So far a filterable contact list in a tab has landed that can easily be opened using the common shortcut of Ctrl+T for New Tab (from both the contact list or a conversation window) or by clicking the likewise familiar New Tab-button in the tab bar.

New conversation tab, list filtered for contacts starting with letter f

It features a search bar at top of the tab content which allows to refine the results. It currently matches the entered name against each part of the contact’s names but will do more later (see next section).

Contacts are displayed similar to results in Firefox’ awesomebar while retaining the familiar look of the conversation header with the contact icon and status indicator at the left and the contact name and status message to the right of it. Additionally the tags of the contact are displayed, indicated by the same icons as Firefox uses for tags on the Awesomebar.

Starting a conversation is as easy as single clicking on the result or selecting an item with the keyboard and pressing Enter – a middle click opens the new conversation in background instead while keeping the new conversation tab visible, just in case that you need to start more than one conversation!

## And what’s next?

The next step (already under development!) will be further improving this list by integrating already ongoing conversations (Switch to tab/conversation). We’d also like to include a way to filter the list by tags and to highlight the text that matches the filter like the Awesomebar does.

Later on a ranking algorithm will be introduced and tweaked to show the most important results first instead of the alphabetically sorted list that you currently get when opening the tab.

These changes are most likely going to be integrated as soon as they are ready and reviewed, so make sure you have a nightly build and update frequently!

I’m really happy to see how well this project is going, I’m already enjoying how easy it became to start a conversation using the filterable contact list. I’m looking forward to actually see the conversations I most likely want to start right away!

Thanks, Nihanth, it’s really great work that you’re doing here!

# LaTeX support brings prettier math to your messages

With our new add-on, any mathematics contained in your conversations will be beautifully rendered using MathJax.

It’s rather nice to be able to discuss math using familiar LaTeX markup, but with the equations displayed properly. And of course, as LaTeX is text-based, this works for all protocols, and does not depend on your conversation partners also using Instantbird!

No configuration is necessary — to use this, you don’t even need to have TeX installed.

You can easily obtain the LaTeX source of any equation using the context menu. AMSmath symbols and environments (such as \\begin{align}...\\end{align}) are supported.

There are a few customization options — for example, you can choose to have displayed equations numbered automatically, to make them easier to refer to.

The add-on works with all Instantbird message styles, so you don’t have to change your favourite theme.

# Tab completion in Instantbird 1.2

We’ve made some major improvements to the tab completion of nicknames in IRC channels (and other chatrooms). The goal, as always, is to make it “just work” (so you can think about more important things!).

Simply press TAB to complete the first couple of letters you have typed:

To undo the completion, just press Backspace as usual.

If there is no unique nick that fits the bill, Instantbird tries to guess which nick you mean from the context. For example, if you have recently been pinged by someone, that nick is preferred. Otherwise it just completes as much as possible, and shows you a list of alternative completions:

You can then always press TAB again to cycle through these candidate nicks until you get the right one:

(Shift+TAB will cycle through the list in the opposite direction.)

Notice how Instantbird automatically added a colon after the nick, as we were addressing someone at the start of a message. And if you add another nick, you get a comma-separated list:

Of course, sometimes that may not be what you intended. So if you delete the trailing colon by pressing Backspace, the punctuation adjusts accordingly:

Don’t forget you can also reply to any message by double-clicking it! This will add the sender’s nick to the beginning of the message.

# The Interruptions Manager

For Instantbird 1.1, which will be released soon, we realized a weak spot in our API was the ability to control whether events should be shown to a user or cancelled under certain conditions.  This fits in as part of our mission about giving control of instant messaging to the user: the user should only be interrupted by events that deserve their attention.  If you’re wondering how this is useful; extensions now have great control over how Instantbird is allowed to interact with the user.  For example, extensions could: keep conversations from opening (i.e. spam guards), quiet sounds during a full screen video, or even stop new conversations from opening if the user has set their status as Unavailable.

Extensions are able to simply register themselves with the interruptions manager and they will automatically be notified if certain events happen, including when Instantbird wants to: get your attention (e.g. flash the task bar), open a new conversation, play a sound or show a message notification.

The API is really easy to use and we’ve created some example add-ons that use it!  We have created an an add-on to not allow the NickServ from IRC accounts to open (source), an update of NickServKiller. Additionally there is an add-on to force auto-joined chats to be held on the buddy list (source), allowing you to give them your attention when you want to.  Another example of a great add-on is the Do Not Disturb add-on, which does not allow Instantbird to disturb the user while their status is set to Unavailable, really allowing you to concentrate on something more important (source).

There’s also a skeleton for an anti-spam add-on (an often requested feature!) that is just waiting to be finished!  Contact us on #instantbird on irc.mozilla.org if you’re interested in helping out.  And don’t worry, these extensions will be available on addons.instantbird.org soon!

We think this is a great addition for add-on developers working on Instantbird and can’t wait to see what exciting ideas people come up with!

# User icons

Another very visible change between Instantbird 0.2 and 0.3 is the possibility to set a user icon and a display name.

You will see a place holder icon at the top of the buddy list, just click it (this will open a file picker) to set an icon. The icon will be automatically resized and converted to fit the various size and format requirements of the IM networks you use.

Similarly, click the “Display name” place holder to edit it. This name will be visible in your contacts’ buddy lists (unfortunately this currently works only for MSN).

Here you go, your friends will now easily recognize you:

Conversation windows have also been changed to display your contacts’ icons and some more information (display name, status message, …):

I can already hear some comments about how much space this new information bar takes (or wastes) in all conversation windows. Yes, this takes a lot of space, we know. People tend to use big or very big windows for chatting (sometimes even full screen!) but if you like the ability to chat in small windows, don’t worry, we love you too! Just resize the window and this information bar will shrink to ensure you still see the actual content of the conversation:

And for very small conversation windows, the bar will completely disappear, leaving only the strictly necessary user interface:

# Better contact list

The contact list was identified as a weak area of Instantbird 0.2. It has been dramatically improved for Instantbird 0.3 which we plan to release next week.

## Tags

### Goodbye groups

Like most IM clients, Instantbird 0.2 had each contact placed in a group, leading users to organize contacts a bit like files are placed in folders on the disk.

While this seems ok at first, placing contacts inside groups doesn’t work well when thinking of the contact as a person. Don’t you have a friend (group ‘friend’) who is also a coworker (group ‘colleagues’)?

For this reason, with Instantbird 0.3 we replaced the notion of “Groups” with the notion of “Tags” throughout the user interface. While groups used to be containers for your contacts (it was possible to move a contact from one group into another), tags are additional data attached to the contact (you can add or remove tags on a contact, but no longer ‘move’ a contact) and thus a single contact can have multiple tags. To change the tags attached to a contact, use the “Tags…” context menu item of the contact; it shows a list of the existing tags with a check mark next to the tags attached to the selected contact. Checking/unchecking a tag in this list will attach/detach a tag from the contact.

### Hidden tags

It’s pretty common when using several accounts of different protocols on a multi-protocol client for the first time to have contacts scattered around in lots of meaningless tags. These contacts are typically those that have never been moved before and are still in whatever the default group of the various previous clients were.

As moving each of these contacts out of these meaningless groups is not really an interesting task, and sometimes is even impossible (if the server doesn’t allow us to move it), we have designed a more efficient way to forget the annoyance caused by the pointless resulting tags: when hovering a tag in the contact list, you will see an [x] icon. Clicking it will hide the tag (after showing an explanation the first time).

It’s possible to manage the list of visible tags (to unhide a tag) from the “Visible tags…” context menu item.

Contacts which haven’t been associated with a visible tag will be displayed in a special “Other Contacts” tag, always at the bottom of the contact list.

## Grouped contacts

If several networks are usable to IM the same person, you will no longer be annoyed by seeing that person listed several times in your contact list. Just drag and drop one of these contacts onto another and Instantbird will know they are both ways to contact the same person.

During future conversations, if your contact suddenly starts talking to you from a different network, the conversation will continue in the same tab. A system message will be displayed in the conversation to unobtrusively notify you of this change.

If you want to start talking to a different account of your contact, you can do so easily with a click on the protocol icon at the top right of the conversation UI:

When starting a conversation from the contact list, Instantbird will automatically select the best way to reach your contact, based on availability information and your preference with regard to the various ways to contact this person. You can change this preference by expanding a contact (with the down arrow icon) and then using drag and drop to reorder the accounts.

## Other noticable changes

• The contact list is now sorted: both tags and contacts inside a tag appear alphabetically sorted.
• Changes in the displayed information are smoothly animated, making them at the same time easier to understand and less interrupting.
• Closing the contact list window, which is not needed all the time, will no longer close Instantbird. On Windows and Linux it will be minimized to the system tray (this behavior can be customized in the Preference dialog); on Mac it can be easily reopened from the menubar.

# Introducing magic copy

The surprise and enthusiasm of a few people about the “magic copy” feature I mentioned briefly at the end of my previous post introducing time bubbles reminded me that we forgot to introduce this feature when it landed for Instantbird 0.2 as part of our implementation of the Adium message theme system.

We decided to use this theme system because it seemed nice overall and was already used by a few other clients as well. However there was something we really didn’t like: using a customized message theme could make copied data from the conversation really hard to read, to the point that it would be unsuitable for sending a quote via email.

As this may not be very clear yet, let me give an example:

This is the text we get when copying the selection to the clipboard and pasting it. This is without our “magic copy” feature of course.

I should also note that the Bubbles theme used for this screenshot is not the worst in this regards. I’ve seen in the description of some themes (not designed for Instantbird) that they were “clipboard friendly”, which indicates the theme author took this problem into account and probably had to make some trade-offs between the visual appearance and the usability of copied conversations.

As we were not satisfied with this situation (which either makes copying from the conversation poorly usable or restricts theme authors’ creativity), we developed a different system that instead of serializing the selected HTML attempts to detect which messages are selected, and to “prettyprint” them based on what Instantbird knows about the message, rather than what is visible and selected.

This is the result:

If only a part of a single message was selected, the username and timestamp won’t be added to the copied strings, it will behave like a normal text copy:

As we detect which messages are selected and even know if each message was fully selected or only in part, we can nicely add an ellipsis when a message was cut:

This even works when using multiple-selections (press Ctrl on Windows/Linux, and Command on Mac to do this):

A few technical details: the template used to serialize copied messages is both localizable and customizable from about:config, it’s also possible to completely turn off this feature in case it ever causes some trouble (look for the messenger.conversations.selections.* family of preferences in about:config).

This feature has been turned on by default in Instantbird for over a year and nobody complained about it. Actually, it’s one of the features that is barely noticed because it just works, but it is something that is really missed if using another IM client after using Instantbird for a while.