After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695886 - Categorize providers by supported features
Categorize providers by supported features
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks: 695885 696077
 
 
Reported: 2013-03-14 22:22 UTC by Emanuele Aina
Modified: 2013-03-19 11:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
provider: Add GoaProvider:get_features() to list supported features (16.03 KB, patch)
2013-03-14 22:26 UTC, Emanuele Aina
reviewed Details | Review
provider: Add GoaProvider:get_features() to list supported features (17.94 KB, patch)
2013-03-15 12:55 UTC, Emanuele Aina
reviewed Details | Review
backend: Export the enumeration type definitions (881 bytes, patch)
2013-03-19 09:53 UTC, Emanuele Aina
committed Details | Review
provider: Add GoaProvider:get_features() to list supported features (17.50 KB, patch)
2013-03-19 09:53 UTC, Emanuele Aina
committed Details | Review

Description Emanuele Aina 2013-03-14 22:22:55 UTC
To avoid showing accounts and providers not related to the application invoking application we need a way to categorize them by the supported features/services, eg. when invoked from Empathy we should be able to ignore accounts and providers not providing instant messaging services.
Comment 1 Emanuele Aina 2013-03-14 22:26:07 UTC
Created attachment 238938 [details] [review]
provider: Add GoaProvider:get_features() to list supported features

The GoaProvider:get_features() virtual method will be the basis for
filtering providers by functionality to e.g. be able to show only
accounts and providers that provide IM services when requesting the
creation of a chat account from Empathy.
Comment 2 Debarshi Ray 2013-03-14 22:46:44 UTC
Review of attachment 238938 [details] [review]:

Do we still need a separate GoaProviderGroup and the get_group vfunc? Can't we merge those two or replace one with other?

We can add another flag for "branded" providers, and for the normal control-center UI we can use it to arrange the providers into separate categories as we do now. When we show the UI within the context of an application then we can use CHAT or DOCUMENTS to filter out only the providers that we want.
Comment 3 Emanuele Aina 2013-03-14 23:09:18 UTC
(In reply to comment #2)
> Do we still need a separate GoaProviderGroup and the get_group vfunc? Can't we
> merge those two or replace one with other?
> 
> We can add another flag for "branded" providers, and for the normal
> control-center UI we can use it to arrange the providers into separate
> categories as we do now. When we show the UI within the context of an
> application then we can use CHAT or DOCUMENTS to filter out only the providers
> that we want.

What about providers providing multiple features, which category do we choose?

We could either require that only branded providers can return multiple features or repeat each non-branded multiple-feature provider under the appropriate category, your call.
Comment 4 Debarshi Ray 2013-03-14 23:38:28 UTC
I don't know what Allan or Jon has in mind ...

I have been abusing BRANDED for even generic things like ownCloud because it offers multiple features and hence multiple integration points. So, I figured that it is ok to highlight them.

So in the normal c-c UI, we can show any provider that has the BRANDED flag (irrespective of whether they have PHOTO, DOCUMENTS, CHAT, CALENDAR too) in the first page, and then the remaining MAIL, CHAT, CALENDAR, TICKETING, etc in the next page.

For the application context UI, we can get rid of these pages / categorization and just list out all the providers offering a particular feature. So that way Empathy users will not be bothered with IMAP/SMTP or CalDAV crap.

(Ofcourse there are edge cases like Facebook which is BRANDED even though it only offers CHAT)
Comment 5 Emanuele Aina 2013-03-15 12:55:17 UTC
Created attachment 238975 [details] [review]
provider: Add GoaProvider:get_features() to list supported features

This also deprecates goa_provider_get_provider_group() to be replaced by
goa_provider_get_provider_features().
Comment 6 Emanuele Aina 2013-03-18 12:51:53 UTC
I've deprecated _get_provider_group() and done a simple conversion of g-c-c to _get_provider_features() in bug #695885. I've not done any change to how accounts are shown though, I'd rather see if the UI needs to be streamlined once the functionality is in place.
Comment 7 Debarshi Ray 2013-03-18 15:37:09 UTC
Review of attachment 238975 [details] [review]:

Thanks for the patch. Mostly looks good to me.

::: src/goabackend/goabackend.h
@@ +30,2 @@
 #define __GOA_BACKEND_INSIDE_GOA_BACKEND_H__
+#include <goabackend/goabackendenumtypes.h>

This isn't really needed for this patch, right? Could you please split it off into a separate patch? Just a minor nitpick.
Comment 8 Debarshi Ray 2013-03-18 15:43:07 UTC
(In reply to comment #6)
> accounts are shown though, I'd rather see if the UI needs to be streamlined
> once the functionality is in place.

That is fine.

It should be possible to autogenerate the show_accounts UI for non-generic providers. We'll see. It is not a blocker for these patches in my opinion.
Comment 9 Emanuele Aina 2013-03-19 09:53:06 UTC
Created attachment 239229 [details] [review]
backend: Export the enumeration type definitions

Export the GType definition for the GoaProviderGroup enumeration to
be able to box it inside GValue, etc.
Comment 10 Emanuele Aina 2013-03-19 09:53:49 UTC
Created attachment 239230 [details] [review]
provider: Add GoaProvider:get_features() to list supported features

Split the enum header fix.
Comment 11 Debarshi Ray 2013-03-19 11:43:23 UTC
Thanks for the patches.