KTp/libkpeople: Difference between revisions

From KDE Community Wiki
< KTp
(fix link to libkpeople on projects.kde.org)
 
(27 intermediate revisions by 3 users not shown)
Line 10: Line 10:
==Setting up==
==Setting up==


Install libkpeople (https://projects.kde.org/projects/playground/network/libkpeople)
Install libkpeople (https://projects.kde.org/projects/playground/network/kpeople)
Install ktp-nepomuk-service (https://projects.kde.org/projects/playground/network/telepathy/ktp-nepomuk-service)


start the nepomuk service either by logging out/in or by running "nepomukservicestub nepomuktelepathyservice"
Reinstall KTp, and you have metacontacts everywhere.


Install and run ktp-contactlist branch mklapetek/kpeople
You may also want to install PersonViewer a tool to view all contact information from all sources (http://quickgit.kde.org/?p=person-viewer.git)
 
You may also want to install PersonViewer a tool to view all contact information from all sources (http://quickgit.kde.org/?p=scratch%2Fmklapetek%2FPersonViewer.git)


==Tasks==
==Tasks==
Line 25: Line 22:
|- style="background: #ececec; white-space:nowrap;"
|- style="background: #ececec; white-space:nowrap;"
! Status !! Summary !! Notes || Claimed By
! Status !! Summary !! Notes || Claimed By
{{FeatureProjectTodo
{{FeatureProjectDone
| Add KPeople namespace
| Add KPeople namespace
|
| 3 votes to 1 on kpeople vs people
|
| David
}}
{{FeatureProjectDone
| Update Roles as per discussion
|
|MCK182
}}
}}
{{FeatureProjectTodo
{{FeatureProjectDone
| Restore updates on presence change
| Restore updates on presence change
|
|https://git.reviewboard.kde.org/r/110801/
|
|Dave
}}
}}
{{FeatureProjectTodo
{{FeatureProjectDone
| Remove unused / commented out code
| Remove unused / commented out code
|
|
|
|Dave
}}
}}
{{FeatureProjectTodo
{{FeatureProjectDone
| Add dialog for finding duplicates
| Add dialog for finding duplicates
|
|
|
|franck
}}
}}
{{FeatureProjectInProgress
{{FeatureProjectDone
| Add Dialog to view PersonData  
| Add Dialog to view PersonData  
| (see PersonViewer) in mck182 scratch
| (see PersonViewer) in mck182 scratch
}}
}}
{{FeatureProjectTodo
{{FeatureProjectInProgress
| Add widget to PersonViewer to view associated websites
| Add widget to PersonViewer to view associated websites
|
|
Line 57: Line 59:
{{FeatureProjectTodo
{{FeatureProjectTodo
|Port away from QStandardItemModel
|Port away from QStandardItemModel
| It's slow and won't be accepted by PIM
| It's slow and won't be accepted by PIM. PersonItem and ContactItem are fine, we just need to just not inherit from QStandardItem and do model stuff ourselves (apparently)
|
|
}}
}}
{{FeatureProjectTodo
{{FeatureProjectDone
|Fix crash
|Rename examples
|  
|  
|
| Aleix Pol
}}
{{FeatureProjectInProgress
|Rename examples
| I have no idea which example is which view-person-list and view-person-list-qml might be better
|
}}
}}
{{FeatureProjectInProgress
{{FeatureProjectInProgress
Line 75: Line 72:
}}
}}
{{FeatureProjectTodo
{{FeatureProjectDone
|Cache sub-resources in PersonsData
|Cache sub-resources in PersonsData
|  
| Vishesh to implement in Nepomuk Core
|
| vhanda
}}
}}
|}
|}
Line 93: Line 90:
|- style="background: #ececec; white-space:nowrap;"
|- style="background: #ececec; white-space:nowrap;"
! Status !! Summary !! Notes || Claimed By
! Status !! Summary !! Notes || Claimed By
{{FeatureProjectTodo
{{FeatureProjectDone
| Move KTp plugins to k-ci-i
| Move KTp plugins to k-ci-i
|
|
|
|
}}
}}
{{FeatureProjectTodo
{{FeatureProjectDone
| Add PersonData method to KTp::ContactsModel runtime switch from libkpeople or not.
| Add method to KTp::ContactsModel runtime switch from libkpeople or not.
|
|
|
|
Line 123: Line 120:
|
|
}}
}}
{{FeatureProjectTodo
{{FeatureProjectDone
| Restore Grouping
| Restore Grouping
|  
|  
|
|David
}}
}}


Line 138: Line 135:
The list of public classes are:
The list of public classes are:
* PersonsModel
* PersonsModel
* PersonsModelFeature
* AbstractPersonsPlugin
* AbstractPersonsPlugin
* BasePersonsDataSource
* BasePersonsDataSource
Line 153: Line 151:
Why is addContactsToPerson async but removeContactsFromPerson syncronous?
Why is addContactsToPerson async but removeContactsFromPerson syncronous?


ResoureWatcher does something for IM accounts that doesn't seem needed anymore
I /think/ if you call removeContactsFromPerson that contact is now not
in the model, not inserted as a contact anywhere.


The code says: "//FIXME: for some reason we get most of the contacts
==Testing==
twice in the resultset,"
What's happening is we run a query "SELECT Distinct ?contactURI
?emailAddressForThisContact"
If we have a contact with 2 email addresses, we get the same contact
URI twice once for each new email address. (email addresses are just
one example, it applies to all things fetched)
Current code as far as I can tell, will ignore/hide the second email address.
If we're going to do that, we can just simplify the query and make it
faster too..or we should try and fix it properly


Why does indexForUri go searching recursively through all the indexes
See git://anongit.kde.org/scratch/mklapetek/PersonViewer for a generic "new addressbook"
comparing them in turn when we have a frickin' hash table of
KTp has kpeople support merged as an optional dependency
everything indexed by Uri!


What is the peopleAdded signal for? It's not called each time a person
is added, only when initial query finishes.
I can imagine a signal that says when initial population is complete
is useful. Calling it something that is confusing/wrong is not.
I'm not sure whether this should be renamed to fix it, or emitted in
more places to fix it.


Why is there duplicate detection stuff in the middle of this?
It wraps DuplicatesFinder and turns the result URIs into indexes.
but why? All the core methods work on URIs anyway, so this just ends
up with us having an option to go to indexes and back for no reason at
all.


Roles need sorting as per discussion in Pineda
Why does the model DisplayName use nao:PrefLabel and PersonData use
something else? (probably PersonData is wrong here)
PersonData uses NCO::fullname then NCO::hasIMAccount->NCO::imNickname
then NCO::hasContactMedium->genericLabel
We don't want to show different things
Why is query() a slot invoked through QMetaObject?
I assume there's a clever sensible reason, I don't know what it is, so
it needs documenting please
I /think/ if you call removeContactsFromPerson that contact is now not
in the model, not inserted as a contact anywhere.


Misc thought: createPersonFromContacts et al, don't actually use the
git://anongit.kde.org/scratch/vhanda/delete-pimo-people.git is a useful too for wiping all PIMO:Persons useful for testing merging repeatedly.
model. Can/Should these be moved elsewhere? Is there a case for
calling it without the model?

Latest revision as of 16:18, 24 February 2015

About

LibKPeople is a contact aggregation library for KDE.

It is *not* a KTp specific library, we are simply the first adopters as well as the developers so the wiki page is here for the time being. This page is about the libkpeople changes needed to make a release of KTp with libkpeople support.

Big discussions about libkpeople should CC the pim mailing list.

Setting up

Install libkpeople (https://projects.kde.org/projects/playground/network/kpeople)

Reinstall KTp, and you have metacontacts everywhere.

You may also want to install PersonViewer a tool to view all contact information from all sources (http://quickgit.kde.org/?p=person-viewer.git)

Tasks

libkpeople

Status Summary Notes Claimed By
DONE Add KPeople namespace 3 votes to 1 on kpeople vs people [mailto: David
 < David

>]

DONE Update Roles as per discussion [mailto:MCK182
 <MCK182

>]

DONE Restore updates on presence change https://git.reviewboard.kde.org/r/110801/ [mailto:Dave
 <Dave

>]

DONE Remove unused / commented out code [mailto:Dave
 <Dave

>]

DONE Add dialog for finding duplicates [mailto:franck
 <franck

>]

DONE Add Dialog to view PersonData (see PersonViewer) in mck182 scratch [mailto:[email protected]
 <[email protected]

>]

IN PROGRESS Add widget to PersonViewer to view associated websites
TODO Port away from QStandardItemModel It's slow and won't be accepted by PIM. PersonItem and ContactItem are fine, we just need to just not inherit from QStandardItem and do model stuff ourselves (apparently)
DONE Rename examples [mailto: Aleix Pol
 < Aleix Pol

>]

IN PROGRESS Fix tests PersonData 80% done. PersonsModel to do [mailto:[email protected]
 <[email protected]

>]

DONE Cache sub-resources in PersonsData Vishesh to implement in Nepomuk Core [mailto: vhanda
 < vhanda

>]

PIM Demos

Status Summary Notes Claimed By

KTp Stuff

Status Summary Notes Claimed By
DONE Move KTp plugins to k-ci-i
DONE Add method to KTp::ContactsModel runtime switch from libkpeople or not.
TODO Add PersonData method to KTp::Contact
TODO KTp Contact has helper methods to get name + avatar for person
TODO KTp ContactFactory can get personData as a feature on load, otherwise use Tp stuff.
TODO Fix the singleton AccountManager problem I don't know how many times I've shouted at people about the problem with using AM as a singleton.. and now we've done it in libkpeople. Brilliant.
DONE Restore Grouping [mailto:David
 <David

>]


Public API Review

Below are a list of issues, please resolve (either by fixing or discussing) then remove from this list

The list of public classes are:

  • PersonsModel
  • PersonsModelFeature
  • AbstractPersonsPlugin
  • BasePersonsDataSource
  • DuplicatesFinder
  • Match
  • MatchesSolver
  • PersonActionsModel
  • PersonsPluginManager
  • PersonData

Anything else in the main lib is private and thus I don't care.

PersonsModel

Why is addContactsToPerson async but removeContactsFromPerson syncronous?

I /think/ if you call removeContactsFromPerson that contact is now not in the model, not inserted as a contact anywhere.

Testing

See git://anongit.kde.org/scratch/mklapetek/PersonViewer for a generic "new addressbook" KTp has kpeople support merged as an optional dependency



git://anongit.kde.org/scratch/vhanda/delete-pimo-people.git is a useful too for wiping all PIMO:Persons useful for testing merging repeatedly.