Saturday, June 29, 2013

Daily report: June 28th 2013

  • Fixed some bugs related to observer notifications and the updateContact method.
  • Updated my Pastebinner addon to allow the user to set a default language for pastes, and also detect diffs (startsWith("diff") ;) ). Nominated it to be public, and aleth approved the request.
  • While doing that, found a bug - Services.cmd.unregisterCommand wasn't working. Filed it and aleth (after "half an hour of debugging"!) found the problem that was right under our noses.
  • I went through the code and did a sort of self review - fixed some nits, added comments, did some general clean up. Found a couple of minor bugs and fixed them.
  • Incorporated Mic's icon and Firefox's tag icon.
  • Finally uploaded the new patch for review.

Friday, June 28, 2013

Daily report: June 27th 2013

  • Did some more work on handling of DOM elements. Instead of permanently linking a list item with a contact and removing/adding them when resorting/filtering, now the required number of items is maintained in the list and each is refreshed with the correct contact for its index. I know this sentence may not make complete sense, the code in my repo might make it clearer. This was inspired by a suggestion from Mook on IRC.
  • Items are now appended as the user scrolls.
  • Performance is greatly improved. Very little to no lag while loading contacts, resorting, etc.
  • Added Mic's favicon and also started using the tag icon from Firefox.
  • Submitted a patch to add a method to the Contacts Service to return an array of all contacts. This is checked in.
  • Started maintaining a short-term todo list in the etherpad.

Thursday, June 27, 2013

Daily report: June 26th 2013

  • The tabbrowser patch is finally checked in, as is a patch adding an /about command to show about:* pages in a new tab!
  • Today I worked on rewriting the awesometab buddy list code to better handle DOM elements.
  • I've now got it dynamically removing and adding elements as necessary rather than displaying the whole list and filtering with CSS. Code is uploaded to my repo.
  • There was a discussion on executeSoon and avoiding multiple calls to a function in a short time on IRC.
I am going to try and write these logs from now on. They may be of some use later on, or just nice to look back at.

Monday, June 24, 2013

Weekly report: June 23rd 2013

This week the tabbrowser patch saw a lot of tweaking (four review iterations iirc) and is now almost checkin-ready. I also worked on bug 2002 - adding a command to display about: pages in a new tab. This was a good demonstration of the new tabbrowser features and might help iron out any remaining bugs once it lands in the nightlies and users try it out.

I also worked on the awesometab buddy list. There were discussions about the UX on IRC and I experimented with a few UX ideas (async loading of contacts, alternating background for list elements, displaying only a few contacts at a time and loading more while scrolling, etc). Many of the to-dos have now been crossed out (see previous post). Next week I hope to report much more progress on the UX and possibly some initial details of the filtering/ranking system that is a major part of my project.

A few things that I want to mention:
  • Mic created a cool icon for Awesometab. Thanks!
  • I learned more about the working about XBL. I had a few frustrating moments because I did not realize that bindings were applied only after adding the element to the DOM (because they are applied from CSS) until Mook kindly pointed this out on IRC (thanks for saving me a lot of time when nobody else was around!). This same issue forced me to be extra careful while dealing with addition/removal of contacts from the Awesometab buddy list.
  • I still haven't received my GSoC welcome package and hope it comes soon :(

Saturday, June 15, 2013

Weekly report: June 15th 2013

It appears I can't remember to post daily logs. Instead, I've decided to post whenever something stumps me, or I discover something interesting, or in general when I want to log something I run into.
Now that that's out of the way, here's what I've done this week:
  • The tabbrowser changes are now pretty much complete and are awaiting review! There are still some nits and other things I need to address, but it should be pretty minor stuff.
  • Tabbrowser being tamed, I set out to start work on Awesometab. The goal is to have a buddy-list type UI as an initial milestone. So far, here's what I've managed:
    • Awesometab can be launched via keyboard shortcut (Ctrl+t), context menu, and the new tab "+" button.
    • It displays a list of buddies - nothing fancy, just a list of names - and a search bar.
    • On typing into the search bar, buddies are filtered based on whether their display name starts with what has been typed (not case sensitive).
    • When the "Enter" key is pressed, conversations are started with all the buddies selected in the list, and if no buddy is selected, the first one in the list.
  • I'm pretty happy with my progress so far, but a lot remains to be done! Here's a to-do of what I want to finish in the coming days:
    • Opening an Awesometab in a new window needs to maintain the current value in the search box and currently visible buddies.
    • Adding buddies to the list should be async.
    • Show conversations on hold in the list.
    • Make things pretty. The buddies should be displayed with their profile pictures, status messages, availability, etc.
    • Sorting - based first on availability, then alphabetically. Protocol must also be taken into account. Right now the list is completely unsorted.
    • A bit of polish - double clicking a buddy in the list should open a conversation, a context menu, etc. - basically adding in more buddy list functions.
With that I sign off! Have a great weekend!

Monday, June 10, 2013

Daily report: June 9th 2013

  • I fixed tooltips for generic tabs.
  • I merged the latest default branch into my awesometab branches. (I should do this more often)
  • I filed a bug and submitted a patch to fix indentation in buddytooltip.xml.
  • I reviewed my changes so far, made a couple corrections and uploaded a patch requesting feedback. I plan to update the patch with more comments and the buddytooltip.xml indentation fixes before requesting review.

Sunday, June 9, 2013

Weekly report: June 8th 2013

Most of the tabbrowser cleanup is now done! Here is a commit merging these changes into the awesometab branch in my repo. I've been working on these changes the past two to three days - though I had some personal things to take care of which took some of my time.

To summarize the tabbrowser work so far:
  • Tabbrowser-tabs are now fully transparent to the nature of their linked panels. The tab panel a tab is associated with is now stored in its linkedTabPanel property, though the linkedConversation property is still set (identical to linkedTabPanel) - it can be used to check if a tab holds a conversation, and conversation specific code is more easily understood.
  • Tabbrowser now accepts non-conversation tabs and displays them without errors.
  • All basic functions like moving tabs around, detaching and reattaching, opening in a new window, etc. work for these tabs.
  • Tab specific context menu items are handled by getting a NodeList containing menuitems from the tab panel.
  • Cleanup has been done to make tabbrowser as transparent to tab content as possible.
  • Fields like mCurrentConversation, mCurrentBrowser, etc are replaced by properties which return them from mCurrentTab. This saves setting them in different places - now only mCurrentTab needs to be set.
  • Some changes have been made in other files to make them aware that not every tab holds a conversation (keyboard shortcut commands for e.g.).
What's left:
  • Tooltips need to be taken care of. I've looked into this and it doesn't seem to be too tricky. I currently plan to do something similar to the menuitems, where the tab panel returns its tooltip data.
  • It needs to be decided whether the tabPanel binding - which now functions as an abstract class - should be kept or not. Though it doesn't do much, it can be good documentation for developers who want to add non-conversation tabs.
  • As an alternative to having pre-defined methods that are expected to exist in all tab panels, DOM events could be fired and tab panels could respond to them as they wish (as suggested by flo).
  • After this, the changes need to be reviewed and checked-in to fix bug 426.
  • This isn't exactly a pending task, but it was proposed in IRC that awesometab's algorithm could learn from logs so that users could benefit right away.

Thursday, June 6, 2013

Daily report: June 5th 2013

My tabbrowser work has now reached a stage where a tab linked to an arbitrary panel can be added to a conversation window, moved around, etc with almost no errors. Context menus and nearly everything else also work fine. I only ran into one pesky error with the zoom manager, caused when the tab is opened in a new window - this.mCurrentBrowser is undefined because the tab doesn't have one. Debugging that will be a job for tomorrow!

The code has been pushed to the awesometab-experimental branch on my repo. Also I was a bit bored and recorded a demonstration video - here.

Meanwhile, I got default prefs working with my Pastebinner add-on thanks to the good folks at #instantbird.

To-do:
- Fix the bug mentioned above.
- A lot of cleanup has to be done so that the code is worthy of a check-in.
- Mic suggested I start collecting data to test my sorting algorithm later on - I want to write an add-on for this.
- I need to submit my add-ons to AIO.

Tuesday, June 4, 2013

Daily report: June 3rd 2013

I forgot to write up yesterday's report, so this post will cover what I've done the past two days.
  • I decided to scrap the idea of having a generic tab to be extended, since tabbrowser-tab has very little conversation-specific code anyway. Now, tabs themselves are fully transparent and there is no need for them to be extended.
  • The conversation binding now extends tabPanel - a generic panel to be added to tabbrowser. Future UIs that want to open in a tab should also extend tabPanel.
  • I moved conversation specific menuitems from tabbrowser to the conversation binding. These are now "injected" into the context menu when it is shown.
  • Code for the above has been pushed (except for the last bit which is awaiting review) to my repo.
  • Aside from this, I worked on an addon - Pastebinner - which pushes any message more than 10 lines long to a pastebin and sends the link as a message. It also adds a "/paste" command using which files can be pastebin'd and sent. I suspect this will be useful throughout GSoC.

Sunday, June 2, 2013

Daily report: June 1st 2013

I wasn't at home most of the day, but I did get some time to work after dinner.
  • I was able to start over work on moving conversation specific code out of tabbrowser.
  • Here's a diff of progress so far.
  • Here is a discussion on this on #instantbird.

Saturday, June 1, 2013

Daily report: May 31st 2013

Today I experimented with the abstraction code, ending up with more breakage than functionality.
  • I worked on replacing linkedConversation with linkedPanel, since linkedConversation is mostly used in a way that doesn't depend on it actually being a conversation.
  • I moved the tab context menu code to the tabbrowser-tab binding. This worked, but didn't yield very good results. Tab images got a bit broken and there were some mouse event issues.  I decided to move it back to tabbrowser, with the idea that generic tabs which wanted to implement their own context menus could do so by setting unsetting mousethrough="always" - this would show the tab's particular context menu rather than tabbrowser's.
  • I added in a aTabClassName parameter to addGenericTab to allow tab classes other than tabbrowser-tab.
Progress was slow again because I had to decipher a lot of vague/complicated code (e.g. this.parentNode.parentNode.parentNode.parentNode.foo(this)) and wasn't able to open DOM Inspector until Mook_as mentioned the -inspector command line flag (thanks!).

To-do: make tabbrowser-tab easily extendable and further work on tabtest.xml to be a full proof-of-concept for adding non-conversation tabs.