Merge lp://staging/~abreu-alexandre/unity-webapps-qml/fix-oa-docs into lp://staging/unity-webapps-qml

Proposed by Alexandre Abreu
Status: Merged
Approved by: Kyle Nitzsche
Approved revision: 97
Merged at revision: 89
Proposed branch: lp://staging/~abreu-alexandre/unity-webapps-qml/fix-oa-docs
Merge into: lp://staging/unity-webapps-qml
Diff against target: 778 lines (+211/-387)
5 files modified
examples/api-bindings/online-accounts/www/index.html (+13/-4)
examples/api-bindings/online-accounts/www/js/app.js (+45/-36)
src/Ubuntu/UnityWebApps/UnityWebAppsBackendComponents.js (+23/-13)
src/Ubuntu/UnityWebApps/bindings/online-accounts/client/online-accounts.js (+126/-334)
src/Ubuntu/UnityWebApps/common/js/unity-binding-bridge.js (+4/-0)
To merge this branch: bzr merge lp://staging/~abreu-alexandre/unity-webapps-qml/fix-oa-docs
Reviewer Review Type Date Requested Status
Kyle Nitzsche (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+208647@code.staging.launchpad.net

Commit message

Fix online accounts inline docs

Description of the change

Fix online accounts inline docs

To post a comment you must log in.
Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

please fix tabs to be spaces for indenting

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

please add a description of the OnlineAccounts object. maybe something like: An object that represents all online accounts currently on the system.

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

alex-abreu, AccountsService has a "@constructor' that takes to params but there are no @param tags.

Also, @constructor means the user creates a new object with 'new', like var as = new AccountService(...) Is that what you expect? or does an AccountService get returned to the user (with no 'new' usage)

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

for every method that returns something, lets always start the description like this:
"Returns ...."

Not 'retrieves'. Not implied.

For example, this should be "Returns..."
        /**
         * Retrieves the account's numeric ID; note that all
>. * AccountService objects which work on the same online account will have the same ID.
         *
         * If the callback parameter is not set, the current "local" value is retrieved.
         *
         * @method accountId
         * @param callback (optional) {Function(String)}
         */
        accountId: function(callback) {

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

AND to follow up on that last comment, you need to consistently add the @return tag:
http://yui.github.io/yuidoc/syntax/#return

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

please let me know when these are done and I will scan again. thx

94. By Alexandre Abreu

fix docs for OA

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

thanks for the work, for example indents.

Please fix the tab indents you just added though. :)

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Now we have "@return null"s

if a method does not return anything, maybe don't have the @return tag at all (unless it is important for some reason to show that a literal null IS returned...)

95. By Alexandre Abreu

fix docs for OA

96. By Alexandre Abreu

fix docs for OA

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

so as discussed, let's remove the optional callback args for now to be replaced later with signals for mutable QML values.

97. By Alexandre Abreu

fix docs for OA

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

good to go

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: