Calendar:Feature Implementations:Provider Extensions

From MozillaWiki
Jump to: navigation, search

<< Back to Features

This page is meant to be used by calendar developers. To add minor comments/feedback, please use the discussion page. More extensive discussion should be taken the newsgroup.

Basic overview

This page covers what may be needed to allow extension developers to easily implement a provider as an extension.

UI Hooks

In general, it should be possible to easily extend each UI dialog listed in the following subsections. Certain existing elements should be made specific to their providers, so providers with different needs can add their own elements without having to remove currently existing ones. It should nevertheless be possible to remove the existing default elements. Common elements should be extracted to a resuable overlay, so that the look and feel between providers persists.

Care should be taken, that changes made to the UI don't clutter the layout even if many providers are installed.

Calendar Creation

This section regards /m/c/resources/content/calendarCreation.xul and the related files. Just after selecting a new calendar "On the network", the user is presented with many radio buttons. This could get unmanagable when many providers are installed. One possibility is to arrange the options as in the first obsoleted patch in bug 348028.

Also, it is currently assumed that every provider has an url that is well known by the user. Other providers may not need this url but prefer a different method of gathering data to add the new calendar. This may include a new wizard page, or be a small number of textboxes.

As a conclusion, the Location field should be specific to calendar providers that need it, i.e webdav and caldav. This way other providers like google can instead display a username and password field or other. Also, providers should only show their fields if their format is selected to prevent cluttering.

Regarding extra wizard pages, a mechanism should be created to allow insertation of an arbitrary number of wizard pages. Also, the function doCalendarCreate() in /m/c/resources/content/calendarCreation.js should be refactored to allow extensions to create multiple calendars at once.

Event Dialog

The event dialog may also be subject to change when a new provider is created. The advantage to the event dialog is that it is fully provider specific. UI changes can be forseen by the extension developer without the need to make sure that it still looks acceptable with additional providers.

Calendar Properties Dialog

Currently, this dialog has only a small set of options (color, readOnly) that can be changed. It should be possible to use this dialog to add additional elements, for instance an access level or calendar-specific defaults. As an example, Google Calendar has a number of calendar properties including a calendar-specifc timezone, the access level the user has to the calendar, and others.