Giter VIP home page Giter VIP logo

cozy-contacts-v2's Introduction

Cozy Contacts v2

This repo contains the code for the previous version of Cozy Contacts and is not supported anymore. The newest version of the app can be found here

Cozy Contacts makes your contact management easy. Main features are:

  • Simple UI
  • Contact tagging
  • Contact notes
  • VCF import
  • CardDAV sync (it requires Cozy Sync)

Install

We assume here that the Cozy platform is correctly installed on your server.

You can simply install the Contacts application via the app registry. Click on the Chose Your Apps button located on the right of your Cozy Home.

From the command line you can type this command:

cozy-monitor install contacts

Contribution

You can contribute to the Cozy Contacts in many ways:

  • Pick up an issue and solve it.
  • Translate it in a new language.
  • Allow to share contacts
  • Allow to subscribe to a CardDAV Contact Book.

Hack

Hacking the Contacts app requires you setup a dev environment. Once it's done you can hack Cozy Contact just like it was your own app.

$ git clone https://github.com/cozy/cozy-contacts.git
$ cd cozy-contacts
$ npm install

Development

Run it with:

$ npm run watch

The watch task starts 3 daemons:

  • the server one, running coffee-script server-side code through a nodemon process that reload the server part each time you make a change
  • a node-inspector process, that let you use the Chome/Chromium devtools applied to your node process and debug it directly in your browser
  • a brunch watcher which recompiles and reload through browser-sync your front-end app in your browser each time you make a change

It also ensures that the client dependencies are well resolved.

Build

Build Status

The build is a part of the publication process, and you'll probably never need it explicitly. If you want to build you app anyway (e.g. to deploy it in a sandboxed cozy for tests purposes), you can achieve a build by running:

$ npm run build

Please, do not push your local builds in your PR, as long as we make the build process when we release the app.

If you need to run the tests suite to your build:

$ npm run test:build

Tests

NOTE: In order to run the tests, you must only have the Data System started.

A tests suite is available. You can run it with:

npm run test

Feel free to adapt/fix/add your own tests in your PR ;).

Fixtures

Tests data are loaded by cozy-fixtures. A NPM script is pre-setted to help you to load fixtures.

Contacts fixtures are generated through the Mockaroo service, so you need an API key to use it (create an account on the Mockaroo service and use the api key provided in the my account page)

$ MOCKAROO_API_KEY="your_api_key" npm run fixtures

Backend

Running tests requires a Vagrant. Tests load a Dovecot instance in a Vagrant virtual machine. Make sure your Vagrant box is running, then run:

$ npm run test:server

Contribute with Transifex

Transifex can be used the same way as git. It can push or pull translations. The config file in the .tx repository configure the way Transifex is working : it will get the json files from the client/app/locales repository.

If you want to learn more about how to use this tool, we invite you to check the transifex tutorial.

License

Cozy Contacts is developed by Cozy Cloud and distributed under the AGPL v3 license.

What is Cozy?

Cozy Logo

Cozy is a platform that brings all your web services in the same private space. With it, your web apps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one profiles you.

Community

You can reach the Cozy Community by:

  • Chatting with us on IRC #cozycloud on irc.freenode.net
  • Posting on our Forum
  • Posting issues on the Github repos
  • Mentioning us on Twitter

cozy-contacts-v2's People

Contributors

3onyc avatar aenario avatar alpha14 avatar benibur avatar clochix avatar frankrousseau avatar jacquarg avatar jsilvestre avatar kelukelu avatar m4dz avatar mihneadb avatar nicodel avatar niols avatar nono avatar poupotte avatar rlustin avatar y-lohse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cozy-contacts-v2's Issues

Search input frame bugging on Firefox

The orange frame of the search input is higher and larger than the dark grey background.

  • when the list is empty, it looks bad (no left/right border, bottom border in the white part)
  • when the list has items, only the top border is visible

Attachment: http://d.pr/i/UvQF

sort by last name

My father would rather to sort his contact by last name rather than first name.

Turn a card as organisation instead of person

We should have a simple checkbox to mark a card as organisation instead of person, so the man field is the org one, instead of firstname lastname.

In the list, it means the org field is used for sorting. In the card view, we may vary the layout to first-use the org field.

Realtime issues

  • When a contact is updated remotely, the contact list preview is not updated.
  • When a contact is deleted remotely, the main contact view is still displayed.

Tagging a contact triggers an error

Removing or selecting a tag trigger the following error:

Uncaught TypeError: Cannot read property 'toLowerCase' of null tag-it.js:145
Stack trace:
(anonymous function) tag-it.js:145
jQuery.extend.grep jquery-2.1.1.js:448
options.autocomplete.source tag-it.js:142
proxy jquery-2.1.1.js:513
$.widget._search jquery-ui-1.10.3.custom.js:1716
(anonymous function) jquery-ui-1.10.3.custom.js:401
$.widget.search jquery-ui-1.10.3.custom.js:1708
(anonymous function) jquery-ui-1.10.3.custom.js:401
(anonymous function) jquery-ui-1.10.3.custom.js:1689
handlerProxy jquery-ui-1.10.3.custom.js:730

Also, removing a tag triggers a selection at the same time (might be related in some way).

Format field in card view

When view card, some fields may be formatted for display, like phone number (see screenshot).
screen shot 2015-02-09 at 10 19 10

E.g.: I often saved phone numbers w/o spaces (+33212345678), but the display render should format them to improve readability (+33 2 12 34 56 78).

Vcard import and sync

My father import all his address book to cozy with a Vcard. Everything was ok at first but after a logout/login (maybe a sync happened in between, we don't know but if yes it didn't succeed as nothing appear in the new sync address book on mac os). On cozy contact, only names and descriptions remain, but email, phone numbers and so on disappear.

Not standard conform VCards

Cozy creates (and than serves via CardDAV) not standard conform VCards. Particularly I have noticed missing FN and N properties (those are required) and non-standard ADR fields (those need to be structured with an semicolon (;) character. Especially the later breaks at least vobject.

Impossible (?) to remove all contacts at once

I imported my contacts from a vcfand now I would like to remove them all (because some are missing and I don't want to mess with duplicates etc.). I could not find an option via the webapp to delete them all?

Contact import do not support char encoding field

l s'agit d'un format de vcf de ThunderSync de TB qui exporte en version 2.1 et on y remarque la mention ;CHARSET=UTF-8 qui fait buger l'import du nom un coup de sed dans le fichier et hop c'est repartie.

BEGIN:VCARD
VERSION:2.1
REV:2014-12-19T12:40:45Z
N;CHARSET=UTF-8:NOM

Layout suggestions

I might suggest a few things about the layout:

  • the text color black in the list looks weird. What about a grey ? Maybe Todos' grey
  • the "email [blank space] phone" is not easily readable. Can we have a separator ?
  • can we standardize the phone number displaying ? like no space at all if you don't want to blow your mind
  • can you adjust the date display ? I mean most of our users are french, so dd/mm/yyyy is probably better
  • can you add the blue frame around inputs when hovering ? sometimes is not intuitive (ie: postal address, fields have not the same height)
  • can we add a "export this contact" in the "More" menu ? (not a real layout suggestion, I know)

Importing vCard with Google Chrome

Importing vCard within contatcs works perfectly with Firefox but not with Chrome.
When selecting a .vcf, the import window displays "xxx.vcf is not a vCard".

Large Vcard import freezes browser

I imported a Vcard file witth more than 700 contacts which freezed my browser for some time. I had to close the tab on come back to my cozy.

"potential memory leak on contact import (freeze)"

Errors on log file

When I open a contact :

[Wed, 08 Apr 2015 22:12:27 GMT] - GET /contacts/65fda7a46d99294ee9a30f3516013391 - 200 - 5.546 ms -  292
tch (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:107:5)
    at /usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:213:24
    at Function.proto.process_params (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:284:12)
    at next (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:207:19)
    at next_layer (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:77:14)
TypeError: Object #<Object> has no method 'getComputedFN'
    at Function.module.exports.Contact.cast (/usr/local/cozy/apps/contacts/build/server/models/contact.js:69:26)
    at Function.Model.create (/usr/local/cozy/apps/contacts/node_modules/cozydb/lib/model.js:67:19)
    at create (/usr/local/cozy/apps/contacts/build/server/controllers/contact.js:39:22)
    at Object.module.exports.create [as handle] (/usr/local/cozy/apps/contacts/build/server/controllers/contact.js:72:14)
    at next_layer (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:103:13)
    at Route.dispatch (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:107:5)
    at /usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:213:24
    at Function.proto.process_params (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:284:12)
    at next (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:207:19)
    at next_layer (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:77:14)
TypeError: Object #<Object> has no method 'getComputedFN'
    at Function.module.exports.Contact.cast (/usr/local/cozy/apps/contacts/build/server/models/contact.js:69:26)
    at Function.Model.create (/usr/local/cozy/apps/contacts/node_modules/cozydb/lib/model.js:67:19)
    at create (/usr/local/cozy/apps/contacts/build/server/controllers/contact.js:39:22)
    at Object.module.exports.create [as handle] (/usr/local/cozy/apps/contacts/build/server/controllers/contact.js:72:14)
    at next_layer (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:103:13)
    at Route.dispatch (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:107:5)
    at /usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:213:24
    at Function.proto.process_params (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:284:12)
    at next (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:207:19)
    at next_layer (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:77:14)
s/express/lib/router/index.js:207:19)
    at next_layer (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:77:14)
TypeError: Object #<Object> has no method 'getComputedFN'
    at Function.module.exports.Contact.cast (/usr/local/cozy/apps/contacts/build/server/models/contact.js:69:26)
    at Function.Model.create (/usr/local/cozy/apps/contacts/node_modules/cozydb/lib/model.js:67:19)
    at create (/usr/local/cozy/apps/contacts/build/server/controllers/contact.js:39:22)
    at Object.module.exports.create [as handle] (/usr/local/cozy/apps/contacts/build/server/controllers/contact.js:72:14)
    at next_layer (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:103:13)
    at Route.dispatch (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:107:5)
    at /usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:213:24
    at Function.proto.process_params (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:284:12)
    at next (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/index.js:207:19)
    at next_layer (/usr/local/cozy/apps/contacts/node_modules/americano/node_modules/express/lib/router/route.js:77:14)

Keyboard navigation in form

Using Firefox, its not convenient to navigate using tab in contact edition form. (stuck in name field, stuck in tags field)

While we are at it, we might want to implement keyboard navigation in contacts list.

Suffix should be displayed in the contact list

Contact suffix (Jr., Sr. or whatever) - if any - should be displayed in the contact list (left column) :

"John Doe, Jr". instead of "John Doe"

to help selecting the appropriate contact from the list.

Import issues

  • Special chars are not recognized.
  • Can't import pictures.

iOS custom fields cannot be saved

iOS uses vcard fields to store additional informations such as custom ring per contacts. If you try to set it to a contact synchonized with your cozy, the field isn't saved, and the contact fall back to its previous version, meaning you lack your custom setting.

Bulk import failed on large amount of data

Some users have encoutered silent import failures when trying to import bulk VCF files exported from Apple Contacts.app (see Import contacts depuis Mac OS 10 [fr]). Import failed when there is many contacts (approx 200) in a single file. Small files (~70 contacts per each one) works-well. The limit isn't very clear (I have successfully imported a single 280 contacts file when others failed to import a 200 contacts files) and seems to be related to the amount of data instead of the number of contacts.

Note: I'll provide a fake VCF files for test.

Small update to do in github and French translation

Hello,

In the Github page, the link to the solution to CardDav is still "Cozy Webdav" instead of "Cozy Sync" : CardDAV sync (it requires Cozy Webdav) . It's just before "Install".

Otherwise, in the french translation, when you use Contact, inside the Help Panel, when you explain how works the "Synchronisation mobile (CardDav)", you write "Pour synchroniser votre agenda, utilisez les identifiants suivant :" . You should replace "votre agenda" by "vos contacts".

Regards,
Thatoo

Note field doesn't save properly

There is a case where the note field is not properly saved:

  1. Click on a contact that has no notes already set.
  2. Type a note on it
  3. Focus out of the field

The result is that the note field is automatically cleared and your note data are lost.

import Vcard from FFOS 3.0, error names

Hello,

When I imported the vcards I had from the export of FFOS 3.0, first and last name were not field. The first and last name were together inside the "other name" field.
I send the two vcard to Frank (I can't put them public :-), the one from FFOS and the one from cozy, after importing the FFOS's one.

I guess that was the reason of a problem with my sync problem with the FFOS apps.
Cheers,
Thatoo

Phone icon's action is not working in Firefox OS

Hello,

I don't know if the problem is from cozy or from FFOS, but when I click on the phone icon on the right side of a phone number of my contacts, in cozy-contacts, it open the FFOS phone app (that's great, I was really impressed) but it dial only "+", no number, just the +, not even +33, just +... (that's what we call an "ascenseur émotionnel", lol).

A bon entendeur,

Thatoo

When importing - the labels 'Home' turns into 'Voice'

When importing all contacts at once or even one at a time - if the contact was saved with a Home number in android with the 'Home' label. on cozy it shows 'Voice' and then once i go add an additional number on that specific contact on cozy - after changes have been saved it automatically duplicates the name of the contact. Very weird.. perhaps a bug?

Provide a tool that detects and merges duplicate contacts

So Google added this in their "contacts preview" app, and it works pretty nicely. After some trials of their tool, I think their algorithm just checks whether full names of any pairs of two contacts are equal (first name + space + last name) and suggests to merge them afterwards (this can be done in O(n log n) time where n is the number of contacts).

Add fields for contact GPG key

If we want to support PGP in email app, it would be great to allow to store the PGP public keys inside Contact.
We may also store two metadata of the key : its ID and fingerprint, to make querying easier.

Contacts export results in cozy-light stopping

Fresh install, Contacts app v1.0.10. Reproduce: On, e.g., http://localhost:19104/apps/cozy-contacts/#help, choose "Click here to export all your contacts as a vCard file: Export vCard file".
Result:

warn - Cozy Light | An exception is uncaught
[ReferenceError: initial is not defined]
ReferenceError: initial is not defined
    at ModelConstructor.Contact.getComputedFN (/home/marcin/.cozy-light/node_modules/cozy-contacts/server/models/contact.js:47:34)
    at ModelConstructor.Contact.toVCF (/home/marcin/.cozy-light/node_modules/cozy-contacts/server/models/contact.js:61:26)
    at /home/marcin/.cozy-light/node_modules/cozy-contacts/server/controllers/contact.js:124:26
    at /home/marcin/.cozy-light/node_modules/cozy-contacts/node_modules/americano-cozy-pouchdb/node_modules/jugglingdb-pouchdb-adapter/lib/pouchdb.js:429:20
    at /usr/lib/node_modules/cozy-light/node_modules/pouchdb/node_modules/pouchdb-mapreduce/utils.js:25:9
    at process._tickCallback (node.js:419:13)
info - Cozy Light | Stopping apps...
info - Cozy Light |     ✓ Contacts
info - Cozy Light |     ✓ Files
info - Cozy Light | Stopping plugins...
info - Cozy Light |     ✓ Simple Dashboard
info - Cozy Light |     ✓ Auth Plugin
info - Cozy Light | Stopping server...
info - Cozy Light |     ✓ main server
info - Cozy Light | Cozy Light was properly terminated.
GET /contacts.vcf - - ms - -
{ [Error: socket hang up] code: 'ECONNRESET' }

This is the start-up output:

% cozy-light start                     
info - Cozy Light | Configuring plugin cozy-labs/cozy-light-simple-dashboard...
info - Cozy Light | Plugin cozy-labs/cozy-light-simple-dashboard configured.
info - Cozy Light | Configuring plugin cozy-labs/cozy-light-auth...
info - Cozy Light | Plugin cozy-labs/cozy-light-auth configured.
info - Cozy Light | Cozy Light server is listening on port 19104...
[2015-01-03 01:56:17:938] info - helper/db_feed | Pub server started
   info  - socket.io started
info - Cozy Light | Application cozy-files is now running on port 18001...
An error occurred while initializing notification module -- Error: connect ECONNREFUSED
info - Cozy Light | Application cozy-contacts is now running on port 18002...

Improve card deletion

Deleting cards is not truly intuitive: we must go to "more infos" section to get access to the delete button, which isn't totally relevant. Plus, have a way to bulk delete files could be a good and faster way to quickly edit the list.

Contacts Application is not authorized (docType:user)

When I start contacts app, it logs this on data-system.log :

[2015-04-21 14:19:28:157] error - app:error | contacts Application is not authorized
[2015-04-21 14:19:28:159] error - app:error | Error: contacts Application is not authorized
    at /usr/local/cozy/apps/data-system/build/server/helpers/utils.js:38:13
    at /usr/local/cozy/apps/data-system/build/server/lib/token.js:61:22
    at checkToken (/usr/local/cozy/apps/data-system/build/server/lib/token.js:26:14)
    at module.exports.checkDocType (/usr/local/cozy/apps/data-system/build/server/lib/token.js:37:12)
    at module.exports.checkPermissions (/usr/local/cozy/apps/data-system/build/server/helpers/utils.js:30:10)
    at Object.module.exports.checkPermissionsByType [as handle] (/usr/local/cozy/apps/data-system/build/server/middlewares/utils.js:61:10)
    at next_layer (/usr/local/cozy/apps/data-system/node_modules/americano/node_modules/express/lib/router/route.js:103:13)
    at Route.dispatch (/usr/local/cozy/apps/data-system/node_modules/americano/node_modules/express/lib/router/route.js:107:5)
    at /usr/local/cozy/apps/data-system/node_modules/americano/node_modules/express/lib/router/index.js:213:24
    at param (/usr/local/cozy/apps/data-system/node_modules/americano/node_modules/express/lib/router/index.js:303:14)

If you try to log docType in /usr/local/cozy/apps/data-system/build/server/lib/token.js you will see that app try to use docType: user but can't found this docType on app permissions.

Do you know why ?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.