Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/360806 )

Change subject: Clean up and fix mistakes in code documentation
......................................................................

Clean up and fix mistakes in code documentation

Change-Id: I9d341c22640acc6449c52bf27dfb5b9767a1b3ad
---
M wikibase/queryService/api/QuerySamples.js
M wikibase/queryService/api/Tracking.js
M wikibase/queryService/ui/QueryExampleDialog.js
M wikibase/queryService/ui/i18n/LanguageSelector.js
M wikibase/queryService/ui/queryHelper/SparqlQuery.js
M wikibase/queryService/ui/resultBrowser/AbstractChartResultBrowser.js
M wikibase/queryService/ui/resultBrowser/AbstractDimpleChartResultBrowser.js
M wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
M wikibase/queryService/ui/resultBrowser/BubbleChartResultBrowser.js
M wikibase/queryService/ui/resultBrowser/TreeMapResultBrowser.js
M wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
M wikibase/queryService/ui/toolbar/ActionBar.js
12 files changed, 46 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/06/360806/1

diff --git a/wikibase/queryService/api/QuerySamples.js 
b/wikibase/queryService/api/QuerySamples.js
index 9c7926b..19831b5 100644
--- a/wikibase/queryService/api/QuerySamples.js
+++ b/wikibase/queryService/api/QuerySamples.js
@@ -61,7 +61,7 @@
         * Find previous element matching the selector
         *
         * @param {Element} element
-        * @param {String} selector
+        * @param {string} selector
         * @return {Element}
      * @private
      */
@@ -82,7 +82,7 @@
         * Get list of tags from UL list
         *
         * @param {Element} tagUL
-        * @return {String[]}
+        * @return {string[]}
      * @private
      */
        SELF.prototype._extractTagsFromUL = function( tagUL ) {
@@ -132,7 +132,6 @@
                                tags:     self._extractTagsFromUL( tagUL ),
                                category: self._findPrevHeader( titleEl 
).text().trim()
                        };
-
                } ).get();
                // group by category
                return _.flatten( _.toArray( _.groupBy( examples, 'category' ) 
) );
diff --git a/wikibase/queryService/api/Tracking.js 
b/wikibase/queryService/api/Tracking.js
index 4fb8feb..d376248 100644
--- a/wikibase/queryService/api/Tracking.js
+++ b/wikibase/queryService/api/Tracking.js
@@ -33,7 +33,7 @@
 
        /**
         * @param {string} metricName
-        * @param {int} value
+        * @param {Number} value
         * @param {string} valueType
         *
         * @return {jQuery.Promise}
diff --git a/wikibase/queryService/ui/QueryExampleDialog.js 
b/wikibase/queryService/ui/QueryExampleDialog.js
index a2fa53b..787a895 100644
--- a/wikibase/queryService/ui/QueryExampleDialog.js
+++ b/wikibase/queryService/ui/QueryExampleDialog.js
@@ -44,7 +44,7 @@
        SELF.prototype._callback = null;
 
        /**
-        * @property {String}
+        * @property {string}
         * @private
         */
        SELF.prototype._previewUrl = null;
diff --git a/wikibase/queryService/ui/i18n/LanguageSelector.js 
b/wikibase/queryService/ui/i18n/LanguageSelector.js
index 514c069..c40e03c 100644
--- a/wikibase/queryService/ui/i18n/LanguageSelector.js
+++ b/wikibase/queryService/ui/i18n/LanguageSelector.js
@@ -16,7 +16,7 @@
         * @constructor
         * @param {jQuery} $element
         * @param {wikibase.queryService.api.Wikibase} api
-        * @param {String} lang default language
+        * @param {string} lang default language
         */
        function SELF( $element, api, lang ) {
                this._$element = $element;
@@ -45,7 +45,7 @@
        SELF.prototype._$element = null;
 
        /**
-        * @property {String}
+        * @property {string}
         * @private
         */
        SELF.prototype._defaultLanguage = null;
diff --git a/wikibase/queryService/ui/queryHelper/SparqlQuery.js 
b/wikibase/queryService/ui/queryHelper/SparqlQuery.js
index 1f3d2b9..48849fc 100644
--- a/wikibase/queryService/ui/queryHelper/SparqlQuery.js
+++ b/wikibase/queryService/ui/queryHelper/SparqlQuery.js
@@ -35,7 +35,8 @@
        /**
         * Set the SPARQL query string
         *
-        * @param {String} query SPARQL query string
+        * @param {string} query SPARQL query string
+        * @param {Object} prefixes
         */
        SELF.prototype.parse = function( query, prefixes ) {
                var parser = new sparqljs.Parser( prefixes ),
@@ -52,7 +53,7 @@
        /**
         * Get the SPARQL query string
         *
-        * @return {String|null}
+        * @return {string|null}
         */
        SELF.prototype.getQueryString = function() {
                try {
@@ -70,8 +71,6 @@
        };
 
        /**
-        * Get LIMIT
-        *
         * @return {Number|null}
         */
        SELF.prototype.getLimit = function() {
@@ -83,9 +82,7 @@
        };
 
        /**
-        * Set LIMIT
-        *
-        * @param {int} limit
+        * @param {Number|null} limit
         * @return {wikibase.queryService.ui.queryHelper.SparqlQuery}
         */
        SELF.prototype.setLimit = function( limit ) {
@@ -244,10 +241,10 @@
        /**
         * Add a triple to the query
         *
-        * @param {String} subject
-        * @param {String} predicate
-        * @param {String} object
-        * @param {Boolean} isOptional
+        * @param {string} subject
+        * @param {string} predicate
+        * @param {string} object
+        * @param {boolean} isOptional
         */
        SELF.prototype.addTriple = function( subject, predicate, object, 
isOptional ) {
                var triple = {
@@ -279,7 +276,7 @@
        /**
         * Get variables that are bound to a certain value
         *
-        * @return {String[]}
+        * @return {string[]}
         */
        SELF.prototype.getBoundVariables = function() {
                var variables = {};
diff --git 
a/wikibase/queryService/ui/resultBrowser/AbstractChartResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/AbstractChartResultBrowser.js
index e92d355..858f376 100644
--- a/wikibase/queryService/ui/resultBrowser/AbstractChartResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/AbstractChartResultBrowser.js
@@ -25,7 +25,7 @@
         * Returns all columns that contain numbers
         *
         * @protected
-        * @return {String[]}
+        * @return {string[]}
         */
        SELF.prototype._getLabelColumns = function() {
                var self = this,
@@ -52,7 +52,7 @@
 
        /**
         * @protected
-        * @return {String[]}
+        * @return {string[]}
         **/
        SELF.prototype._getColumns = function() {
                return this._result.head.vars;
diff --git 
a/wikibase/queryService/ui/resultBrowser/AbstractDimpleChartResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/AbstractDimpleChartResultBrowser.js
index 4a80e4e..8407fbb 100644
--- a/wikibase/queryService/ui/resultBrowser/AbstractDimpleChartResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/AbstractDimpleChartResultBrowser.js
@@ -30,7 +30,7 @@
        SELF.prototype._dataColumns = null;
 
        /**
-        * @property {String[]}
+        * @property {string[]}
         * @private
         */
        SELF.prototype._data = null;
@@ -60,19 +60,19 @@
        SELF.prototype._chartLegend = null;
 
        /**
-        * @property {String}
+        * @property {string}
         * @private
         */
        SELF.prototype._chartSeriesKey = null;
 
        /**
-        * @property {String}
+        * @property {string}
         * @private
         */
        SELF.prototype._chartStoryKey = null;
 
        /**
-        * @property {bool}
+        * @property {boolean}
         * @private
         */
        SELF.prototype._isStoryPause = false;
@@ -260,6 +260,7 @@
         * Receiving data from the a visit
         *
         * @param {Object} value
+        * @param {string} key
         * @return {boolean} false if there is no revisit needed
         */
        SELF.prototype.visit = function( value, key ) {
@@ -268,6 +269,11 @@
 
        /**
         * Check if this value contains an coordinate value.
+        *
+        * @param {Object} value
+        * @param {string} key
+        * @return {boolean}
+        * @private
         */
        SELF.prototype._checkColumn = function( value, key ) {
                if ( this._getFormatter().isLabel( value ) ) {
diff --git a/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
index 823c5ce..8137ee6 100644
--- a/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
@@ -142,7 +142,7 @@
         *
         * @protected
         * @param {Object} data
-        * @param {String} columnKey
+        * @param {string} columnKey
         */
        SELF.prototype.processVisitors = function( data, columnKey ) {
                var self = this,
diff --git a/wikibase/queryService/ui/resultBrowser/BubbleChartResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/BubbleChartResultBrowser.js
index fae417d..9f9ff92 100644
--- a/wikibase/queryService/ui/resultBrowser/BubbleChartResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/BubbleChartResultBrowser.js
@@ -166,6 +166,10 @@
 
        /**
         * Check if this value contains an numeric value.
+        *
+        * @param {Object} value
+        * @return {boolean}
+        * @private
         */
        SELF.prototype._checkColumn = function( value ) {
                if ( this._getFormatter().isNumber( value ) ) {
diff --git a/wikibase/queryService/ui/resultBrowser/TreeMapResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/TreeMapResultBrowser.js
index bd989bf..42889b6 100644
--- a/wikibase/queryService/ui/resultBrowser/TreeMapResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/TreeMapResultBrowser.js
@@ -378,6 +378,7 @@
         * Receiving data from the a visit
         *
         * @param {Object} data
+        * @param {string} key
         * @return {boolean} false if there is no revisit needed
         */
        SELF.prototype.visit = function( data, key ) {
@@ -385,7 +386,10 @@
        };
 
        /**
-        * Check if this value contains an coordinate value.
+        * @param {Object} value
+        * @param {string} key
+        * @return {boolean}
+        * @private
         */
        SELF.prototype._checkColumn = function( value, key ) {
                if ( this._getFormatter().isLabel( value, key ) ) {
diff --git a/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js 
b/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
index e86cb68..11a116c 100644
--- a/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
+++ b/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
@@ -89,8 +89,8 @@
         * Format a data value
         *
         * @param {Object} data
-        * @param {string} title (optional)
-        * @param {boolean} embed (optional) media files
+        * @param {string} [title]
+        * @param {boolean} [embed] media files
         * @return {jQuery} element
         */
        SELF.prototype.formatValue = function( data, title, embed ) {
@@ -258,8 +258,8 @@
         * Creates a thumbnail URL from given commons resource URL
         *
         * @param {string} url
-        * @param {number} [width]
-        * @return {String}
+        * @param {Number} [width]
+        * @return {string}
         */
        SELF.prototype.getCommonsResourceFileNameThumbnail = function( url, 
width ) {
                if ( !this.isCommonsResource( url ) ) {
@@ -428,7 +428,7 @@
         * Returns an HTML color string for the current cell
         *
         * @param {Object} cell
-        * @return {String}
+        * @return {string}
         */
        SELF.prototype.getColorForHtml = function ( cell ) {
                return '#' + cell.value;
@@ -442,7 +442,7 @@
         * to calculate the luminance (Y coordinate in the CIE XYZ model).
         *
         * @param {string} color as six hex digits (no #)
-        * @return {number} luminance of the color, or NaN if the color string 
is invalid
+        * @return {Number} luminance of the color, or NaN if the color string 
is invalid
         */
        SELF.prototype.calculateLuminance = function( color ) {
                var r = parseInt( color.substr( 1, 2 ), 16 ) / 255,
@@ -465,11 +465,10 @@
        /**
         * Get an i18n string
         *
-        * @private
         * @param {string} key for the i18n message
         * @param {string} message default text
-        *
         * @return {string}
+        * @private
         */
        SELF.prototype._i18n = function( key, message ) {
                var i18nMessage;
diff --git a/wikibase/queryService/ui/toolbar/ActionBar.js 
b/wikibase/queryService/ui/toolbar/ActionBar.js
index a53b4da..4cff109 100644
--- a/wikibase/queryService/ui/toolbar/ActionBar.js
+++ b/wikibase/queryService/ui/toolbar/ActionBar.js
@@ -33,7 +33,7 @@
         * @param {string} messageKey primary message key
         * @param {string} extraText to be appended to the primary message
         * @param {string} type of message: primary, success, info, warning, 
danger
-        * @param {int} progress false if no progress, or actual progress 0-100
+        * @param {Number|boolean} [progress] false if no progress, or actual 
progress 0-100
         */
        SELF.prototype.show = function( messageKey, extraText, type, progress ) 
{
                var text = messageKey;
@@ -63,7 +63,7 @@
        /**
         * @param {string} text
         * @param {string} type
-        * @param {int} progress
+        * @param {Number} progress in percent (0 to 100)
         * @private
         */
        SELF.prototype._getProgressbar = function( text, type, progress ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d341c22640acc6449c52bf27dfb5b9767a1b3ad
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>

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

Reply via email to