Tabbed Composition - implementation questions

Liam Edwards-Playne liamzebedee at
Fri Mar 1 06:26:28 UTC 2013

Hello all,

As you may/may not know, I've been working on tabbed composition for the past month now and I'd like some help on the codebase/architecture. Currently ported the bulk of OpenComposeWindow and OpenComposeWindowParams to JS functions and have rewritten nearly all the calls to the JS port, and now looking into the window/tab management stuff.  

As discussed on BugZilla, it would be best to implement the new 'compose tab' like the message view tab (mail/base/content/mailTabs.js), so it can be opened in either a new window or new tab and so forth. This would also allow for older users to still use windows (should tabbed composition be a default?). So how are they implemented? How can I iterate over open compose tabs etc.?

After this, I have to finish porting OpenComposeWindow, which includes:
- integrating GetOrigWindowSelection to use the new compose tab mode
- integrating LoadDraftOrTemplate - which is a tricky function compared to the others because it goes down a long road of function calls (DisplayMessage onwards) before it reaches any UI-related code. 
- integrating ComposeMessage to iterate through open draft tabs
- rewrite the argument passing mechanism (nsMsgComposeParams) to use something other than window.arguments - MsgComposeCommands.js
- some other misc. stuff todo with js string encoding

After that, some more things:

- Rewrite the code to close the message tab (so it doesn't try to close the window and crash)
- Redesign the UX so there are not 2 menu bars - this will be very interesting
- Add options similar to "Preferences->Advanced->Reading and Display" (open message in new tab/window etc.)

When the majority of the coding is done, we'll have to get in touch with UX for the menu bar and whether compose should open in a new tab by default. 

Look forward to getting this long-awaited feature done.

Liam (liamzebedee) Edwards-Playne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the tb-planning mailing list