Tabbed Composition - implementation questions
mconley at mozilla.com
Tue Mar 12 13:37:58 UTC 2013
This is great news! We've wanted tabbed composition for some time, and
I'm glad to hear somebody is hacking on it!
>> As discussed on BugZilla
> So how are they implemented? How can I
>> iterate over open compose tabs etc.?
You've already identified where most of our tab types are defined:
There are more examples here:
The tabmail binding that we use is pretty complex - but it's also
I would give this a thorough read:
I can also do my best to answer specific questions about tabs - either
send me mail, or find me in IRC (mconley in #maildev).
> After this, I have to finish porting OpenComposeWindow
This is an excellent opportunity for you examine our implementation of
compose windows and finding out where we can optimize, and where we can
clean up. Almost certainly there are things we do with the current
compose code that is no longer necessary, flat-out confusing, or just
generally suboptimal. This makes maintenance a heavy burden. Keep an eye
out for those - this is an excellent opportunity to clean some of those
things up. I encourage aggressive refactoring.
Josiah Bruner has been doing some excellent work coming up with ways of
cleaning up our UI. At some point, perhaps yourself, Josiah, and a
few other UI-involved folks should sit down and hash out what a new
compose tab would look like.
Anyhow, I'm thoroughly excited. Please send me the bug number you're
working in so I can monitor your progress.
On 01/03/2013 1:26 AM, Liam Edwards-Playne wrote:
> 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
> 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
> - 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
> Look forward to getting this long-awaited feature done.
> Liam (liamzebedee) Edwards-Playne
> tb-planning mailing list
> tb-planning at mozilla.org
More information about the tb-planning