31
Aug 08

Berend’s developer notes: My XBL adventures in the calendar views

I recently fixed some issues around the event boxes in the calendar views (see calendar-multiday-view.xml and calendar-view-core.xml). They are implemented by means of XBL and although they are certainly a very sophisticated use case I found that the implemented bindings do not always utilize all features of this markup language. Probably some of these features are also missing in many other bindings around the world and so I thought this is worth a blog entry :)

Basically an XBL binding contains several elements: One ‘content’ element where the structure of the binding is defined, one ‘implementation’ element, that controls the behavior and one ‘handlers’ element that listens to events.

For the maintenance of an arbitrary XBL binding it is imperative to keep as much information as possible within its ‘content’ element. This way it is far easier for the developer to perceive the structure and logic of the binding and it also helps to avoid redundant information that may lead to bugs during the development process. If the developer should decide to modify the structure of a binding binding he will most likely run into problems when he then has to adjust the ‘implementation’ code at many places, too. In this context the ‘attribute inheritance’ feature executed by the ‘xbl:inherits’ attribute proves to be very helpful. This
attribute takes care that modifications are forwarded down to the appropriate child elements. When it is done like this, attributes may be directly set at the binding without any internal knowledge about it.

In some cases anonymous elements were added unnecessarily to the bindings. For example quite often one box element can be removed just by extending a binding to a ‘xul:box’ or whatever. ‘Spacer’ elements may be exchanged by setting the ‘pack’ or ‘align’ attribute to the parental element.

I observed that there is also some redundancy in the code. I remember that this has not been resolved with regards to the possible performance loss. From all I have read and heard about XBL this argument is to be taken seriously, but I believe that the use of the ‘children’ tag within a binding could be an elegant solution, because it allows to add various anonymous content at a defined insertion point.

XBL goes hand in hand with cascading stylesheets – whereupon one should pay close attention to move all style settings to ‘.css’ files. In my struggle with the calendar views I was frequently confronted with completely unexpected problems and side effects caused by seemingly harmless style attributes. For example I could see that setting attributes at certain elements seem to force a distinctive relayout and consequently trash the whole view because of too many other ‘compact’ widgets involved. This and some other side-effects have made me occasionally become anxious to destroy the layout by merely looking at the .css files!

Last but not least I certainly don’t get around to admit that the views have always run quite reliable and offer a vast functionality with an appealing design! As we all know a lot of blood, sweat and tears have accompanied their implementation…

I hope that we will find some time to give the code its finishing touch at the beginning of the next release cycle so that we have time to react to the inescapable regressions that will come up.


29
Aug 08

[August 29, 2008] 0.9 release status update

I guess it’s time to give you an update on our efforts to finally nail down the 0.9 release.

The major newsitem is, that we have decided on our last developer conference call that we will cut CalDAV scheduling from the list of 0.9 features. The reason behind this is, that we have found that this feature is still too immature for wide-spread consumption and the list of regressions would likely put the release date a few weeks (or even months) in the future. Therefore CalDAV scheduling will be disabled by default in 0.9, but interested users can enable it, by setting a hidden preference via about:config.

With that out of the way, we are now down to nine release blockers, where only four of the nine blockers will require code changes and the other five covering tasks to be done during the release preparation process by our build and documentation crew.

So hopefully, we can fix the four remaining code issues during the next week and give you first release candidate (0.9 RC1) shortly thereafter. We also have fixed some other bugs (15) during the last week. Here’s a list of last week’s bug fixes:

  • Bug 326792: ‘Next’ button doesn’t change to active when dragging URL into text field
  • Bug 366482: “Edit as new” for opened eml files results in a broken compose window
  • Bug 409166: Missing crop attribute in agenda checkbox
  • Bug 437412: Zero-length and short events are shown at the wrong times in timegrid
  • Bug 446303: Use the “RELATED-TO” property
  • Bug 447800: Month View is missing a right border
  • Bug 447814: Reloading remote calendars shows wrong progress in status bar
  • Bug 449449: Invitations Link: CPU usage every three minutes
  • Bug 450563: Attendee gets organizer alarm setting if he accepts iTip/iMip invitation
  • Bug 451585: Use ICS service for ics parsing in CalDAV
  • Bug 451827: no local storage calendar, error at startup
  • Bug 451937: Titlebar changes to text of Calendar Mode at midnight
  • Bug 452379: Accepting an invitation on caldav (Bedework) doesn’t work (regression)
  • Bug 452392: Minimum height of eventboxes is too little
  • Bug 452417: Readonly events should not show grippies on hover event

Many thanks go to all developers, contributors, localizers, testers, and supporters that make this possible.


27
Aug 08

CalDAV Testday Tomorrow, August 28

The next test day will be held tomorrow, August 28th. In the light of Bruno’s developer note, we decided that the main focus of this test day will be CalDAV. So, if you use a CalDAV calendar server, try with a recent nightly build of Sunbird or Lightning. But please backup your profile beforehand!

Please take a look at the CalDAV support matrix. This page overviews CalDAV servers supported by Sunbird and Lightning, and contains some additional information, e.g. where to download the server or how to configure a calendar client to exchange data with the server. If you have anything to add, feel free to do so.

There are also many fixed bugs that need to be verified. You simply have to add a comment to the bug report stating what product, version and operating system you used while verifying the bug fixed.

Join us in the #calendar-qa IRC channel on Thursday. All the information on the testday is on our usual Test Day wiki page.

Hope to see you in #calendar-qa!

Andreas & Martin
Calendar QA Team


22
Aug 08

Philipp’s Developer Notes: Using CalDAV with Google Calendar

When I arrived at the Mozilla Firefox+ Summit 2008 on the 28th, I was surprised to hear, that Google announced the release of CalDAV support for Google Calendar while I was up in the air. At first I thought Simon was joking when he told me, but he was not!
I had very mixed feelings on this step. On one side this is a really great step. Supporting CalDAV means that more applications will be able to natively read and write to Google Calendar, without the need for third party applications that proxy the write process through the web-based API. In the long run this means less work for me since at some point the Provider for Google Calendar will not be needed anymore. Instead of fixing the Provider for Google Calendar, I can focus on CalDAV bugs, which benefits both Google users and those of other servers. Also this is something I’ve been hoping for a while now and have asked Google employees about in the past.
On the other side, I was of course a bit disappointed, that all the work and pain I’ve put into the Provider for Google Calendar is now being made obsolete. This didn’t last long though, since thats just the way it goes with software and I was always aware that at some point something like this would happen. Nevertheless I have no regrets since I think I’ve done a great deal for users of the Provider and the feedback I’ve gotten was overwhelming (and mostly positive). Writing the Provider also taught me a great deal about the Mozilla codebase and how the calendar application works, so it was definitely worth it!
Since the above sounds much like I’m going to drop work on the Provider right away and suggest to use CalDAV, let me tell you that it is quite the contrary. As noted in Google’s blog post, the release of CalDAV support is developer-focused. There are a number of known issues and application support is currently quite minimal. At the time of release, as far as I know only Apple iCal actually works. Therefore, I’d still suggest to use the Provider for Google Calendar until Google’s CalDAV server is more mature.
Using a few workarounds introduced in bug 448561 and bug 451455 I was able to make Sunbird/Lightning’s CalDAV work with Google. If you are interested in testing, please feel free to take a look at the latest nightlies (Sunbird / Lightning).
Philipp


22
Aug 08

[August 22, 2008] Lightning/Sunbird Status Update

We’re getting nearer and nearer to our first 0.9 release candidate. With 31 bugs fixed in the last 10 days, many of them release blockers, we’re now down to only 11 release blockers at the time of writing. 8 of those 11 bugs currently still need a patch, so if anyone of our readers wants to help out, now would be a great time.

On the localization front it looks like the Macedonian and Turkish localizations will not be able to make it, but Slovenian will, so we’ll still be in better shape l10n-wise than we were during the time of the 0.8 release.

For anyone interested, here are the 31 bugs fixed within in the last 10 days:

  • Bug 316927
    Fix dataloss, when importing events/tasks with multiple categories
  • Bug 405222
    Time format not respected in prefs window
  • Bug 406581
    Enhance cal::detectTimezone() to dump errors
  • Bug 409921
    Implement CalDAV scheduling
  • Bug 417629
    Import ICS file to CalDAV server fails to handle recurrence-id correctly
  • Bug 435447
    Today pane events don’t change color when calendar color is changed
  • Bug 444532
    Select ‘Convert to->Task/event’ in the preview pane in mailmode causes an uncaught exception
  • Bug 447996
    Month View doesn’t display the full month anymore
  • Bug 448205
    Calendar mode does not set Thunderbird Application title (regression)
  • Bug 448561
    Allow CalDAV provider to work with Google Calendar’s new CalDAV
  • Bug 448771
    Open task context menu in calendar view -> output in error console
  • Bug 448946
    Switching calendar views via keys ALT+[1-4] is broken
  • Bug 449019
    Mouse over event in unifinder
  • Bug 449401
    Storage provider does cleanly separate items of the same id across different calendars
  • Bug 449573
    Deleting item/items from local ics file fails with MODIFICATION_FAILED, items missing
  • Bug 450107
    View -> Tasks in View command behaves erratic in Month view
  • Bug 450285
    Startup Error: mozStorage exception: createStatement failed (regression)
  • Bug 450381
    Itip email are not sent while being offline
  • Bug 450398
    Add Icelandic (is) and Chinese Traditional (zh-TW) to shipped-locales
  • Bug 450447
    Remove pa-IN (Punjabi) and mn (Mongolian) from all-locales
  • Bug 450451
    Remove mk (Macedonian) and tr (Turkish) from shipped-locales
  • Bug 450611
    Add space between icon and button text in occurrence selection dialog
  • Bug 451020
    Support for mixed server/non-server attendees
  • Bug 451162
    Organizer’s email address isn’t in iMIP invitation request
  • Bug 451174
    CalDAV provider can fail to check inbox
  • Bug 451327
    Move mouse to the unifinder, but not over an event -> error output
  • Bug 451353
    Emphasize open/unanswered invitations
  • Bug 451383
    Tooltips are not updated and display wrong information (regression)
  • Bug 451455
    CalDAV provider can delete items mistakenly
  • Bug 451529
    Deleting invitation copy sends out CANCEL to all attendees
  • Bug 451539
    Recurring items and attachments

Many thanks go to all developers, contributors, localizers, testers, and supporters that make this possible.


20
Aug 08

Bruno’s developer notes: CalDAV Scheduling Needs You!

One of the things we’re excited about for the 0.9 release is the addition of CalDAV scheduling support. CalDAV scheduling is an emerging standard; the first widespread use of it was in Mac OS 10.5, where it allows iCal users not only to store their calendars on a shared server, but also check each other’s free/busy schedules, send each other meeting invitations, respond to meeting invitations, and so forth.

With 0.9, people using Sunbird and Lightning will be able to do all these things, using not only Mac OS 10.5 servers but also a growing number of other CalDAV servers, both open-source and otherwise. And they’ll be able to do so regardless of whether the other calendar users they are interacting with are using Sunbird, Lightning, iCal – or some other CalDAV client we haven’t even heard of yet.

CalDAV scheduling support has just started to appear in nighlies over the last few days. It will be filled out further over the next few, but what it really needs most right now is TESTING! We’re really hoping the community will give this new code a serious workout and help us find whatever bugs remain so that it will be rock-solid for the 0.9 release. As Daniel has noted, testing nightly builds can be dangerous to both your profile and your data – so be careful but please do bang at it and let us know what you find.


14
Aug 08

Daniel’s developer notes: Be careful when using nightly builds…

There has been some trouble with an accidental SQLite database schema change I’ve backed out on monday (see bug 446303), which has forced people (which have updated to that specific nightly) to manually restore their storage.sdb.
I’d like to remind everybody that the nightly builds of Sunbird and Lightning are development versions that might break your profile and data. Even though the recent case didn’t bring any dataloss (at least I am not aware of any) and a workaround is available, please take care and do backups before updating.
To prevent SQLite database schema trouble in the future, we’ve decided to require an additional second review on schema changes, and may add a bug keyword to tag those important changes.
I hope you understand…


12
Aug 08

[August 12, 2008] Lightning/Sunbird Status Update

We’re getting nearer and nearer to our first 0.9 release candidate. With 34 bugs fixed in the last two weeks, many of them release blockers, we’re now down to only 18 release blockers at the time of writing. 10 of those 18 bugs currently still need a patch, so if anyone of our readers wants to help out, now would be a great time.

On the localization front, 30 of our 33 are ready for the release (hopefully Macedonian, Slovenian and Turkish will still be able to make it), so we’ll likely be in better shape l10n-wise than we were during the time of the 0.8 release.

For anyone interested, here are the 34 bugs fixed within in the last two weeks:

  • Bug 199732
    Events spanning days are seen as multiple events (display)
  • Bug 311773
    Initial landing of the Islandic Calendar localization
  • Bug 348264
    ORGANIZER property lost after import + export
  • Bug 363932
    Delete Warning should be redesigned
  • Bug 390313
    Tooltip too narrow with some Windows themes, text is truncated (regression)
  • Bug 412606
    Storage provider does not store X-params of attendees
  • Bug 421716
    CalDAV provider should support getctag
  • Bug 434354
    CalDAV provider should cope with multiple principal-collection-sets
  • Bug 435174
    Today Pane not displayed after startup when using Spamato extension [Error: LOG is not a function]
  • Bug 437412
    Zero-length and short events are shown at the wrong times in the timegrid (regression)
  • Bug 437420
    Wrong display of WCAP all day events in the unifinder
  • Bug 440106
    Editing of an event on a cached calendar in online mode isn’t possible
  • Bug 444276
    Try to accept a iTIP/iMIP invitation (open Mail in a separate window) -> select calendar dialog is empty
  • Bug 440358
    No WCAP calendar events visible after restart of sunbird
  • Bug 440700
    [Trunk] Cannot switch back from Calendar to Mail Mode [Error: mailToolbarMenuItem is null] (regression)
  • Bug 442915
    Warning: reference to undefined property this.mTaskArray[aRow]
  • Bug 445287
    Cache combined with read-only calendar spawns error flood
  • Bug 445492
    Use ‘DEL’ key to delete an event of a rule -> ‘Deleting Repeating Event’ dialog starts two times.
  • Bug 445731
    Editing an saved event with an attendee -> 2 mails were send, one ‘Event Invitation’, one Event Canceled’
  • Bug 445995
    Event dialog also contains elements from task dialog (regression)
  • Bug 446512
    Recent nightlies of Lightning cause NULL-pointer dereference crash in TB
  • Bug 447997
    Multiweek View doesn’t update when changing menu View -> Number of Weeks selection
  • Bug 448206
    Calendar creation wizard acting weird when creating a calendar with duplicate URI
  • Bug 448325
    Today Pane context menu: Delete command inside ‘Convert To’
  • Bug 448453
    Caldav Calenders working with 0.8 don’t load under 0.9pre
  • Bug 448753
    Lightning and GData Provider are incompatible to Thunderbird 3b1pre (Gecko 1.9.1) builds
  • Bug 448803
    CalDAV provider should not query-by-uid for moved items
  • Bug 448886
    Unable to edit event: comes up with attendee confirmation
  • Bug 448946
    Switching calendar views via keys ALT+[1-4] is broken
  • Bug 449031
    Add meta data API to memory/storage
  • Bug 449177
    Support free-busy querying for the GData Provider
  • Bug 449424
    Error “Component is not defined” in calendar-dnd-listener.js and sun-calendar-event-dialog-recurrence.js
  • Bug 449917
    Opening context menu without having selected an item reveals blank entry
  • Bug 449964
    2008-08-07 gdata-provider is last one that works

Many thanks go to all developers, contributors, localizers, testers, and supporters that make this possible.


11
Aug 08

Calendar Community Testday On Thursday, August 14

The next test day will be held on Thursday, August 14th. This time we want to take a look at all localized Sunbird builds. Currently there are 33 languages available, and testing all of them is a huge amount of work. You can find the localized builds at http://ftp.mozilla.org/pub/mozilla.org/calendar/sunbird/nightly/latest-mozilla1.8-l10n/. The goal of our test day is to run as many Localization Litmus test cases as possible. Your feedback by editing the Test Plan for 0.9 is appreciated.

There are also many fixed bugs that need to be verified. You simply have to add a comment to the bug report stating what product, version and operating system you used while verifying the bug fixed.

Join us in the #calendar-qa IRC channel on Thursday. All the information on the testday is on our usual Test Day wiki page.

Hope to see you in #calendar-qa!

Andreas & Martin
Calendar QA Team


05
Aug 08

Daniel’s developer notes: How to present infinite recurring event series?

Sunbird and Lightning both have a feature called the “unifinder”. It’s the box at the top if you click the toolbar “Find Events”. Next to the search text field you can select different time ranges to be scanned matching your search (or just present all matching the range if you leave it blank). The drop down box offers several time ranges, such as “All Events”, “Today’s Events”, “Next 7 Days”, …

While the ranges look sensible, they cause me some headache, more specifically the unbounded ranges “All Events” and “All Future Events” w.r.t. infinite recurring events. If you select one of the unbounded ranges (e.g. “All Events”), the current implementation will only show the master items of recurring events, because there’s no finite range to expand into. It shows the events in their condensed (unexpanded) form. While this approach misaligns the UI a bit (the other filters show recurring events in expanded form), it looks like a feasible way at first glance (modulo bugs around it). But there’s yet a further problem with this approach: You could override´single occurrences of a recurring series, e.g. modify the start and end of an occurrence. Those are currently left out.

The latter and the inconsistent UI let me doubt that showing event series in condensed form is really what we want here, moreover because IMO showing expanded occurrences is far more intuitive. Solving the problem, I can imagine two solutions:

  • We simply drop the unbounded ranges (no “All Events”, no “All Future Events”).
  • We dynamically expand the list as the user is scrolling it down, if this feels good.

For the moment, until we have a good solution, I’d vote to remove the unbounded ranges.

I hope there are more options that we could consider, and would like to hear your feedback on this topic…