Open Bug 378872 Opened 13 years ago Updated 13 years ago

Make providers easily pluggable

Categories

(Calendar :: Internal Components, enhancement)

enhancement
Not set

Tracking

(Not tracked)

People

(Reporter: Fallen, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Attached patch Work in Progress β€” β€” Splinter Review
To make it easier to make new providers show up in the new calendar dialog, we have proposed that there should be a category for providers which the new calendar dialog can iterate through.

The new calendar dialog should allow the "Location" field to be provider specific, and allow an arbitrary number of additional wizard pages. Also, the name/color wizard page should be optional for providers.

I am attaching a work in progress patch, it doesn't quite work and is quite bitrotten (I was able to apply with -F 10). Credits go to Joey for the original proposal.

It would probably be better to put the provider specific UI functions into a javascript object, which can be replaced easier when the back button is clicked.

See the URL for the wiki feature implementation page.
Blocks: 378873
IS the current way really too difficult? I don't think it's that hard for an extension to add a overlay to the wizard.
With the suggested path, you force the things into certain directions. For example, you make them all have a location. But some providers might not have a use for that! (think an address-book provider, showing birthdays)
On the other hand, why should the name/color page be optional? All calendars should have a color. How could we show then without a color?
Forcing this into a certain direction has the advantage, that we don't mess up the UI if there are many providers. i.e if there are more than 5 providers, we may want to show a dropdown instead of radio buttons.

I thought of making the location property is specific to the provider. That way, a birthday provider just needs to make sure it doesn't have a location bar in its overlay. The idea from the F2F meeting was to make the wizard page only have the provider radiobutton (or dropdown) be the only item that is included by default. The providers should then use the rest of the space for some initial variables (i.e location field) and a help text.

Overlaying the wizard to include an additional wizard page might be easy, but currently there are problems with the next and previous pages. It would be nice if it were easy to manipulate that order.

Making the color/name page optional is primarily for providers that need a custom way to set the color. The GData provider for example will have a dialog that allows the user to add more than one calendar at once (i.e all calendars in the Google UI). The color is set differently for each calendar, therefore a page with color and name would be confusing and wrong. 

This bug is mainly a result of the F2F meeting, I am open for alternatives though.
(In reply to comment #2)
> Making the color/name page optional is primarily for providers that need a
> custom way to set the color. The GData provider for example will have a dialog
> that allows the user to add more than one calendar at once (i.e all calendars
> in the Google UI). The color is set differently for each calendar, therefore a
> page with color and name would be confusing and wrong. 

At the risk of getting off-topic, the idea of adding multiple calendar does not make me happy at all. Why does google need this? The wizard is for adding a calendar. When you add multiple google calendars, will they end up as multiple calendar, or as one? Showing as one would be the only reason for the dialog to have that page. But if they are one, it will be very confusing for the user. They see only one calendar in the calendar list, but that one calendar is in fact composed of multiple calendars. Confusing.
But if the calendars show as multiple calendars, what's wrong with opening the dialog multiple times? What's so special about google that it must be one wizard? (compare to ics: to subscribe to multiple calendars, you need to opend the dialog multiple times)
They will show as multiple calendars. The "special" thing about google is that in the UI, there is a fixed list of calendars. Users will want to add all their Google calendars when they see the list. I have had a user ask about this functionality, see [1].

If I make the new calendar wizard have a listbox with all Google calendars the user has and the user has many calendars he may want to add, I think he will get annoyed at the fact that he can only select one calendar to add, has to then reopen the wizard, reenter his google account data, and then select the next calendar.

[1] https://addons.mozilla.org/en-US/sunbird/discussions/comments.php?DiscussionID=822&page=1
Depends on: 379029
You need to log in before you can comment on or make changes to this bug.