cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-13693) Improvement to apache/cordova-plugin-contacts documentation
Date Wed, 20 Dec 2017 16:51:02 GMT

    [ https://issues.apache.org/jira/browse/CB-13693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16298726#comment-16298726
] 

ASF GitHub Bot commented on CB-13693:
-------------------------------------

janpio closed pull request #162: CB-13693: Improves Documentation
URL: https://github.com/apache/cordova-plugin-contacts/pull/162
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/README.md b/README.md
index 454a028..3e7520a 100644
--- a/README.md
+++ b/README.md
@@ -165,10 +165,10 @@ device contacts database and returning an array of `Contact` objects.
 The resulting objects are passed to the `contactSuccess` callback
 function specified by the __contactSuccess__ parameter.
 
-The __contactFields__ parameter specifies the fields to be used as a
-search qualifier.  A zero-length __contactFields__ parameter is invalid and results in
-`ContactError.INVALID_ARGUMENT_ERROR`. A __contactFields__ value of
-`"*"` searches all contact fields.
+The __contactFields__ parameter should always be an array and specifies the
+fields to be used as a search qualifier.  A zero-length __contactFields__
+parameter is invalid and results in `ContactError.INVALID_ARGUMENT_ERROR`.
+A __contactFields__ value of `["*"]` searches all contact fields.
 
 The __contactFindOptions.filter__ string can be used as a search
 filter when querying the contacts database.  If provided, a
diff --git a/types/index.d.ts b/types/index.d.ts
index f0979ba..3812c70 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -23,9 +23,9 @@ interface Contacts {
      * The navigator.contacts.find method executes asynchronously, querying the device contacts
database
      * and returning an array of Contact objects. The resulting objects are passed to the
onSuccess
      * callback function specified by the onSuccess parameter.
-     * @param fields The fields parameter specifies the fields to be used as a search qualifier,
-     * and only those results are passed to the onSuccess callback function. A zero-length
fields parameter
-     * is invalid and results in ContactError.INVALID_ARGUMENT_ERROR. A contactFields value
of "*" returns all contact fields.
+     * @param fields The fields parameter should always be an array and specifies the fields
to be used
+     * as a search qualifier.  A zero-length fields parameter is invalid and results in ContactError.INVALID_ARGUMENT_ERROR.
+     * A fields value of ["*"] searches all contact fields.
      * @param onSuccess Success callback function invoked with the array of Contact objects
returned from the database
      * @param onError Error callback function, invoked when an error occurs.
      * @param options Search options to filter navigator.contacts.


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Improvement to apache/cordova-plugin-contacts documentation
> -----------------------------------------------------------
>
>                 Key: CB-13693
>                 URL: https://issues.apache.org/jira/browse/CB-13693
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-plugin-contacts (DEPRECATED)
>            Reporter: Daniel Withams
>            Priority: Minor
>              Labels: documentation
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> The explanation of the contactFields argument in the 'navigator.contacts.find' section
is unclear and ambiguous. Updating to make it clearer to people wanting to utilise this plugin.
> 1) At no point is the argument data type described (array0
> 2) The statement for using "*" to search all fields is ambiguous due to a combination
of point 1) and direct ambiguity in the statement itself (the description of the value of
the argument by providing a STRING example rather than an ARRAY example.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message