Robmoen has uploaded a new change for review.

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

Change subject: Fix MF documentation part 1
......................................................................

Fix MF documentation part 1

Bug: 72341
Change-Id: I20caef5b48b2dc1c023580252f5ae563b4039717
---
M javascripts/Page.js
M javascripts/PageApi.js
M javascripts/Router.js
M javascripts/api.js
M javascripts/application.js
M javascripts/modules/PageList.js
M javascripts/modules/uploads/PhotoApi.js
M javascripts/modules/watchstar/WatchstarApi.js
8 files changed, 49 insertions(+), 9 deletions(-)


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

diff --git a/javascripts/Page.js b/javascripts/Page.js
index 521b20a..a5da3e4 100644
--- a/javascripts/Page.js
+++ b/javascripts/Page.js
@@ -6,6 +6,8 @@
                Page;
 
        /**
+        * Mobile page view object
+        *
         * @class Page
         * @extends View
         */
@@ -32,6 +34,10 @@
                        editLabel: mw.msg( 'mobile-frontend-editor-edit' ),
                        languageLabel: mw.msg( 
'mobile-frontend-language-article-heading' )
                },
+
+               /**
+                * @inheritDoc
+                */
                initialize: function ( options ) {
                        // Fallback if no displayTitle provided
                        options.displayTitle = options.displayTitle || 
options.title;
diff --git a/javascripts/PageApi.js b/javascripts/PageApi.js
index 17f753a..bfa6fc3 100644
--- a/javascripts/PageApi.js
+++ b/javascripts/PageApi.js
@@ -6,6 +6,9 @@
         * Add child to listOfSections if the level of child is the same as the 
last
         * child of listOfSections, otherwise add it to the children of the last
         * section of listOfSections. If listOfSections is empty, just add 
child to it.
+        * @method
+        * @private
+        * @member PageApi
         * @param {Array} listOfSections
         * @param {Object} child - Section to be added to listOfSections
         */
@@ -28,6 +31,9 @@
 
        /**
         * Order sections hierarchically
+        * @method
+        * @private
+        * @member PageApi
         * @param {Array} sections
         * @returns {Array}
         */
diff --git a/javascripts/Router.js b/javascripts/Router.js
index 41e846f..5dc713f 100644
--- a/javascripts/Router.js
+++ b/javascripts/Router.js
@@ -13,6 +13,7 @@
        }
 
        /**
+        * Provides navigation routing and location information
         * @class Router
         */
        function Router() {
@@ -136,6 +137,7 @@
        };
 
        /**
+        * Determine if current browser supports onhashchange event
         * @method
         * @return {Boolean}
         */
diff --git a/javascripts/api.js b/javascripts/api.js
index 49e1b25..33978e0 100644
--- a/javascripts/api.js
+++ b/javascripts/api.js
@@ -18,7 +18,7 @@
                useJsonp: false,
 
                /**
-                * @method
+                * @inheritdoc
                 */
                initialize: function () {
                        mw.Api.apply( this, arguments );
diff --git a/javascripts/application.js b/javascripts/application.js
index 847f454..3e86e29 100644
--- a/javascripts/application.js
+++ b/javascripts/application.js
@@ -1,6 +1,7 @@
 // FIXME: make this an object with a constructor to facilitate testing
 // (see https://bugzilla.wikimedia.org/show_bug.cgi?id=44264)
 /**
+ * mobileFrontend namespace
  * @class mw.mobileFrontend
  * @singleton
  */
@@ -38,6 +39,7 @@
        // https://github.com/Modernizr/Modernizr/issues/167
        // http://mobilehtml5.org/
        /**
+        * Detect if fixed position is supported in browser
         * @method
         * @param {String} userAgent User agent to test against.
         * @return {Boolean}
@@ -62,6 +64,7 @@
        }
 
        /**
+        * Detect if browser supports geolocation
         * @method
         * @return {Boolean}
         */
@@ -132,8 +135,8 @@
                }
        }
 
-       // TODO: separate main menu navigation code into separate module
        /**
+        * Initialize viewport
         * @method
         */
        function init() {
@@ -267,6 +270,7 @@
        }
 
        /**
+        * Tidy up a page title
         * @method
         * @return {String}
         */
@@ -337,7 +341,7 @@
        }
 
        /**
-        *
+        * Determine if a device has a widescreen.
         * @method
         * @return {Boolean}
         */
@@ -348,8 +352,9 @@
        }
 
        /**
-        *
+        * Determine if current page is in a specified namespace
         * @method
+        * @param {string} namespace Name of namespace
         * @return {Boolean}
         */
        function inNamespace( namespace ) {
@@ -357,6 +362,7 @@
        }
 
        /**
+        * Get current page view object
         *
         * @method
         * @return {Page}
@@ -417,20 +423,24 @@
                query: deParam( qs ),
                unlockViewport: unlockViewport,
                /**
+                * Navigation router instance
                 * @type {Router}
                 */
                router: router,
                /**
+                * OverlayManager instance
                 * @type {OverlayManager}
                 */
                overlayManager: new OverlayManager( router ),
                /**
+                * PageApi instance
                 * @type {PageApi}
                 */
                pageApi: pageApi,
                deParam: deParam,
-               // for A/B testing (we want this to be the same everywhere)
                /**
+                * User Bucketing for A/B testing
+                ** (we want this to be the same everywhere)
                 * @type {Boolean}
                 */
                isTestA: mw.config.get( 'wgUserId' ) % 2 === 0
diff --git a/javascripts/modules/PageList.js b/javascripts/modules/PageList.js
index f9737d2..2b644f9 100644
--- a/javascripts/modules/PageList.js
+++ b/javascripts/modules/PageList.js
@@ -7,6 +7,12 @@
                user = M.require( 'user' ),
                Page = M.require( 'Page' );
 
+       /**
+        * Renders a list of Page view objects
+        *
+        * @class PageList
+        * @extends View
+        */
        PageList = View.extend( {
                defaults: {
                        pages: [],
@@ -15,6 +21,8 @@
                /**
                 * Render page images for the existing page list. Assumes no 
page images have been loaded.
                 * Only load when wgImagesDisabled has not been activated via 
Special:MobileOptions.
+                *
+                * @method
                 */
                renderPageImages: function () {
                        var self = this,
@@ -50,6 +58,9 @@
                                }, delay );
                        }
                },
+               /**
+                * @inheritDoc
+                */
                initialize: function ( options ) {
                        // FIXME: Find more elegant standard way to allow 
enhancement of views already in DOM
                        if ( options.enhance ) {
diff --git a/javascripts/modules/uploads/PhotoApi.js 
b/javascripts/modules/uploads/PhotoApi.js
index a4f3ec9..b2e5bd1 100644
--- a/javascripts/modules/uploads/PhotoApi.js
+++ b/javascripts/modules/uploads/PhotoApi.js
@@ -82,6 +82,8 @@
        }
 
        /**
+        * API to handle photo uploads
+        *
         * @class PhotoApi
         * @extends Api
         */
@@ -89,6 +91,7 @@
                useCentralAuthToken: mw.config.get( 'wgMFUseCentralAuthToken' ),
 
                /**
+                * @inheritdoc
                 * @param {Object} options
                 *     [options.editorApi] EditorApi An API instance that will 
be used
                 * for inserting images in a page.
diff --git a/javascripts/modules/watchstar/WatchstarApi.js 
b/javascripts/modules/watchstar/WatchstarApi.js
index f2e5127..0b55d6a 100644
--- a/javascripts/modules/watchstar/WatchstarApi.js
+++ b/javascripts/modules/watchstar/WatchstarApi.js
@@ -4,6 +4,8 @@
                WatchstarApi;
 
        /**
+        * API for managing clickable watchstar
+        *
         * @class WatchstarApi
         * @extends Api
         */
@@ -49,8 +51,8 @@
                /**
                 * Marks whether a given page is watched or not to avoid an API 
call
                 * @method
-                * @param {Page} page
-                * @param {Boolean} isWatched
+                * @param {Page} page Page view object
+                * @param {Boolean} isWatched True if page is watched
                 */
                setWatchedPage: function ( page, isWatched ) {
                        this._cache[ page.getId() ] = isWatched;
@@ -59,7 +61,7 @@
                /**
                 * Check if a given page is watched
                 * @method
-                * @param {Page} page
+                * @param {Page} page Page view object
                 * @return {boolean}
                 * @throws Error when the status of the page has not been 
loaded.
                 */
@@ -75,7 +77,7 @@
                /**
                 * Toggle the watch status of a known page
                 * @method
-                * @param {Page} page
+                * @param {Page} page Page view object
                 * @return {jQuery.Deferred}
                 */
                toggleStatus: function ( page ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20caef5b48b2dc1c023580252f5ae563b4039717
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Robmoen <rm...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to