Bmansurov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/184434

Change subject: Hygiene: Update deprecated jscs tag and add missing 
documentation
......................................................................

Hygiene: Update deprecated jscs tag and add missing documentation

@type is deprecated. Use @property instead.

Change-Id: I3b065ee17bea8a6548196e9b9812ac25790383e1
---
M javascripts/Overlay.js
M javascripts/Schema.js
M javascripts/View.js
M javascripts/api.js
M javascripts/application.js
M javascripts/loggingSchemas/SchemaMobileWebClickTracking.js
M javascripts/loggingSchemas/SchemaMobileWebEditing.js
M javascripts/loggingSchemas/SchemaMobileWebUploads.js
M javascripts/loggingSchemas/SchemaMobileWebWikiGrok.js
M javascripts/modules.js
M javascripts/modules/tutorials/ContentOverlay.js
M javascripts/util.js
12 files changed, 69 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/34/184434/1

diff --git a/javascripts/Overlay.js b/javascripts/Overlay.js
index a827a6b..52b876b 100644
--- a/javascripts/Overlay.js
+++ b/javascripts/Overlay.js
@@ -18,25 +18,25 @@
        Overlay = View.extend( {
                /**
                 * Identify whether the element contains position fixed elements
-                * @type {Boolean}
+                * @property {Boolean}
                 */
                hasFixedHeader: true,
                /**
                 * Is overlay fullscreen
-                * @type {Boolean}
+                * @property {Boolean}
                 */
                fullScreen: true,
 
                /**
                 * use '#mw-mf-viewport' rather than 'body' - for some reasons 
this has
                 * odd consequences on Opera Mobile (see bug 52361)
-                * @type {String|jQuery.Object}
+                * @property {String|jQuery.Object}
                 */
                appendTo: '#mw-mf-viewport',
 
                /**
                 * Default class name
-                * @type {String}
+                * @property {String}
                 */
                className: 'overlay',
                templatePartials: {
@@ -74,7 +74,7 @@
                },
                /**
                 * Flag overlay to close on content tap
-                * @type {Boolean}
+                * @property {Boolean}
                 */
                closeOnContentTap: false,
 
diff --git a/javascripts/Schema.js b/javascripts/Schema.js
index 046e762..d1b6683 100644
--- a/javascripts/Schema.js
+++ b/javascripts/Schema.js
@@ -11,7 +11,6 @@
                /**
                 * A set of defaults to log to the schema
                 *
-                * @type {Object}
                 * @cfg {Object} defaults Default options hash.
                 * @cfg {String} defaults.mobileMode whether user is in stable 
beta or alpha
                 */
@@ -20,7 +19,7 @@
                },
                /**
                 * Name of Schema to log to
-                * @type {String}
+                * @property {String}
                 */
                name: undefined,
                /**
diff --git a/javascripts/View.js b/javascripts/View.js
index 87f7fb4..3cccb98 100644
--- a/javascripts/View.js
+++ b/javascripts/View.js
@@ -89,12 +89,12 @@
        View = EventEmitter.extend( {
                /**
                 * Name of tag that contains the rendered template
-                * @type String
+                * @property String
                 */
                tagName: 'div',
 
                /**
-                * @type {Mixed}
+                * @property {Mixed}
                 * Specifies the template used in render(). 
Object|String|HoganTemplate
                 */
                template: undefined,
@@ -113,7 +113,7 @@
                 *     templatePartials: { content: M.template.get( 'sub.hogan' 
) }
                 *     }
                 *
-                * @type {Object}
+                * @property {Object}
                 */
                templatePartials: {},
 
diff --git a/javascripts/api.js b/javascripts/api.js
index dc40f61..01d7450 100644
--- a/javascripts/api.js
+++ b/javascripts/api.js
@@ -13,7 +13,7 @@
                apiUrl: mw.util.wikiScript( 'api' ),
                /**
                 * Whether to use jsonp or not.
-                * @type {Boolean}
+                * @property {Boolean}
                 */
                useJsonp: false,
 
diff --git a/javascripts/application.js b/javascripts/application.js
index 5c7366d..6decb21 100644
--- a/javascripts/application.js
+++ b/javascripts/application.js
@@ -74,23 +74,23 @@
                getCurrentPage: getCurrentPage,
                /**
                 * Navigation router instance
-                * @type {Router}
+                * @property {Router}
                 */
                router: router,
                /**
                 * OverlayManager instance
-                * @type {OverlayManager}
+                * @property {OverlayManager}
                 */
                overlayManager: new OverlayManager( router ),
                /**
                 * PageApi instance
-                * @type {PageApi}
+                * @property {PageApi}
                 */
                pageApi: pageApi,
                /**
                 * User Bucketing for A/B testing
                 ** (we want this to be the same everywhere)
-                * @type {Boolean}
+                * @property {Boolean}
                 */
                isTestA: mw.config.get( 'wgUserId' ) % 2 === 0
        } );
diff --git a/javascripts/loggingSchemas/SchemaMobileWebClickTracking.js 
b/javascripts/loggingSchemas/SchemaMobileWebClickTracking.js
index 9209634..3dfc08a 100644
--- a/javascripts/loggingSchemas/SchemaMobileWebClickTracking.js
+++ b/javascripts/loggingSchemas/SchemaMobileWebClickTracking.js
@@ -50,12 +50,20 @@
         * @extends Schema
         */
        SchemaMobileWebClickTracking = Schema.extend( {
-               /** @inheritdoc **/
+               /**
+                * @inheritdoc
+                *
+                * @cfg {Object} defaults Default options hash.
+                * @cfg {String|undefined} defaults.username Username if the 
user is logged in, otherwise -
+                * undefined. Assigning undefined will make event logger omit 
this property when sending
+                * the data to a server. According to the schema username is 
optional.
+                * @cfg {Number|undefined} defaults.userEditCount The number of 
edits the user has made
+                * if the user is logged in, otherwise - undefined. Assigning 
undefined will make event
+                * logger omit this property when sending the data to a server. 
According to the schema
+                * userEditCount is optional.
+                */
                defaults: $.extend( {}, Schema.prototype.defaults, {
                        // FIXME: Introduce a SchemaWithUser class that has 
username and userEditCount
-                       // username or userEditCount cannot be null according 
to the schema.
-                       // They are both optional though.
-                       // Assigning undefined will make event logger omit them 
when sending the data to a server.
                        username: user.getName() || undefined,
                        userEditCount: typeof user.getEditCount() === 'number' 
? user.getEditCount() : undefined
                } ),
diff --git a/javascripts/loggingSchemas/SchemaMobileWebEditing.js 
b/javascripts/loggingSchemas/SchemaMobileWebEditing.js
index 5cb17ff..3b83c04 100644
--- a/javascripts/loggingSchemas/SchemaMobileWebEditing.js
+++ b/javascripts/loggingSchemas/SchemaMobileWebEditing.js
@@ -10,7 +10,23 @@
        SchemaMobileWebEditing = Schema.extend( {
                /** @inheritdoc **/
                name: 'MobileWebEditing',
-               /** @inheritdoc **/
+               /**
+                * @inheritdoc
+                *
+                * @cfg {Object} defaults Default options hash.
+                * @cfg {Number} defaults.pageId The value of the wgArticleId 
config variable
+                * @cfg {String} defaults.token The value of 
Schema.getSessionId()
+                * @cfg {Number} defaults.revId The value of the wgRevisionId 
config variable
+                * @cfg {Number} defaults.namespace The value of the 
wgNamespaceNumber config variable
+                * @cfg {Boolean} defaults.isTestA Whether this is the A test 
in A/B test
+                * @cfg {String|undefined} defaults.username Username if the 
user is logged in, otherwise -
+                * undefined. Assigning undefined will make event logger omit 
this property when sending
+                * the data to a server. According to the schema username is 
optional.
+                * @cfg {Number|undefined} defaults.userEditCount The number of 
edits the user has made
+                * if the user is logged in, otherwise - undefined. Assigning 
undefined will make event
+                * logger omit this property when sending the data to a server. 
According to the schema
+                * userEditCount is optional.
+                */
                defaults: $.extend( {}, Schema.prototype.defaults, {
                        pageId: mw.config.get( 'wgArticleId' ),
                        token: Schema.getSessionId(),
diff --git a/javascripts/loggingSchemas/SchemaMobileWebUploads.js 
b/javascripts/loggingSchemas/SchemaMobileWebUploads.js
index 4cb3bfc..d98d895 100644
--- a/javascripts/loggingSchemas/SchemaMobileWebUploads.js
+++ b/javascripts/loggingSchemas/SchemaMobileWebUploads.js
@@ -10,7 +10,19 @@
        SchemaMobileWebUploads = Schema.extend( {
                /** @inheritdoc **/
                name: 'MobileWebUploads',
-               /** @inheritdoc **/
+               /**
+                * @inheritdoc
+                *
+                * @cfg {Object} defaults Default options hash.
+                * @cfg {Number} defaults.pageId The value of the wgArticleId 
config variable
+                * @cfg {String} defaults.token The value of 
Schema.getSessionId()
+                * @cfg {String} defaults.funnel Identifier for the upload 
funnel
+                * @cfg {String|undefined} defaults.username Username if the 
user is logged in, otherwise -
+                * undefined. Assigning undefined will make event logger omit 
this property when sending
+                * the data to a server. According to the schema username is 
optional.
+                * @cfg {Boolean} defaults.isLoggedIn Whether the user is 
logged in
+                * @cfg {Boolean} defaults.isEditable The value of the 
wgIsPageEditable config variable
+                */
                defaults: $.extend( {}, Schema.prototype.defaults, {
                        pageId: mw.config.get( 'wgArticleId' ),
                        token: Schema.getSessionId(),
diff --git a/javascripts/loggingSchemas/SchemaMobileWebWikiGrok.js 
b/javascripts/loggingSchemas/SchemaMobileWebWikiGrok.js
index c91dfb3..0ce47e0 100644
--- a/javascripts/loggingSchemas/SchemaMobileWebWikiGrok.js
+++ b/javascripts/loggingSchemas/SchemaMobileWebWikiGrok.js
@@ -10,6 +10,17 @@
        SchemaMobileWebWikiGrok = Schema.extend( {
                /** @inheritdoc **/
                name: 'MobileWebWikiGrok',
+               /**
+                * @inheritdoc
+                *
+                * @cfg {Object} defaults Default options hash.
+                * @cfg {Boolean} defaults.isLoggedIn Whether the user is 
logged in
+                * @cfg {Number|undefined} defaults.userEditCount The number of 
edits the user has made
+                * if the user is logged in, otherwise - undefined. Assigning 
undefined will make event
+                * logger omit this property when sending the data to a server. 
According to the schema
+                * userEditCount is optional.
+                * @cfg {Number} defaults.pageId The value of the wgArticleId 
config variable
+                */
                defaults: $.extend( {}, Schema.prototype.defaults, {
                        // FIXME: Introduce a SchemaWithUser class that has 
username and userEditCount
                        isLoggedIn: !user.isAnon(),
diff --git a/javascripts/modules.js b/javascripts/modules.js
index fa4d5b8..c80b414 100644
--- a/javascripts/modules.js
+++ b/javascripts/modules.js
@@ -11,7 +11,7 @@
         */
        function ModuleLoader() {
                /**
-                * @type {Object} register of defined modules
+                * @property {Object} register of defined modules
                 * @private
                 */
                this._register = {};
diff --git a/javascripts/modules/tutorials/ContentOverlay.js 
b/javascripts/modules/tutorials/ContentOverlay.js
index 6c64f0a..80a7251 100644
--- a/javascripts/modules/tutorials/ContentOverlay.js
+++ b/javascripts/modules/tutorials/ContentOverlay.js
@@ -12,17 +12,14 @@
                className: 'overlay content-overlay',
                /**
                 * @inheritdoc
-                * @type Boolean
                 */
                fullScreen: false,
                /**
                 * @inheritdoc
-                * @type Boolean
                 */
                closeOnContentTap: true,
                /**
                 * @inheritdoc
-                * @type String
                 */
                appendTo: '#mw-mf-page-center',
                /** @inheritdoc */
diff --git a/javascripts/util.js b/javascripts/util.js
index bca3360..179c8b1 100644
--- a/javascripts/util.js
+++ b/javascripts/util.js
@@ -41,7 +41,7 @@
                /**
                 * Maps current query string parameters to their values.
                 *
-                * @type {Object} query
+                * @property {Object} query
                 */
                query: {}
        };

-- 
To view, visit https://gerrit.wikimedia.org/r/184434
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b065ee17bea8a6548196e9b9812ac25790383e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to