[MediaWiki-commits] [Gerrit] Final tweaks to QuickSurvey panel placement. - change (mediawiki...QuickSurveys)

2015-09-24 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Final tweaks to QuickSurvey panel placement.
..

Final tweaks to QuickSurvey panel placement.

* On mobile, places panel after the first p element with content
* On desktop, places panel before first infobox, thumb, or heading
* Otherwise, places panel at the end of the article

Bug: T113651
Change-Id: Iad47e72ff5eaae82ec51546255d8c6ba274fad8e
---
M resources/ext.quicksurveys.init/init.js
1 file changed, 19 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/21/240921/1

diff --git a/resources/ext.quicksurveys.init/init.js 
b/resources/ext.quicksurveys.init/init.js
index 08d2bc8..cf1adbc 100644
--- a/resources/ext.quicksurveys.init/init.js
+++ b/resources/ext.quicksurveys.init/init.js
@@ -26,20 +26,31 @@
 
/**
 * Insert the quick survey panel into the article either (in priority 
order)
-* before the first instance of a thumbnail,
-* before the first instance of a heading
-* or at the end of the article when no headings nor thumbnails exist
+* On mobile: after the first p element with content
+* On desktop: before the first instance of a infobox, thumb, or heading
+* Or after the article when no infobox, thumbnails or headings exist
+*
 * @param {jQuery.Object} $panel
 */
function insertPanel( $panel ) {
var $bodyContent = $( '.mw-content-ltr, .mw-content-rtl' ),
-   $place = $bodyContent
-   .find( '.infobox, > .thumb, > h1, > h2, > h3, > 
h4, > h5, > h6' )
-   .eq( 0 );
+   $place;
 
-   if ( $place.length ) {
-   $panel.insertBefore( $place );
+   if ( window.innerWidth <= 768 ) {
+   $bodyContent.find( '> div > p' ).each( function() {
+   if ( $.trim( $( this ).text() ).length > 0 ) {
+   $panel.insertAfter( $( this ) );
+   return false;
+   }
+   } );
} else {
+   $panel.insertBefore( $bodyContent
+   .find( '.infobox, .thumb, > h1, > h2, > h3, > 
h4, > h5, > h6' )
+   .eq( 0 )
+   );
+   }
+
+   if ( $panel.length === 0 ) {
$panel.appendTo( $bodyContent );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad47e72ff5eaae82ec51546255d8c6ba274fad8e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuickSurveys
Gerrit-Branch: dev
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Init QuickSurveys only on existing pages in the main namespace - change (mediawiki...QuickSurveys)

2015-09-24 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Init QuickSurveys only on existing pages in the main namespace
..

Init QuickSurveys only on existing pages in the main namespace

Bug: T113652
Change-Id: I3af29f39ce0b832999e70746e80163238d3a9f5f
---
M includes/QuickSurveys.hooks.php
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/05/240905/1

diff --git a/includes/QuickSurveys.hooks.php b/includes/QuickSurveys.hooks.php
index e009635..63d1c6a 100644
--- a/includes/QuickSurveys.hooks.php
+++ b/includes/QuickSurveys.hooks.php
@@ -29,7 +29,8 @@
}
 
/**
-* BeforePageDisplay hook handler
+* Init QuickSurveys in BeforePageDisplay hook on existing pages in the 
main namespace
+*
 * @see https://www.mediawiki.org/wiki/Manual:Hooks/BeforePageDisplay
 *
 * @param OutputPage $out
@@ -37,7 +38,10 @@
 * @return bool
 */
public static function onBeforePageDisplay( &$out, &$sk ) {
-   $out->addModules( 'ext.quicksurveys.init' );
+   $title = $out->getTitle();
+   if ( $title->inNamespace( NS_MAIN ) && $title->exists() ) {
+   $out->addModules( 'ext.quicksurveys.init' );
+   }
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3af29f39ce0b832999e70746e80163238d3a9f5f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuickSurveys
Gerrit-Branch: dev
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Security improvements - change (mediawiki...QuickSurveys)

2015-09-21 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Security improvements
..

Security improvements

* Parse messages used directly in HTML in ExternalSurvey.js
* Truncate Country code to 2 characters per ISO_3166-1 alpha-2

Bug: T110662
Change-Id: I742221107e5becc784b2721b4df070d8cccbffe9
---
M resources/ext.quicksurveys.views/ExternalSurvey.js
M resources/ext.quicksurveys.views/utils.js
2 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/93/239993/1

diff --git a/resources/ext.quicksurveys.views/ExternalSurvey.js 
b/resources/ext.quicksurveys.views/ExternalSurvey.js
index 82ab5db..5694064 100644
--- a/resources/ext.quicksurveys.views/ExternalSurvey.js
+++ b/resources/ext.quicksurveys.views/ExternalSurvey.js
@@ -15,7 +15,7 @@
 * @inheritdoc
 */
initialize: function ( config ) {
-   this.defaults.templateData.footer = mw.msg( 
config.survey.privacyPolicy );
+   this.defaults.templateData.footer = mw.message( 
config.survey.privacyPolicy ).parse();
QuickSurvey.prototype.initialize.call( this, config );
},
/**
@@ -23,9 +23,11 @@
 */
renderButtons: function () {
var $btnContainer = this.initialPanel.$element.find( 
'.survey-button-container' ),
+   // Force https per security review See: T110662
+   link = mw.msg( this.config.survey.link 
).replace( 'http:', 'https:' ),
buttons = [
{
-   href: mw.msg( 
this.config.survey.link ),
+   href: link,
target: '_blank',
label: mw.msg( 
'ext-quicksurveys-external-survey-yes-button' ),
flags: 'constructive'
diff --git a/resources/ext.quicksurveys.views/utils.js 
b/resources/ext.quicksurveys.views/utils.js
index fd0b727..b69d19f 100644
--- a/resources/ext.quicksurveys.views/utils.js
+++ b/resources/ext.quicksurveys.views/utils.js
@@ -53,7 +53,8 @@
var geoIP = mw.cookie.get( 'GeoIP', '' );
 
if ( geoIP ) {
-   return geoIP.split( ':' )[0];
+   // Return truncated per ISO 3166-1 alpha-2 country code
+   return geoIP.split( ':' )[0].substring( 0, 2 );
}
return 'Unknown';
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I742221107e5becc784b2721b4df070d8cccbffe9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuickSurveys
Gerrit-Branch: dev
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Remove mobile.experiments dependency - change (mediawiki...Gather)

2015-09-10 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Remove mobile.experiments dependency
..

Remove mobile.experiments dependency

Rationale:
- Removed mobile.experiments from mobile frontend in favor of
mediawiki.experiments
- Removed bucketing work in init.js as no experiment is currently
defined

Bug: 1628014
Change-Id: I83f4eec2691d40b56db28dd69d8453109d86ae31
---
M extension.json
M resources/ext.gather.init/init.js
2 files changed, 1 insertion(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/00/237500/1

diff --git a/extension.json b/extension.json
index a2d069c..28eec93 100644
--- a/extension.json
+++ b/extension.json
@@ -388,7 +388,6 @@
],
"dependencies": [
"ext.gather.menu.icon",
-   "mobile.experiments",
"mobile.watchstar",
"ext.gather.watchstar"
],
diff --git a/resources/ext.gather.init/init.js 
b/resources/ext.gather.init/init.js
index ad04728..c55d6a1 100644
--- a/resources/ext.gather.init/init.js
+++ b/resources/ext.gather.init/init.js
@@ -2,7 +2,6 @@
 ( function ( M, $ ) {
 
var $star, watchstar, pageActionPointer, actionOverlay,
-   bucket, useGatherStar,
CollectionsWatchstar = M.require( 
'ext.gather.watchstar/CollectionsWatchstar' ),
Watchstar = M.require( 'mobile.watchstar/Watchstar' ),
PageActionOverlay = M.require( 
'mobile.contentOverlays/PointerOverlay' ),
@@ -12,8 +11,8 @@
settingOverlayWasDismissed = 'gather-has-dismissed-tutorial',
mainMenuPointerDismissed = 'gather-has-dismissed-mainmenu',
user = M.require( 'user' ),
-   experiments = M.require( 'experiments' ),
context = M.require( 'context' ),
+   useGatherStar = context.isBetaGroupMember(),
skin = M.require( 'skin' ),
mainMenu = M.require( 'mainMenu' ),
Page = M.require( 'Page' ),
@@ -167,14 +166,6 @@
}
}
} );
-   }
-
-   try {
-   bucket = experiments.getBucket( 'gather' );
-   useGatherStar = context.isBetaGroupMember() || bucket === 'A';
-   } catch ( e ) {
-   // experiment hasn't been defined. Only enable in beta.
-   useGatherStar = context.isBetaGroupMember();
}
 
// Only init when current page is an article

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83f4eec2691d40b56db28dd69d8453109d86ae31
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Remove mobile.experiments as mediawiki.experiments is in core - change (mediawiki...MobileFrontend)

2015-09-10 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Remove mobile.experiments as mediawiki.experiments is in core
..

Remove mobile.experiments as mediawiki.experiments is in core

Bug: T111287
Change-Id: I2cd0d95632be884db5cafd6d5b789e55c95c4609
---
M includes/Config.php
M includes/MobileFrontend.hooks.php
M includes/Resources.php
D includes/config/Experiments.php
M includes/skins/SkinMinerva.php
D resources/mobile.experiments/experiments.js
D tests/qunit/mobile.experiments/test_experiments.js
7 files changed, 0 insertions(+), 238 deletions(-)


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

diff --git a/includes/Config.php b/includes/Config.php
index 6c13fc9..64442c9 100644
--- a/includes/Config.php
+++ b/includes/Config.php
@@ -3,7 +3,6 @@
require_once __DIR__ . "/config/Analytics.php";
require_once __DIR__ . "/config/Editing.php";
require_once __DIR__ . "/config/Experimental.php";
-   require_once __DIR__ . "/config/Experiments.php";
require_once __DIR__ . "/config/Legacy.php";
require_once __DIR__ . "/config/Nearby.php";
require_once __DIR__ . "/config/Site.php";
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index a2ec58d..ed8b861 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -348,7 +348,6 @@
// Get the licensing agreement that is displayed in the 
uploading interface.
$wgMFUploadLicense = SkinMinerva::getLicense( 'upload' );
$vars += array(
-   'wgMFExperiments' => $config->get( 'MFExperiments' ),
'wgMFNearbyEndpoint' => $config->get( 
'MFNearbyEndpoint' ),
'wgMFThumbnailSizes' => array(
'tiny' =>  MobilePage::TINY_IMAGE_WIDTH,
diff --git a/includes/Resources.php b/includes/Resources.php
index 08f493e..3861be0 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -1769,14 +1769,6 @@
'mobile.toc',
),
),
-   'mobile.experiments' => $wgMFResourceFileModuleBoilerplate + array(
-   'dependencies' => array(
-   'mobile.user',
-   ),
-   'scripts' => array(
-   'resources/mobile.experiments/experiments.js',
-   ),
-   ),
 );
 
 $wgResourceModules = array_merge( $wgResourceModules,
diff --git a/includes/config/Experiments.php b/includes/config/Experiments.php
deleted file mode 100644
index 6f9c520..000
--- a/includes/config/Experiments.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
- * $wgMFExperiments = array(
- * 'wikigrok' => array(
- * 'enabled' => true,
- * 'buckets' => array(
- * 'control' => 0.33,
- * 'A' => 0.33,
- * 'B' => 0.33,
- * ),
- * ),
- * );
- * 
- *
- * The wikigrok experiment has three buckets: control, A, and B. The user has 
a 33% chance of being
- * being assigned to each bucket. Note well that if the experiment were 
disabled, then the user is
- * always assigned to the control bucket.
- */
-$wgMFExperiments = array();
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 5931cc3..97d9230 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -1023,12 +1023,6 @@
$modules[] = 'mobile.newusers';
}
}
-
-   $mfExperiments = $this->getMFConfig()->get( 
'MFExperiments' );
-
-   if ( count( $mfExperiments ) > 0 ) {
-   $modules[] = 'mobile.experiments';
-   }
}
 
// TalkOverlay feature
diff --git a/resources/mobile.experiments/experiments.js 
b/resources/mobile.experiments/experiments.js
deleted file mode 100644
index b0cde2f..000
--- a/resources/mobile.experiments/experiments.js
+++ /dev/null
@@ -1,136 +0,0 @@
-( function ( M ) {
-
-   var CONTROL_BUCKET = 'control',
-   user = M.require( 'user' ),
-   MAX_INT32_UNSIGNED = 4294967295;
-
-   /**
-* An implementation of Jenkins's one-at-a-time hash
-* See 
-*
-* @param {String} key String to hash.
-* @return {Number} 32-bit integer.
-* @ignore
-*
-* @author Ori Livneh 
-* @see http://jsbin.com/kejewi/4/watch?js,console
-*/
-   function hashString( key ) {
-   var hash = 0,
-   i = key.length;
-
-   while ( i-- ) {
-   hash += key.charCodeAt( i );
-   

[MediaWiki-commits] [Gerrit] Fix typo with example survey schema config - change (operations/mediawiki-config)

2015-09-09 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Fix typo with example survey schema config
..

Fix typo with example survey schema config

Bug: T111974
Change-Id: I49cf1006dcd2e0c26b3b96adeea889c31ecf05c8
---
M wmf-config/CommonSettings-labs.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/45/237145/1

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 7739efd..f4445a5 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -242,7 +242,7 @@
'neutral' => 
'ext-quicksurveys-example-internal-survey-answer-neutral',
'negative' => 
'ext-quicksurveys-example-internal-survey-answer-negative',
),
-   'schema' => 'QuickSurveysResponses',
+   'schema' => 'QuickSurveysResponse',
'enabled' => true,
'coverage' => .5,
'description' => 
'ext-quicksurveys-example-internal-survey-description',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49cf1006dcd2e0c26b3b96adeea889c31ecf05c8
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Use the correct schema for example survey - change (mediawiki...QuickSurveys)

2015-09-09 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Use the correct schema for example survey
..

Use the correct schema for example survey

Change-Id: I2ff8c69d8b9eb3da1e085c84b69ecd711ffa02e7
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/73/237173/1

diff --git a/extension.json b/extension.json
index 1869db7..aca5100 100644
--- a/extension.json
+++ b/extension.json
@@ -125,7 +125,7 @@
"negative": 
"ext-quicksurveys-example-internal-survey-answer-negative"
},
"@schema": "Which schema to log to",
-   "schema": "QuickSurveysResponse",
+   "schema": "QuickSurveysResponses",
"@enabled": "whether the survey is enabled",
"enabled": false,
"@coverage": "percentage of users that will see 
the survey",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ff8c69d8b9eb3da1e085c84b69ecd711ffa02e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuickSurveys
Gerrit-Branch: dev
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Enable QuickSurveys by default on labs with example survey - change (operations/mediawiki-config)

2015-09-08 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Enable QuickSurveys by default on labs with example survey
..

Enable QuickSurveys by default on labs with example survey

Bug: T110199
Change-Id: I318d31e190e8c972ac384ce5b6d949dcdbe4442f
---
M wmf-config/CommonSettings-labs.php
M wmf-config/InitialiseSettings-labs.php
2 files changed, 27 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/79/236979/1

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index e7bbdeb..c661ea8 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -230,6 +230,29 @@
);
 }
 
+if ( $wmgUseQuickSurveys ) {
+   wfLoadExtensions( array( 'QuickSurveys' ) );
+
+   $wgQuickSurveysConfig[] = array(
+   "name" => "internal example survey",
+   "type" => "internal",
+   "question" => 
"ext-quicksurveys-example-internal-survey-question",
+   "answers" => array(
+   "positive" => 
"ext-quicksurveys-example-internal-survey-answer-positive",
+   "neutral" => 
"ext-quicksurveys-example-internal-survey-answer-neutral",
+   "negative"=> 
"ext-quicksurveys-example-internal-survey-answer-negative"
+   ),
+   "schema" => "QuickSurveysResponses",
+   "enabled" => true,
+   "coverage" => .5,
+   "description" => 
"ext-quicksurveys-example-internal-survey-description",
+   "platform" => array(
+   "desktop" => array( "stable" ),
+   "mobile" => array( "stable", "beta", "alpha" ),
+   ),
+   );
+}
+
 if ( $wmgUseSentry ) {
require_once( "$IP/extensions/Sentry/Sentry.php" );
$wgSentryDsn = $wmgSentryDsn;
diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 978f2d5..88fecc4 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -986,6 +986,10 @@
'metawiki' => true,
),
 
+   'wmgUseQuickSurveys' = array(
+   'default' => true,
+   ),
+
'wmgUseSentry' => array(
'default' => true,
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I318d31e190e8c972ac384ce5b6d949dcdbe4442f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Release 0.1.0 of QuickSurveys - change (mediawiki...QuickSurveys)

2015-09-08 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Release 0.1.0 of QuickSurveys
..

Release 0.1.0 of QuickSurveys

Merge branch 'dev'
Generated via
``git merge --no-ff origin/dev``

Change-Id: Idc6af61a633a125dc0a149ca411e646984acbf90
---
M .gitreview
M extension.json
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/72/236972/1

diff --git a/.gitreview b/.gitreview
index a7671ae..93cc955 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=mediawiki/extensions/QuickSurveys.git
-defaultbranch=dev
+defaultbranch=master
 defaultrebase=0
diff --git a/extension.json b/extension.json
index 1869db7..1e96013 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "QuickSurveys",
-   "version": "0.0.1",
+   "version": "0.1.0",
"author": [
"Bahodir Mansurov",
"Joaquin Hernandez",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc6af61a633a125dc0a149ca411e646984acbf90
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuickSurveys
Gerrit-Branch: master
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Switch dev back to the default branch - change (mediawiki...QuickSurveys)

2015-09-08 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Switch dev back to the default branch
..

Switch dev back to the default branch

Change-Id: I85499908ac9e97c035d5b5e276031b233163
---
M .gitreview
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/86/236986/1

diff --git a/.gitreview b/.gitreview
index 93cc955..a7671ae 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=mediawiki/extensions/QuickSurveys.git
-defaultbranch=master
+defaultbranch=dev
 defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85499908ac9e97c035d5b5e276031b233163
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuickSurveys
Gerrit-Branch: dev
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Remove history-link-loaded event and inline script wrapper - change (mediawiki...MobileFrontend)

2015-09-04 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Remove history-link-loaded event and inline script wrapper
..

Remove history-link-loaded event and inline script wrapper

History link modifications are now done slightly slower than before.
But I suppose this is acceptable now that the last-modified is at the
bottome of the page

Change-Id: Ia4e04f749223d7bf5d222687fe02cbfe98181d41
---
M includes/skins/MinervaTemplate.php
M resources/mobile.head/init.js
2 files changed, 7 insertions(+), 18 deletions(-)


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

diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index 7abee82..e315b6d 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -288,29 +288,18 @@
 * @param array $data Data used to build the page
 */
protected function renderContentWrapper( $data ) {
-   echo $this->makeInlineMobileHeadEmitScript( 'header-loaded' );
+   // Construct an inline script which emits header-loaded
+   $headerLoaded = "mw.loader.using( 'mobile.head', function () {";
+   $headerLoaded .= "mw.mobileFrontend.emit( 'header-loaded' );";
+   $headerLoaded .= "} );";
+   echo ResourceLoader::makeInlineScript( $headerLoaded );
+
$this->renderPreContent( $data );
$this->renderContent( $data );
// Last modified bar at the top of the article
if ( !$this->isMainPage ) {
echo $this->getHistoryLinkHtml( $data );
}
-   echo $this->makeInlineMobileHeadEmitScript( 
'history-link-loaded' );
-   }
-
-   /**
-* Construct an inline script tag which emits the given event
-*
-* The emit code will be wrapped in a closure using the mobile.head 
module
-*
-* @param string $event Event to emit
-* @return WrappedString HTML
-*/
-   protected function makeInlineMobileHeadEmitScript( $event ) {
-   $script = "mw.loader.using( 'mobile.head', function () {";
-   $script .= "mw.mobileFrontend.emit( '" . $event . "' );";
-   $script .= "} );";
-   return ResourceLoader::makeInlineScript( $script );
}
 
/**
diff --git a/resources/mobile.head/init.js b/resources/mobile.head/init.js
index 415682e..71844dc 100644
--- a/resources/mobile.head/init.js
+++ b/resources/mobile.head/init.js
@@ -35,7 +35,6 @@
 
// bind events
M.define( 'mainMenu', mainMenu );
-   M.on( 'history-link-loaded', initHistoryLink );
M.on( 'header-loaded', function () {
// Now we have a main menu button register it.
mainMenu.registerClickEvents();
@@ -45,6 +44,7 @@
if ( !$( '#mw-mf-page-left' ).find( '.menu' ).length ) {
mainMenu.appendTo( '#mw-mf-page-left' );
}
+   initHistoryLink();
} );
 
 }( mw.mobileFrontend, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4e04f749223d7bf5d222687fe02cbfe98181d41
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Push max-width work from beta to stable - change (mediawiki...MobileFrontend)

2015-09-04 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Push max-width work from beta to stable
..

Push max-width work from beta to stable

And eliminated empty modules

Bug: T101344
Change-Id: If6ac8bcad40cbf409fe777da6c75db09c7e29775
---
M includes/Resources.php
M includes/skins/SkinMinervaBeta.php
M resources/mobile.contentOverlays/tutorials.less
M resources/mobile.overlays/Overlay.less
D resources/skins.minerva.beta.styles/main.less
M resources/skins.minerva.content.styles/main.less
D resources/skins.minerva.tablet.beta.styles/common.less
D resources/skins.minerva.tablet.beta.styles/hacks.less
D resources/skins.minerva.tablet.beta.styles/ui.less
M resources/skins.minerva.tablet.styles/common.less
M resources/skins.minerva.tablet.styles/hacks.less
11 files changed, 75 insertions(+), 117 deletions(-)


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

diff --git a/includes/Resources.php b/includes/Resources.php
index 3c0b83f..366b386 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -85,14 +85,6 @@
'resources/skins.minerva.tablet.styles/hacks.less',
),
),
-   'skins.minerva.tablet.beta.styles' => 
$wgMFResourceFileModuleBoilerplate + array(
-   'position' => 'top',
-   'styles' => array(
-   'resources/skins.minerva.tablet.beta.styles/ui.less',
-   
'resources/skins.minerva.tablet.beta.styles/common.less',
-   'resources/skins.minerva.tablet.beta.styles/hacks.less',
-   ),
-   ),
'skins.minerva.icons.images' => $wgMFResourceFileModuleBoilerplate + 
array(
'class' => 'ResourceLoaderImageModule',
'prefix' => 'mw-ui',
@@ -197,7 +189,6 @@
'resources/skins.minerva.beta.styles/common.less',
'resources/skins.minerva.beta.styles/pageactions.less',
'resources/skins.minerva.beta.styles/footer.less',
-   'resources/skins.minerva.beta.styles/main.less',
),
),
'skins.minerva.beta.images' => $wgMFResourceFileModuleBoilerplate + 
array(
diff --git a/includes/skins/SkinMinervaBeta.php 
b/includes/skins/SkinMinervaBeta.php
index c75982f..c0d6701 100644
--- a/includes/skins/SkinMinervaBeta.php
+++ b/includes/skins/SkinMinervaBeta.php
@@ -126,7 +126,6 @@
protected function getSkinStyles() {
$styles = parent::getSkinStyles();
$styles[] = 'skins.minerva.beta.styles';
-   $styles[] = 'skins.minerva.tablet.beta.styles';
$styles[] = 'skins.minerva.beta.images';
if ( $this->getTitle()->isMainPage() ) {
$styles[] = 'skins.minerva.mainPage.beta.styles';
diff --git a/resources/mobile.contentOverlays/tutorials.less 
b/resources/mobile.contentOverlays/tutorials.less
index 82d8335..7aa1452 100644
--- a/resources/mobile.contentOverlays/tutorials.less
+++ b/resources/mobile.contentOverlays/tutorials.less
@@ -1,6 +1,16 @@
 @import "minerva.variables";
 @import "minerva.mixins";
 
+
+@media all and (min-width: @wgMFDeviceWidthTablet) {
+   // Take into account padding in width of pointer overlay so that it
+   // can point to anything in the containing content area and avoid
+   // padding issues such as https://phabricator.wikimedia.org/F287611
+   #mw-mf-page-center .pointer-overlay {
+   max-width: @wgMFDeviceWidthDesktop;
+   }
+}
+
 .navigation-drawer {
.pointer-overlay {
right: auto;
diff --git a/resources/mobile.overlays/Overlay.less 
b/resources/mobile.overlays/Overlay.less
index c514afb..ad105d3 100644
--- a/resources/mobile.overlays/Overlay.less
+++ b/resources/mobile.overlays/Overlay.less
@@ -374,18 +374,15 @@
}
}
 
-   .alpha,
-   .beta {
-   .overlay-header {
-   .cancel {
-   // so that the icon image is aligned with the 
content
-   left: -@iconGutterWidth;
-   }
-   // Search input in the header
-   input.search {
-   // because we're pulling .main-menu-button to 
the left too (see above)
-   margin-left: -@iconGutterWidth;
-   }
+   .overlay-header {
+   .cancel {
+   // so that the icon image is aligned with the content
+   left: -@iconGutterWidth;
+   }
+   // Search input in the header
+   input.search {
+   // because we're pulling .main-menu-button to the left 
too (see above)
+   

[MediaWiki-commits] [Gerrit] Promote beta last-modified-bar work to stable - change (mediawiki...MobileFrontend)

2015-09-03 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Promote beta last-modified-bar work to stable
..

Promote beta last-modified-bar work to stable

- Last modified bar is now on the bottom of the page
- Eliminate no longer needed methods from MinervaTemplate.php
- Remove modified bar location specific classes from template

Note: tablet styles for .last-modified-bar.pre-content to be
removed when cache clears.

Bug: T104697
Change-Id: I2e2259f381e42944106b9b2972fd83b37acd1ead
---
M includes/skins/MinervaTemplate.php
M includes/skins/MinervaTemplateBeta.php
M includes/skins/history.mustache
M resources/skins.minerva.content.styles/links.less
M resources/skins.minerva.tablet.beta.styles/ui.less
M resources/skins.minerva.tablet.styles/common.less
6 files changed, 38 insertions(+), 71 deletions(-)


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

diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index fdf2112..7abee82 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -7,9 +7,6 @@
  * Extended Template class of BaseTemplate for mobile devices
  */
 class MinervaTemplate extends BaseTemplate {
-   /** @var boolean Temporary variable that decides whether
-* history link should be rendered before the content. */
-   protected $renderHistoryLinkBeforeContent = true;
/** @var string $searchPlaceHolderMsg Message used as placeholder in 
search input */
protected $searchPlaceHolderMsg = 'mobile-frontend-placeholder';
 
@@ -168,32 +165,6 @@
}
 
/**
-* Gets history link at top of page if it isn't the main page
-* @param array $data Data used to build the page
-* @return string
-*/
-   protected function getHistoryLinkTopHtml( $data ) {
-   if ( !$this->isMainPage ) {
-   return $this->getHistoryLinkHtml( $data );
-   } else {
-   return '';
-   }
-   }
-
-   /**
-* Gets history link at bottom of page if it is the main page
-* @param array $data Data used to build the page
-* @return string
-*/
-   protected function getHistoryLinkBottomHtml( $data ) {
-   if ( $this->isMainPage ) {
-   return $this->getHistoryLinkHtml( $data );
-   } else {
-   return '';
-   }
-   }
-
-   /**
 * Get page secondary actions
 */
protected function getSecondaryActions() {
@@ -254,15 +225,16 @@
'lang' => $data['pageLang'],
'dir' => $data['pageDir'],
) );
-   ?>
-   getPostContentHtml( $data );
-   echo $this->getSecondaryActionsHtml();
-   echo $this->getHistoryLinkBottomHtml( $data );
+   echo $data[ 'bodytext' ];
+   if ( isset( $data['subject-page'] ) ) {
+   echo $data['subject-page'];
+   }
+   echo $this->getPostContentHtml( $data );
+   echo $this->getSecondaryActionsHtml();
+   // History link on the bottom of the main page
+   if ( $this->isMainPage ) {
+   echo $this->getHistoryLinkHtml( $data );
+   }
?>

renderHistoryLinkBeforeContent ) {
-   echo $this->getHistoryLinkTopHtml( $data );
-   echo $this->makeInlineMobileHeadEmitScript( 
'history-link-loaded' );
-   }
echo $this->makeInlineMobileHeadEmitScript( 'header-loaded' );
$this->renderPreContent( $data );
$this->renderContent( $data );
-   if ( !$this->renderHistoryLinkBeforeContent ) {
-   echo $this->getHistoryLinkTopHtml( $data );
-   echo $this->makeInlineMobileHeadEmitScript( 
'history-link-loaded' );
+   // Last modified bar at the top of the article
+   if ( !$this->isMainPage ) {
+   echo $this->getHistoryLinkHtml( $data );
}
+   echo $this->makeInlineMobileHeadEmitScript( 
'history-link-loaded' );
}
 
/**
diff --git a/includes/skins/MinervaTemplateBeta.php 
b/includes/skins/MinervaTemplateBeta.php
index 1fbf4b0..8e12f81 100644
--- a/includes/skins/MinervaTemplateBeta.php
+++ b/includes/skins/MinervaTemplateBeta.php
@@ -8,8 +8,6 @@
  * beta mode via Special:MobileOptions
  */
 class MinervaTemplateBeta 

[MediaWiki-commits] [Gerrit] Generate a new token for each survey - change (mediawiki...QuickSurveys)

2015-08-31 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Generate a new token for each survey
..

Generate a new token for each survey

Be consistent about creating tokens.  Otherwise, a user would have
the same token for all existing surveys and different tokens for future
ones.  This ensures that all surveys are seperated rather than grouped.

Change-Id: Ie9fc11ef843e9573bc5ee84bae8a40cca65a128f
---
M resources/ext.quicksurveys.init/init.js
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/50/235050/1

diff --git a/resources/ext.quicksurveys.init/init.js 
b/resources/ext.quicksurveys.init/init.js
index d180eda..dcb5300 100644
--- a/resources/ext.quicksurveys.init/init.js
+++ b/resources/ext.quicksurveys.init/init.js
@@ -3,8 +3,7 @@
$panel = $( '' ),
availableSurveys = mw.config.get( 'wgEnabledQuickSurveys' ),
isMainPage = mw.config.get( 'wgIsMainPage' ),
-   isArticle = mw.config.get( 'wgIsArticle' ),
-   sessionId = mw.user.generateRandomSessionId();
+   isArticle = mw.config.get( 'wgIsArticle' );
 
mw.extQuickSurveys = mw.extQuickSurveys || {};
 
@@ -79,7 +78,8 @@
token = getSurveyToken( survey );
 
if ( !token ) {
-   token = sessionId;
+   // Generate a new token for each survey
+   token = mw.user.generateRandomSessionId();
mw.storage.set( storageId, token );
}
return mw.experiments.getBucket( {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9fc11ef843e9573bc5ee84bae8a40cca65a128f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuickSurveys
Gerrit-Branch: dev
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Align search placeholder element and input with article heading - change (mediawiki...MobileFrontend)

2015-08-31 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Align search placeholder element and input with article heading
..

Align search placeholder element and input with article heading

bug: T107331
Change-Id: If4fbe7796ccfcb1a8e0342d8f4601ea0b3aeda5f
---
M resources/mobile.overlays/Overlay.less
M resources/skins.minerva.base.styles/ui.less
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/resources/mobile.overlays/Overlay.less 
b/resources/mobile.overlays/Overlay.less
index c514afb..f9ecc6f 100644
--- a/resources/mobile.overlays/Overlay.less
+++ b/resources/mobile.overlays/Overlay.less
@@ -190,7 +190,7 @@
 
.overlay-title,
.overlay-search {
-   padding: .15em @headerTitlePaddingH 0;
+   padding: .15em @headerTitlePaddingH 0 0;
}
 
.overlay-action {
diff --git a/resources/skins.minerva.base.styles/ui.less 
b/resources/skins.minerva.base.styles/ui.less
index 068f756..86c9456 100644
--- a/resources/skins.minerva.base.styles/ui.less
+++ b/resources/skins.minerva.base.styles/ui.less
@@ -77,7 +77,7 @@
 
// Search
> form {
-   padding: .15em @headerTitlePaddingH 0;
+   padding: .15em @headerTitlePaddingH 0 0;
width: auto;
vertical-align: middle;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4fbe7796ccfcb1a8e0342d8f4601ea0b3aeda5f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Make edit link and watchstar accessible to ios voiceover - change (mediawiki...MobileFrontend)

2015-08-31 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Make edit link and watchstar accessible to ios voiceover
..

Make edit link and watchstar accessible to ios voiceover

* Give the edit link a element a title attribute
* Make watchstar element a button instead of span

Bug: T87670
Change-Id: Idd36b57e046c7a429aff827aaaf49dbd1f679c20
---
M resources/mobile.editor/init.js
M resources/mobile.watchstar/Watchstar.js
M resources/skins.minerva.base.styles/pageactions.less
3 files changed, 12 insertions(+), 3 deletions(-)


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

diff --git a/resources/mobile.editor/init.js b/resources/mobile.editor/init.js
index 3677be2..0034a29 100644
--- a/resources/mobile.editor/init.js
+++ b/resources/mobile.editor/init.js
@@ -44,7 +44,10 @@
 */
function addEditButton( section, container ) {
return $( '' )
-   .attr( 'href', '#/editor/' + section )
+   .attr( {
+   href: '#/editor/' + section,
+   title: $( container ).attr( 'title' )
+   } )
.text( mw.msg( 'mobile-frontend-editor-edit' ) )
.prependTo( container );
}
diff --git a/resources/mobile.watchstar/Watchstar.js 
b/resources/mobile.watchstar/Watchstar.js
index f56875b..789a3a6 100644
--- a/resources/mobile.watchstar/Watchstar.js
+++ b/resources/mobile.watchstar/Watchstar.js
@@ -61,7 +61,7 @@
},
tagName: 'div',
className: watchIcon.getClassName(),
-   template: mw.template.compile( '{{tooltip}}', 
'hogan' ),
+   template: mw.template.compile( '{{tooltip}}', 
'hogan' ),
/** @inheritdoc */
initialize: function ( options ) {
var self = this,
diff --git a/resources/skins.minerva.base.styles/pageactions.less 
b/resources/skins.minerva.base.styles/pageactions.less
index 92298d3..edb8c13 100644
--- a/resources/skins.minerva.base.styles/pageactions.less
+++ b/resources/skins.minerva.base.styles/pageactions.less
@@ -62,7 +62,8 @@
 
input,
a,
-   span {
+   span,
+   button {
// Needed for non-JavaScript users
position: absolute;
display: block;
@@ -72,6 +73,11 @@
margin: 0 0 8px;
}
 
+   button {
+   text-indent: inherit;
+   outline: none;
+   }
+
&:first-child {
margin-top: 3px;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd36b57e046c7a429aff827aaaf49dbd1f679c20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Robmoen 

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


[MediaWiki-commits] [Gerrit] Hygiene: Make survey selection easier to read - change (mediawiki...QuickSurveys)

2015-08-28 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Hygiene: Make survey selection easier to read
..

Hygiene: Make survey selection easier to read

Change-Id: I20e0b5f9e0ce9177e4c0c4aa89d5dc67ae7ee92d
---
M resources/ext.quicksurveys.init/init.js
1 file changed, 43 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/77/234677/1

diff --git a/resources/ext.quicksurveys.init/init.js 
b/resources/ext.quicksurveys.init/init.js
index d180eda..4bec70b 100644
--- a/resources/ext.quicksurveys.init/init.js
+++ b/resources/ext.quicksurveys.init/init.js
@@ -1,10 +1,11 @@
 ( function ( $ ) {
var survey, $bodyContent, $place, randomSurvey, surveyIndex,
$panel = $( 'div class=ext-qs-loader-bar 
mw-ajax-loader/div' ),
-   availableSurveys = mw.config.get( 'wgEnabledQuickSurveys' ),
+   enabledSurveys = mw.config.get( 'wgEnabledQuickSurveys' ),
isMainPage = mw.config.get( 'wgIsMainPage' ),
isArticle = mw.config.get( 'wgIsArticle' ),
-   sessionId = mw.user.generateRandomSessionId();
+   sessionId = mw.user.generateRandomSessionId(),
+   availableSurveys = [];
 
mw.extQuickSurveys = mw.extQuickSurveys || {};
 
@@ -13,57 +14,52 @@
return;
}
 
+   // Find which surveys are available to the user
+   $( enabledSurveys ).each( function ( i, enabledSurvey ) {
+   // Setting the quicksurvey param makes every enabled survey 
available
+   if ( mw.util.getParamValue( 'quicksurvey' ) ) {
+   availableSurveys.push( enabledSurvey );
+   return;
+   } else if (
+   getSurveyToken( enabledSurvey ) !== '~' 
+   getBucketForSurvey( enabledSurvey ) === 'A'
+   ) {
+   availableSurveys.push( enabledSurvey );
+   }
+   } );
+
if ( availableSurveys.length ) {
-   // Get a random survey that hasn't been dismissed and in 
correct bucket
-   while ( !survey  availableSurveys.length !== 0 ) {
-   surveyIndex = Math.floor( Math.random() * 
availableSurveys.length );
-   randomSurvey = availableSurveys[surveyIndex];
-   // Setting the param quicksurvey bypasses the bucketing
-   if ( mw.util.getParamValue( 'quicksurvey' ) ) {
-   survey = randomSurvey;
-   break;
-   }
-   if (
-   getSurveyToken( randomSurvey ) === '~' ||
-   getBucketForSurvey( randomSurvey ) !== 'A'
-   ) {
-   availableSurveys.splice( surveyIndex, 1 );
-   continue;
-   }
-   survey = randomSurvey;
+   // Get a random available survey
+   survey = availableSurveys[Math.floor( Math.random() * 
availableSurveys.length )];
+   $bodyContent = $( '.mw-content-ltr, .mw-content-rtl' );
+   $place = $bodyContent.find( ' h1,  h2,  h3,  h4,  h5,  
h6' ).eq( 0 );
+
+   if ( $place.length ) {
+   $panel.insertBefore( $place );
+   } else {
+   $panel.appendTo( $bodyContent );
}
+   // survey.module contains i18n messages
+   mw.loader.using( [ 'ext.quicksurveys.views', survey.module ] 
).done( function () {
+   var panel,
+   options = {
+   survey: survey,
+   templateData: {
+   question: mw.msg( 
survey.question ),
+   description: mw.msg( 
survey.description )
+   }
+   };
 
-   if ( survey ) {
-   $bodyContent = $( '.mw-content-ltr, .mw-content-rtl' );
-   $place = $bodyContent.find( ' h1,  h2,  h3,  h4,  
h5,  h6' ).eq( 0 );
-
-   if ( $place.length ) {
-   $panel.insertBefore( $place );
+   if ( survey.type === 'internal' ) {
+   panel = new 
mw.extQuickSurveys.views.QuickSurvey( options );
} else {
-   $panel.appendTo( $bodyContent );
+   panel = new 
mw.extQuickSurveys.views.ExternalSurvey( options );
}
-   // 

[MediaWiki-commits] [Gerrit] Setup survey bucketing - change (mediawiki...QuickSurveys)

2015-08-25 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Setup survey bucketing
..

Setup survey bucketing

Gets a bucket for each enabled survey.
Shows the first survey in bucket A that has not been
previously dismissed.

Based on upstreamed experiment work:
Icf7f6fedf0c2deb5d5548c9e24456cc7a7c6a743

Bug: T109518
Change-Id: Ib09477d30480116cdb6f3744cb6e77dc2b57817c
---
M extension.json
M resources/ext.quicksurveys.init/init.js
2 files changed, 85 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/63/233763/1

diff --git a/extension.json b/extension.json
index 8229c7f..8cdc8cd 100644
--- a/extension.json
+++ b/extension.json
@@ -56,7 +56,8 @@
position: top,
dependencies: [
mediawiki.user,
-   mediawiki.storage
+   mediawiki.storage,
+   mediawiki.experiments
],
targets: [
mobile,
@@ -108,7 +109,7 @@
@schema: Which schema to log to,
schema: QuickSurveysResponse,
@enabled: whether the survey is enabled,
-   enabled: false,
+   enabled: true,
@coverage: percentage of users that will see 
the survey,
coverage: 50,
@platform: for each platform (desktop, 
mobile), which version of it is targeted (stable, beta, alpha),
diff --git a/resources/ext.quicksurveys.init/init.js 
b/resources/ext.quicksurveys.init/init.js
index 66af138..7d9af09 100644
--- a/resources/ext.quicksurveys.init/init.js
+++ b/resources/ext.quicksurveys.init/init.js
@@ -1,52 +1,98 @@
 ( function ( $ ) {
-   var survey, token, storageId, $bodyContent, $place,
+   var survey, $bodyContent, $place,
$panel = $( 'div class=ext-qs-loader-bar 
mw-ajax-loader/div' ),
availableSurveys = mw.config.get( 'wgEnabledQuickSurveys' ),
-   // https://phabricator.wikimedia.org/T109010
-   inSample = false,
isMainPage = mw.config.get( 'wgIsMainPage' ),
-   isArticle = mw.config.get( 'wgIsArticle' );
+   isArticle = mw.config.get( 'wgIsArticle' ),
+   sessionId = mw.user.generateRandomSessionId();
 
mw.extQuickSurveys = mw.extQuickSurveys || {};
 
+   // Do nothing when not on an article
+   if ( isMainPage  !isArticle ) {
+   return;
+   }
+
if ( availableSurveys.length ) {
-   survey = availableSurveys[ Math.floor( Math.random() * 
availableSurveys.length ) ];
-   storageId = 'ext-quicksurvey-' + survey.name;
-   token = mw.storage.get( storageId );
+   // Get first survey in bucket A that has not been dismissed
+   $( availableSurveys ).each( function ( i, surveyConfig ) {
+   var bucket = getBucket( surveyConfig ),
+   token = getSurveyToken( surveyConfig );
 
-   // local storage is supported in this case as value is not 
false and when ~ it means it was dismissed
-   if ( token !== false  token !== '~'  !isMainPage  
isArticle ) {
-
-   if ( !token ) {
-   token = mw.user.generateRandomSessionId();
-   // given token !== false we can safely run this 
without exception:
-   mw.storage.set( storageId, token );
+   if ( bucket === 'A'  token !== '~' ) {
+   survey = surveyConfig;
+   return true;
}
+   } );
 
-   if ( inSample || mw.util.getParamValue( 'quicksurvey' ) 
) {
-   $bodyContent = $( '#bodyContent' );
-   $place = $bodyContent.find( 'h1, h2, h3, h4, 
h5, h6' ).eq( 0 );
+   if ( survey ) {
+   $bodyContent = $( '#bodyContent' );
+   $place = $bodyContent.find( 'h1, h2, h3, h4, h5, h6' 
).eq( 0 );
 
-   if ( $place.length ) {
-   $panel.insertBefore( $place );
-   } else {
-   $panel.appendTo( $bodyContent );
-   }
-   mw.loader.using( [ survey.module, 
'ext.quicksurveys.views' ] ).done( function () {
-   var panel;
-  

[MediaWiki-commits] [Gerrit] Null is not falsy in js so always set the value of wgIsMainPage - change (mediawiki/core)

2015-08-20 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Null is not falsy in js so always set the value of wgIsMainPage
..

Null is not falsy in js so always set the value of wgIsMainPage

Change-Id: I2e39f939386f6d9254ef7e11cf584d7ce53e00c1
---
M includes/OutputPage.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/232842/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 8d4720b..8860299 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3280,9 +3280,7 @@
$vars['wgRestriction' . ucfirst( $type )] = 
$title-getRestrictions( $type );
}
 
-   if ( $title-isMainPage() ) {
-   $vars['wgIsMainPage'] = true;
-   }
+   $vars['wgIsMainPage'] = $vars['wgIsMainPage'] ? true : false;
 
if ( $this-mRedirectedFrom ) {
$vars['wgRedirectedFrom'] = 
$this-mRedirectedFrom-getPrefixedDBkey();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e39f939386f6d9254ef7e11cf584d7ce53e00c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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


[MediaWiki-commits] [Gerrit] Pull in survey module and use messages for internal survey - change (mediawiki...QuickSurveys)

2015-08-20 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Pull in survey module and use messages for internal survey
..

Pull in survey module and use messages for internal survey

Change-Id: I68d62fd2d6cc4021f897aa2bdc75de49387cd75c
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M resources/ext.quicksurveys.init/init.js
4 files changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/62/232862/1

diff --git a/extension.json b/extension.json
index ad72991..8229c7f 100644
--- a/extension.json
+++ b/extension.json
@@ -98,7 +98,7 @@
@question: survey question message key,
question: 
ext-quicksurveys-example-internal-survey-question,
@description: The message key of the 
description of the survey. Displayed immediately below the survey question.,
-   description: ,
+   description: 
ext-quicksurveys-example-internal-survey-description,
@answers: possible answer message keys for 
positive, neutral, and negative,
answers: {
positive: 
ext-quicksurveys-example-internal-survey-answer-positive,
diff --git a/i18n/en.json b/i18n/en.json
index 8641787..cb37544 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,6 +9,7 @@
},
quicksurveys-desc: Displays configured surveys on Mobile and 
Desktop.,
ext-quicksurveys-example-internal-survey-question: Should the text 
be bigger?,
+   ext-quicksurveys-example-internal-survey-description: This is the 
description of the example internal survey,
ext-quicksurveys-example-internal-survey-answer-positive: Yes,
ext-quicksurveys-example-internal-survey-answer-neutral: Not sure,
ext-quicksurveys-example-internal-survey-answer-negative: No,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f73098f..614a52b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -10,11 +10,12 @@
},
quicksurveys-desc: 
{{desc|name=QuickSurveys|url=https://www.mediawiki.org/wiki/Extension:QuickSurveys}};,
ext-quicksurveys-example-internal-survey-question: The question for 
the example internal survey,
+   ext-quicksurveys-example-internal-survey-description: Description of 
the example internal survey,
ext-quicksurveys-example-internal-survey-answer-positive: The 
positive answer for the example internal survey\n{{Identical|Yes}},
ext-quicksurveys-example-internal-survey-answer-neutral: The neutral 
answer for the example internal survey\n{{Identical|Not sure}},
ext-quicksurveys-example-internal-survey-answer-negative: The 
negative answer for the example internal survey\n{{Identical|No}},
ext-quicksurveys-example-external-survey-link: Web link to the 
external survey,
-   ext-quicksurveys-example-external-survey-description: description of 
the example survey,
+   ext-quicksurveys-example-external-survey-description: Description of 
the example external survey,
ext-quicksurveys-example-external-survey-privacy-policy-link: Web 
link to the privacy policy,
ext-quicksurveys-example-external-survey-privacy-policy-text: text 
of the privacy policy link\n{{Identical|Privacy policy}},
ext-quicksurveys-survey-privacy-policy-default-text: Default 
disclaimer about submitting surveys.,
diff --git a/resources/ext.quicksurveys.init/init.js 
b/resources/ext.quicksurveys.init/init.js
index 2708aa8..66af138 100644
--- a/resources/ext.quicksurveys.init/init.js
+++ b/resources/ext.quicksurveys.init/init.js
@@ -32,13 +32,13 @@
} else {
$panel.appendTo( $bodyContent );
}
-   mw.loader.using( 'ext.quicksurveys.views' 
).done( function () {
+   mw.loader.using( [ survey.module, 
'ext.quicksurveys.views' ] ).done( function () {
var panel;
panel = new 
mw.extQuickSurveys.views.QuickSurvey( {
survey: survey,
templateData: {
-   question: 
survey.question,
-   description: 
survey.description
+   question: mw.msg( 
survey.question ),
+   description: mw.msg( 
survey.description )
}
} );

[MediaWiki-commits] [Gerrit] WIP: Don't change wgResourceLoaderModules inside hook - change (mediawiki...MobileFrontend)

2015-08-18 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: WIP: Don't change wgResourceLoaderModules inside hook
..

WIP: Don't change wgResourceLoaderModules inside hook

bug: T102708
Change-Id: Iba22cb403c84668c18d0d3a070ee2ad87722fe56
---
M includes/MobileFrontend.hooks.php
M resources/mobile.loggingSchemas/init.js
2 files changed, 19 insertions(+), 18 deletions(-)


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

diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 861c0bc..07cd42a 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -896,7 +896,7 @@
 * @return bool Always true
 */
public static function onResourceLoaderRegisterModules( ResourceLoader 
$resourceLoader ) {
-   self::registerMobileLoggingSchemasModule();
+   self::registerMobileLoggingSchemasModule( $resourceLoader );
$config = MobileContext::singleton()-getMFConfig();
 
// add VisualEditor related modules only, if VisualEditor seems 
to be installed - T85007
@@ -966,7 +966,6 @@
},
array_keys( $mobileEventLoggingSchemas )
);
-   self::registerMobileLoggingSchemasModule( 
$additionalDependencies, true );
 
return true;
}
@@ -975,21 +974,11 @@
 * Registers the mobile.loggingSchemas module with any additional
 * dependencies.
 *
-* @param array $additionalDependencies Additional dependencies that 
the module
-*  depends on. Defaults to empty array
-* @param boolean $overwrite Whether or not to re-register the module 
if it has
-*  already been registered. Defaults to false
+* @param ResourceLoader $resourceLoader The ResourceLoader object
 */
-   private static function registerMobileLoggingSchemasModule(
-   $additionalDependencies = array(),
-   $overwrite = false
-   ) {
+   private static function registerMobileLoggingSchemasModule( 
$resourceLoader ) {
// FIXME: Use Config object when setting of configuration 
values is possible.
-   global $wgResourceModules, $wgMFResourceFileModuleBoilerplate;
-
-   if ( isset( $wgResourceModules['mobile.loggingSchemas'] )  
!$overwrite ) {
-   return;
-   }
+   global $wgMFResourceFileModuleBoilerplate;
 
$scripts = array(
'resources/mobile.loggingSchemas/SchemaMobileWeb.js',
@@ -1000,14 +989,16 @@

'resources/mobile.loggingSchemas/SchemaMobileWebBrowse.js',
);
 
-   $wgResourceModules['mobile.loggingSchemas'] = 
$wgMFResourceFileModuleBoilerplate + array(
-   'dependencies' = array_merge( $additionalDependencies, 
array(
+   $loggingSchemasModule = $wgMFResourceFileModuleBoilerplate + 
array(
+   'dependencies' = array(
'mobile.startup',
'mobile.settings',
-   ) ),
+   ),
'scripts' = $scripts,
);
 
+   $resourceLoader-register( array( 'mobile.loggingSchemas' = 
$loggingSchemasModule ) );
+
$wgResourceModules['skins.minerva.scripts']
['scripts'][] = 
'resources/mobile.loggingSchemas/init.js';
}
diff --git a/resources/mobile.loggingSchemas/init.js 
b/resources/mobile.loggingSchemas/init.js
index 6aafc71..88a0cae 100644
--- a/resources/mobile.loggingSchemas/init.js
+++ b/resources/mobile.loggingSchemas/init.js
@@ -23,4 +23,14 @@
uiSchema.hijackLink( $profileLink, 'lastmodified-profile' );
uiSchema.hijackLink( '.nearby-button', 'nearby-button' );
} );
+   mw.loader.load( [
+   'schema.MobileWebBrowse',
+   'schema.MobileWebDiffClickTracking',
+   'schema.MobileWebEditing',
+   'schema.MobileWebMainMenuClickTracking',
+   'schema.MobileWebSearch',
+   'schema.MobileWebUIClickTracking',
+   'schema.MobileWebWatching',
+   'schema.MobileWebWatchlistClickTracking',
+   ] );
 } )( mw.mobileFrontend, jQuery );

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

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

___
MediaWiki-commits 

[MediaWiki-commits] [Gerrit] Register enabled surveys as RL modules via hook - change (mediawiki...QuickSurveys)

2015-08-17 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Register enabled surveys as RL modules via hook
..

Register enabled surveys as RL modules via hook

This creates a module per survey configured with survey messages
for server side translation.  This can also be responsible for
registering any additional dependencies based on survey configuration.

Additionally:
- Fixed the QuickSurveysConfig so the config can be read
- Creates language keys for link, privacy-policy-link, and
privacy-policy-text

bug: T107586
Change-Id: I8ab993130bf3fe60de461ecdcff66b494281c310
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/QuickSurveys.hooks.php
4 files changed, 75 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/10/232210/1

diff --git a/extension.json b/extension.json
index 7e1a91c..30e4411 100644
--- a/extension.json
+++ b/extension.json
@@ -26,10 +26,13 @@
Hooks: {
ResourceLoaderGetConfigVars: [
QuickSurveys\\Hooks::onResourceLoaderGetConfigVars
+   ],
+   ResourceLoaderRegisterModules: [
+   QuickSurveys\\Hooks::onResourceLoaderRegisterModules
]
},
config: {
-   @QuickSurveysConfig: [
+   QuickSurveysConfig: [
{
@name: survey name,
name: internal example survey,
@@ -48,7 +51,7 @@
@schema: Which schema to log to,
schema: QuickSurveysResponse,
@enabled: whether the survey is enabled,
-   enabled: false,
+   enabled: true,
@coverage: percentage of users that will see 
the survey,
coverage: 50,
@platform: for each platform (desktop, 
mobile), which version of it is targeted (stable, beta, alpha),
@@ -64,13 +67,13 @@
@description: description of the survey,
description: 
ext-quicksurveys-example-external-survey-description,
@link: external link to the survey,
-   link: //example.org/survey,
+   link: 
ext-quicksurveys-example-external-survey-link,
@privacy-policy-link: link to the privacy 
policy,
-   privacy-policy-link: 
//example.org/privacy-policy,
+   privacy-policy-link: 
ext-quicksurveys-example-external-survey-privacy-policy-link,
@privacy-policy-text: text of the privacy 
policy,
privacy-policy-text: 
ext-quicksurveys-example-external-survey-privacy-policy-text,
@enabled: whether the survey is enabled,
-   enabled: false,
+   enabled: true,
@coverage: percentage of users that will see 
the survey,
coverage: 50,
@platform: for each platform (desktop, 
mobile), which version of it is targeted (stable, beta, alpha),
diff --git a/i18n/en.json b/i18n/en.json
index f53bfb4..b99949a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -12,6 +12,8 @@
ext-quicksurveys-example-internal-survey-answer-positive: Yes,
ext-quicksurveys-example-internal-survey-answer-neutral: Not sure,
ext-quicksurveys-example-internal-survey-answer-negative: No,
+   ext-quicksurveys-example-external-survey-link: //example.org/survey,
ext-quicksurveys-example-external-survey-description: This is the 
description of the example external survey.,
+   ext-quicksurveys-example-external-survey-privacy-policy-link: 
//example.org/privacy-policy,
ext-quicksurveys-example-external-survey-privacy-policy-text: 
Privacy Policy
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 03c7a2a..bcf6063 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -13,6 +13,8 @@
ext-quicksurveys-example-internal-survey-answer-positive: The 
positive answer for the example internal survey\n{{Identical|Yes}},
ext-quicksurveys-example-internal-survey-answer-neutral: The neutral 
answer for the example internal survey\n{{Identical|Not sure}},
ext-quicksurveys-example-internal-survey-answer-negative: The 
negative answer for the example internal survey\n{{Identical|No}},
+   ext-quicksurveys-example-external-survey-link: Web link to the 
external survey,
ext-quicksurveys-example-external-survey-description: description of 
the example 

[MediaWiki-commits] [Gerrit] Queue mobile head inline scripts with Resource Loader - change (mediawiki...MobileFrontend)

2015-08-12 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Queue mobile head inline scripts with Resource Loader
..

Queue mobile head inline scripts with Resource Loader

Bug: T108204
Change-Id: Ic6ec48850800d9cf661337135e8f9cf063958dfe
---
M includes/skins/MinervaTemplate.php
1 file changed, 19 insertions(+), 20 deletions(-)


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

diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index fe42b9c..97dc1a4 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -318,27 +318,26 @@
protected function renderContentWrapper( $data ) {
if ( $this-renderHistoryLinkBeforeContent ) {
echo $this-getHistoryLinkTopHtml( $data );
-   ?
-   script
-   if ( window.mw  mw.mobileFrontend ) { 
mw.mobileFrontend.emit( 'history-link-loaded' ); }
-   /script
-   ?php
+   echo $this-makeInlineMobileHeadEmitScript( 
'history-link-loaded' );
}
-   ?
-   script
-   if ( window.mw  mw.mobileFrontend ) { 
mw.mobileFrontend.emit( 'header-loaded' ); }
-   /script
-   ?php
-   $this-renderPreContent( $data );
-   $this-renderContent( $data );
-   if ( !$this-renderHistoryLinkBeforeContent ) {
-   echo $this-getHistoryLinkTopHtml( $data );
-   ?
-   script
-   if ( window.mw  mw.mobileFrontend ) { 
mw.mobileFrontend.emit( 'history-link-loaded' ); }
-   /script
-   ?php
-   }
+   echo $this-makeInlineMobileHeadEmitScript( 'header-loaded' );
+   $this-renderPreContent( $data );
+   $this-renderContent( $data );
+   if ( !$this-renderHistoryLinkBeforeContent ) {
+   echo $this-getHistoryLinkTopHtml( $data );
+   echo $this-makeInlineMobileHeadEmitScript( 
'history-link-loaded' );
+   }
+   }
+
+   /**
+* Wrap a mobileFrontend emit script in RLQ.push()
+* @param string $event Event to emit
+*/
+   protected function makeInlineMobileHeadEmitScript( $event ) {
+   $script = mw.loader.using( 'mobile.head', function () {;
+   $script .= mw.mobileFrontend.emit( ' . $event . ' );;
+   $script .= } );;
+   return ResourceLoader::makeInlineScript( $script );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6ec48850800d9cf661337135e8f9cf063958dfe
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


[MediaWiki-commits] [Gerrit] Don't hardcode script tags. Use RL makeInlineScript method - change (mediawiki...MobileFrontend)

2015-08-10 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Don't hardcode script tags. Use RL makeInlineScript method
..

Don't hardcode script tags. Use RL makeInlineScript method

Change-Id: I6105d12a4eb279e9806de5304f2a48583f069b96
---
M includes/skins/MinervaTemplate.php
1 file changed, 8 insertions(+), 20 deletions(-)


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

diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index fe42b9c..c0c06e8 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -318,27 +318,15 @@
protected function renderContentWrapper( $data ) {
if ( $this-renderHistoryLinkBeforeContent ) {
echo $this-getHistoryLinkTopHtml( $data );
-   ?
-   script
-   if ( window.mw  mw.mobileFrontend ) { 
mw.mobileFrontend.emit( 'history-link-loaded' ); }
-   /script
-   ?php
+   ResourceLoader::makeInlineScript( 
mw.mobileFrontend.emit( 'history-link-loaded' ); );
}
-   ?
-   script
-   if ( window.mw  mw.mobileFrontend ) { 
mw.mobileFrontend.emit( 'header-loaded' ); }
-   /script
-   ?php
-   $this-renderPreContent( $data );
-   $this-renderContent( $data );
-   if ( !$this-renderHistoryLinkBeforeContent ) {
-   echo $this-getHistoryLinkTopHtml( $data );
-   ?
-   script
-   if ( window.mw  mw.mobileFrontend ) { 
mw.mobileFrontend.emit( 'history-link-loaded' ); }
-   /script
-   ?php
-   }
+   ResourceLoader::makeInlineScript( mw.mobileFrontend.emit( 
'header-loaded' ); );
+   $this-renderPreContent( $data );
+   $this-renderContent( $data );
+   if ( !$this-renderHistoryLinkBeforeContent ) {
+   echo $this-getHistoryLinkTopHtml( $data );
+   ResourceLoader::makeInlineScript( 
mw.mobileFrontend.emit( 'history-link-loaded' ); );
+   }
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6105d12a4eb279e9806de5304f2a48583f069b96
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


[MediaWiki-commits] [Gerrit] QuickSurveys extension boilerplate commit - change (mediawiki...QuickSurveys)

2015-08-07 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: QuickSurveys extension boilerplate commit
..

QuickSurveys extension boilerplate commit

Bug: T107581
Change-Id: I258e4cda2e3a4acd4f0a2162194c47c4b9fc5e1e
---
A QuickSurveys.php
A phpcs.xml
2 files changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/37/230237/1

diff --git a/QuickSurveys.php b/QuickSurveys.php
new file mode 100644
index 000..b88b819
--- /dev/null
+++ b/QuickSurveys.php
@@ -0,0 +1,13 @@
+?php
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'QuickSurveys' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['QuickSurveys'] = __DIR__ . '/i18n';
+   /* wfWarn(
+   'Deprecated PHP entry point used for QuickSurveys extension. 
Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   ); */
+   return;
+} else {
+   die( 'This version of the QuickSurveys extension requires MediaWiki 
1.25+' );
+}
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 000..cb19440
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,7 @@
+?xml version=1.0?
+ruleset
+   rule ref=vendor/mediawiki/mediawiki-codesniffer/MediaWiki/
+   file./file
+   arg name=extensions value=php/
+   exclude-patternvendor/exclude-pattern
+/ruleset

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I258e4cda2e3a4acd4f0a2162194c47c4b9fc5e1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuickSurveys
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


[MediaWiki-commits] [Gerrit] Example QuickSurvey config and expose enabled surveys to bro... - change (mediawiki...QuickSurveys)

2015-08-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Example QuickSurvey config and expose enabled surveys to browser
..

Example QuickSurvey config and expose enabled surveys to browser

To test, require QuickSurveys.php as it will load the config.
Enable the example survey by editing the config
run mw.config.get( 'wgEnabledQuickSurveys ') in console.

Bug: T107586
Change-Id: I2e65c4b008635cd0ee42ba8501cf64dea047b0ae
---
D QuickSurveys.hooks.php
M QuickSurveys.php
M extension.json
M i18n/en.json
A includes/Config.php
A includes/QuickSurveys.hooks.php
6 files changed, 96 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/89/229989/1

diff --git a/QuickSurveys.hooks.php b/QuickSurveys.hooks.php
deleted file mode 100644
index fb0d82e..000
--- a/QuickSurveys.hooks.php
+++ /dev/null
@@ -1,11 +0,0 @@
-?php
-/**
- * Hooks for QuickSurveys extension
- *
- * @file
- * @ingroup Extensions
- */
-
-class QuickSurveysHooks {
-
-}
diff --git a/QuickSurveys.php b/QuickSurveys.php
index b88b819..b7594e9 100644
--- a/QuickSurveys.php
+++ b/QuickSurveys.php
@@ -7,7 +7,16 @@
'Deprecated PHP entry point used for QuickSurveys extension. 
Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
); */
-   return;
 } else {
die( 'This version of the QuickSurveys extension requires MediaWiki 
1.25+' );
 }
+
+/**
+ * Begin configuration variables
+ * FIXME: Ideally survey configuration would live in extension.json and it
+ * must be loaded somewhere other than here before being deployed in 
production.
+ * However, since it is a requirement that disabled surveys be hidden from
+ * the browser, they cannot live in extension.json for now as it is viewable.
+ * See: https://phabricator.wikimedia.org/T107586
+ */
+require_once __DIR__ . /includes/Config.php;
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 3270830..32cdad9 100644
--- a/extension.json
+++ b/extension.json
@@ -16,8 +16,16 @@
i18n
]
},
-   AutoloadClasses: {
-   QuickSurveysHooks: QuickSurveys.hooks.php
+   ConfigRegistry: {
+   quicksurveys: GlobalVarConfig::newInstance
},
-   manifest_version: 1
+   AutoloadClasses: {
+   QuickSurveys\\Hooks: includes/QuickSurveys.hooks.php
+   },
+   manifest_version: 1,
+   Hooks: {
+   ResourceLoaderGetConfigVars: [
+   QuickSurveys\\Hooks::onResourceLoaderGetConfigVars
+   ]
+   }
 }
diff --git a/i18n/en.json b/i18n/en.json
index df2fe84..5cdd611 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -7,5 +7,9 @@
Rob Moen
]
},
-   quicksurveys-desc: Displays configured surveys on Mobile and 
Desktop.
+   quicksurveys-desc: Displays configured surveys on Mobile and 
Desktop.,
+   ext-quicksurveys-example-question: Which describes your thoughts 
about Wikipedia.,
+   ext-quicksurveys-example-answer-positive: Love it,
+   ext-quicksurveys-example-answer-neutral : It's ok,
+   ext-quicksurveys-example-answer-negative: Not for me
 }
diff --git a/includes/Config.php b/includes/Config.php
new file mode 100644
index 000..8c3b0bd
--- /dev/null
+++ b/includes/Config.php
@@ -0,0 +1,28 @@
+?php
+
+/* Example QuickSurveys config */
+$wgQuickSurveysConfig[] = array(
+   // Survey name
+   'name' = 'example',
+   // Internal or external link survey
+   'type' = 'internal',
+   // Survey question message key
+   'question' = 'ext-quicksurveys-example-question',
+   // Possible answer message keys for positive, neutral, and negative
+   'answers' = array(
+   'positive' = 'ext-quicksurveys-example-answer-positive',
+   'neutral' =  'ext-quicksurveys-example-answer-neutral',
+   'negative' = 'ext-quicksurveys-example-answer-negative',
+   ),
+   // Which schema to log to
+   'schema' = 'QuickSurveysResponses',
+   // Percentage of users that will see the survey
+   'coverage' = '50',
+   // Is the survey enabled
+   'enabled' = false,
+   // For each platform (desktop, mobile), which version of it is targeted 
(stable, beta, alpha)
+   'platform' = array(
+   'desktop' = array( 'stable' ),
+   'mobile' = array( 'stable', 'beta', 'alpha' ),
+   ),
+);
\ No newline at end of file
diff --git a/includes/QuickSurveys.hooks.php b/includes/QuickSurveys.hooks.php
new file mode 100644
index 000..3e71c50
--- /dev/null
+++ b/includes/QuickSurveys.hooks.php
@@ -0,0 +1,42 @@
+?php
+/**
+ * Hooks for QuickSurveys extension
+ *
+ * @file
+ * @ingroup Extensions
+ 

[MediaWiki-commits] [Gerrit] Init last modified when the module is loaded - change (mediawiki...MobileFrontend)

2015-08-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Init last modified when the module is loaded
..

Init last modified when the module is loaded

* Sets visibility to .last-modified-bar to hidden while
module is loading
* Remove inline scripts for emitting history-link-loaded
From MinervaTemplate.php
* Results in last modified being restyled without a flash
or a dom reflow.

Bug: T108204
Change-Id: I508ca6a94d5b2d7a134e39637ea2f87f3ddc5430
---
M includes/skins/MinervaTemplate.php
M resources/mobile.head/init.js
M resources/skins.minerva.base.styles/ui.less
3 files changed, 7 insertions(+), 13 deletions(-)


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

diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index e9139ff..04b22c9 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -318,11 +318,6 @@
protected function renderContentWrapper( $data ) {
if ( $this-renderHistoryLinkBeforeContent ) {
echo $this-getHistoryLinkTopHtml( $data );
-   ?
-   script
-   if ( window.mw  mw.mobileFrontend ) { 
mw.mobileFrontend.emit( 'history-link-loaded' ); }
-   /script
-   ?php
}
?
script
@@ -333,11 +328,6 @@
$this-renderContent( $data );
if ( !$this-renderHistoryLinkBeforeContent ) {
echo $this-getHistoryLinkTopHtml( $data );
-   ?
-   script
-   if ( window.mw  mw.mobileFrontend ) { 
mw.mobileFrontend.emit( 'history-link-loaded' ); }
-   /script
-   ?php
}
}
 
diff --git a/resources/mobile.head/init.js b/resources/mobile.head/init.js
index a4fb107..9c093d1 100644
--- a/resources/mobile.head/init.js
+++ b/resources/mobile.head/init.js
@@ -75,17 +75,16 @@
} else {
// FIXME: remove this when the cache clears.
// Make the cached DOM look similar to the new DOM on 
the Main_Page
-   // It's important that this runs when the DOM is ready, 
otherwise it won't work
-   // in stable where the 'history-link-loaded' event is 
fired before the DOM is ready.
$( function () {
$( '#mw-mf-last-modified' ).removeClass( 
'last-modified-bar' );
} );
}
+   // Set the .last-modified-bar element visibility to visible
+   $lastModifiedBar.addClass( 'modified-history-link' );
}
 
// bind events
M.define( 'mainMenu', mainMenu );
-   M.on( 'history-link-loaded', initHistoryLink );
M.on( 'header-loaded', function () {
// Now we have a main menu button register it.
mainMenu.registerClickEvents();
@@ -100,6 +99,7 @@
if ( !$( '#mw-mf-page-left' ).find( '.menu' ).length ) {
mainMenu.appendTo( '#mw-mf-page-left' );
}
+   initHistoryLink();
} );
 
 }( mw.mobileFrontend, jQuery ) );
diff --git a/resources/skins.minerva.base.styles/ui.less 
b/resources/skins.minerva.base.styles/ui.less
index a027d34..92f28e6 100644
--- a/resources/skins.minerva.base.styles/ui.less
+++ b/resources/skins.minerva.base.styles/ui.less
@@ -23,6 +23,7 @@
color: @colorGray6;
// Make sure last modified link has correct font size (it is outside of 
the content div)
font-size: .9em;
+   visibility: hidden;
a,
a:visited {
color: @colorGray6;
@@ -39,6 +40,9 @@
color: #fff;
}
}
+   .modified-history-link {
+   visibility: visible;
+   }
 }
 
 .header {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I508ca6a94d5b2d7a134e39637ea2f87f3ddc5430
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


[MediaWiki-commits] [Gerrit] QuickSurveys extension boilerplate commit - change (mediawiki...QuickSurveys)

2015-08-05 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: QuickSurveys extension boilerplate commit
..

QuickSurveys extension boilerplate commit

Bug: T107581
Change-Id: I0ba2cd138ac8c02deb4d85012a3f02460dcec659
---
A .jscsrc
A .jshintrc
A Gruntfile.js
A QuickSurveys.hooks.php
A QuickSurveys.php
A README
A README.md
A composer.json
A extension.json
A i18n/en.json
A i18n/qqq.json
A includes/.gitkeep
A package.json
A resources/.gitkeep
14 files changed, 153 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys 
refs/changes/12/229412/1

diff --git a/.jscsrc b/.jscsrc
new file mode 100644
index 000..9d22e3f
--- /dev/null
+++ b/.jscsrc
@@ -0,0 +1,3 @@
+{
+   preset: wikimedia
+}
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..d43c482
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,20 @@
+{
+   // Enforcing
+   bitwise: true,
+   eqeqeq: true,
+   es3: true,
+   latedef: true,
+   noarg: true,
+   nonew: true,
+   undef: true,
+   unused: true,
+   strict: false,
+
+   // Environment
+   browser: true,
+
+   globals: {
+   mw: false,
+   $: false
+   }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..f04a4b9
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,28 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-jscs' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   jshint: {
+   options: {
+   jshintrc: true
+   },
+   all: [
+   '*.js',
+   'modules/**/*.js'
+   ]
+   },
+   jscs: {
+   src: '%= jshint.all %'
+   },
+   banana: {
+   all: 'i18n/'
+   }
+   } );
+
+   grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'banana' ] );
+   grunt.registerTask( 'test', [ 'lint' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/QuickSurveys.hooks.php b/QuickSurveys.hooks.php
new file mode 100644
index 000..fb0d82e
--- /dev/null
+++ b/QuickSurveys.hooks.php
@@ -0,0 +1,11 @@
+?php
+/**
+ * Hooks for QuickSurveys extension
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+class QuickSurveysHooks {
+
+}
diff --git a/QuickSurveys.php b/QuickSurveys.php
new file mode 100644
index 000..94efcb2
--- /dev/null
+++ b/QuickSurveys.php
@@ -0,0 +1,18 @@
+?php
+/**
+ * QuickSurveys extension - Displays configured surveys on Mobile and Desktop.
+ *
+ * For more info see http://mediawiki.org/wiki/Extension:QuickSurveys
+ *
+ * @file
+ * @ingroup Extensions
+ * @author Bahodir Mansurov, Joaquin Hernandez, Jon Robson, Rob Moen 2015
+ */
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'QuickSurveys' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['QuickSurveys'] = __DIR__ . '/i18n';
+   return;
+} else {
+   die( 'This version of the QuickSurveys extension requires MediaWiki 
1.25+' );
+}
diff --git a/README b/README
new file mode 100644
index 000..d881dfc
--- /dev/null
+++ b/README
@@ -0,0 +1,2 @@
+This is a skunkworks project with the goal of iterating quickly.
+When we have something ready to put in front of users it will be 
productionised.
diff --git a/README.md b/README.md
new file mode 100644
index 000..84bd140
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# creepy-guacamole
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..754fb71
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,12 @@
+{
+   require-dev: {
+   jakub-onderka/php-parallel-lint: 0.8.*,
+   mediawiki/mediawiki-codesniffer: 0.2.0
+   },
+   scripts: {
+   test: [
+   parallel-lint . --exclude vendor,
+   phpcs . -p 
--standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki 
--ignore=vendor/*,node_modules/* --extensions=php
+   ]
+   }
+}
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..3270830
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,23 @@
+{
+   name: QuickSurveys,
+   version: 0.0.1,
+   author: [
+   Bahodir Mansurov,
+   Joaquin Hernandez,
+   Jon Robson,
+   Rob Moen
+   ],
+   url: https://www.mediawiki.org/wiki/Extension:QuickSurveys;,
+   descriptionmsg: quicksurveys-desc,
+   license-name: MIT,
+   type: other,
+   MessagesDirs: {
+   QuickSurveys: [
+  

[MediaWiki-commits] [Gerrit] Update dependency versions - change (mediawiki...BoilerPlate)

2015-08-05 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Update dependency versions
..

Update dependency versions

Change-Id: Id036fa8d403b3cac8a3da707e5b736e5ffa6b537
---
M BoilerPlate/composer.json
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BoilerPlate 
refs/changes/40/229440/1

diff --git a/BoilerPlate/composer.json b/BoilerPlate/composer.json
index 754fb71..12de215 100644
--- a/BoilerPlate/composer.json
+++ b/BoilerPlate/composer.json
@@ -1,7 +1,7 @@
 {
require-dev: {
-   jakub-onderka/php-parallel-lint: 0.8.*,
-   mediawiki/mediawiki-codesniffer: 0.2.0
+   jakub-onderka/php-parallel-lint: 0.9.*,
+   mediawiki/mediawiki-codesniffer: 0.3.0
},
scripts: {
test: [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id036fa8d403b3cac8a3da707e5b736e5ffa6b537
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BoilerPlate
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


[MediaWiki-commits] [Gerrit] Add QuickSurveys ext to jjb and zuul - change (integration/config)

2015-08-05 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Add QuickSurveys ext to jjb and zuul
..

Add QuickSurveys ext to jjb and zuul

Bug: T107582
Change-Id: I0159f6dba5e187bfc5fe2b680408f35aca6ca2fe
---
M jjb/mediawiki-extensions.yaml
M jjb/mediawiki.yaml
M zuul/ext_dependencies.py
M zuul/layout.yaml
4 files changed, 25 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/12/229612/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 87e5bd3..08edbd5 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -510,6 +510,8 @@
  - PictureGame
  - PollNY
  - PoolCounter
+ - QuickSurveys:
+dependencies: 'MobileFrontend,EventLogging'
  - QuizGame
  - QuizTabulate
  - Ratings:
@@ -663,6 +665,14 @@
 name: mwext
 ext-name: Thanks
 dependencies: 
'Echo,Flow,MobileFrontend,VisualEditor,AbuseFilter,SpamBlacklist,CheckUser,EventLogging,ConfirmEdit'
+ - '{name}-{ext-name}-qunit':
+name: mwext
+ext-name: QuickSurveys
+dependencies: 'MobileFrontend,EventLogging'
+ - '{name}-{ext-name}-qunit-mobile':
+name: mwext
+ext-name: QuickSurveys
+dependencies: 'MobileFrontend,EventLogging'
 
  - '{name}-{ext-name}-npm':
 ext-name: VisualEditor
diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml
index 8f095cc..261f3cf 100644
--- a/jjb/mediawiki.yaml
+++ b/jjb/mediawiki.yaml
@@ -351,6 +351,7 @@
   MobileApp
   MobileFrontend
   ParserFunctions
+  QuickSurveys
   SandboxLink
   SpamBlacklist
   Thanks
diff --git a/zuul/ext_dependencies.py b/zuul/ext_dependencies.py
index 386319c..6f0b752 100644
--- a/zuul/ext_dependencies.py
+++ b/zuul/ext_dependencies.py
@@ -26,6 +26,7 @@
 'NavigationTiming': ['EventLogging'],
 'PronunciationRecording': ['UploadWizard'],
 'ProofreadPage': ['LabeledSectionTransclusion'],
+'QuickSurveys': ['MobileFrontend', 'EventLogging'],
 'SyntaxHighlight_GeSHi': ['VisualEditor'],
 'Thanks': ['Echo', 'Flow', 'MobileFrontend'],
 'VectorBeta': ['EventLogging'],
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 4a57bb1..cfcbd9d 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -5499,6 +5499,19 @@
   - name: extension-jslint
   - name: extension-unittests-generic
 
+  - name: mediawiki/extensions/QuickSurveys
+template:
+  - name: extension-gate
+  - name: extension-qunit-and-mobile
+  - name: extension-unittests
+  - name: npm
+check:
+  - jsonlint
+  - jshint
+experimental:
+  - mwext-testextension-zend
+  - mwext-testextension-hhvm
+
   - name: mediawiki/extensions/QuickSearchLookup
 template:
   - name: jshint

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0159f6dba5e187bfc5fe2b680408f35aca6ca2fe
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
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


[MediaWiki-commits] [Gerrit] Modify cache conditions for replacing the last-modified-bar - change (mediawiki...MobileFrontend)

2015-07-28 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Modify cache conditions for replacing the last-modified-bar
..

Modify cache conditions for replacing the last-modified-bar

Under normal page view, the .last-modified-bar element should also
have the classes, .pre-content and .post-content

In certain cached page situations the child element
causing the padding to be applied inside the .last-modified-bar

Bug: T107104
Change-Id: Iba6e4160d23282ecd309ed64cfa8fbb1da012b6c
---
M resources/mobile.head/init.js
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/resources/mobile.head/init.js b/resources/mobile.head/init.js
index d0df854..a4fb107 100644
--- a/resources/mobile.head/init.js
+++ b/resources/mobile.head/init.js
@@ -57,7 +57,11 @@
] );
 
// FIXME: remove the if part when the cache clears.
-   if ( isPageCached || $lastModifiedLink.hasClass( 
'truncated-text' ) ) {
+   if (
+   isPageCached ||
+   $lastModifiedLink.hasClass( 'truncated-text' ) 
||
+   $lastModified.hasClass( 'pre-content' )
+   ) {
$lastModifiedBar.replaceWith(
$( 'div class=last-modified-bar' )
.html(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba6e4160d23282ecd309ed64cfa8fbb1da012b6c
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


[MediaWiki-commits] [Gerrit] WIP: Add testarticles role. - change (mediawiki/vagrant)

2015-07-21 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: WIP: Add testarticles role.
..

WIP: Add testarticles role.

* Barack_Obama dump includes templates

Problem: Including needed templates in article dump dramatically
 increases dump size.  While not including them would be a tedious process.
However this would elimintate duplicate imports and file size footprint.

Bug: T104561
Bug: T62116
Change-Id: I12375e00bff6e19fbc79231c6dcdf7589c685ee2
---
A puppet/modules/role/files/testarticles/Barack_Obama.xml
A puppet/modules/role/manifests/testarticles.pp
2 files changed, 24,260 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/30/226230/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12375e00bff6e19fbc79231c6dcdf7589c685ee2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
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


[MediaWiki-commits] [Gerrit] Add tests - change (mediawiki...Gather)

2015-07-02 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Add tests
..

Add tests

Change-Id: Icad09b2bc18575bf0678fec5dc0f1c7db12ed893
---
M tests/browser/features/edit_collection.feature
M tests/browser/features/step_definitions/edit_collection_steps.rb
M tests/browser/features/support/pages/gather_page.rb
3 files changed, 31 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/79/222479/1

diff --git a/tests/browser/features/edit_collection.feature 
b/tests/browser/features/edit_collection.feature
index cdf5738..e6377d5 100644
--- a/tests/browser/features/edit_collection.feature
+++ b/tests/browser/features/edit_collection.feature
@@ -13,13 +13,25 @@
   Scenario: Clicking edit button
 When I click the edit collection button
 Then I see the collection editor overlay
+@runme
+  Scenario: Changing name
+When I click the edit collection button
+And I see the collection editor overlay
+And I click to edit name and description
+And I enter Things I think are cool as the name
+And I click to save settings
+And I wait
+And I click done
+And the page has reloaded
+Then the name of my collection is Things I think are cool
+  And I see Things_I_think_are_cool in the page url
 
   Scenario: Changing description
 When I click the edit collection button
 And I see the collection editor overlay
 And I click to edit name and description
 And I enter All work and no play makes Jack a dull boy as the 
description
-And I click to save description
+And I click to save settings
 And I wait
 And I click done
 And the page has reloaded
@@ -30,7 +42,7 @@
 And I see the collection editor overlay
 And I click to edit name and description
 And I enter  as the description
-And I click to save description
+And I click to save settings
 And I wait
 And I click done
 And the page has reloaded
diff --git a/tests/browser/features/step_definitions/edit_collection_steps.rb 
b/tests/browser/features/step_definitions/edit_collection_steps.rb
index 27aae7e..f7f1c79 100644
--- a/tests/browser/features/step_definitions/edit_collection_steps.rb
+++ b/tests/browser/features/step_definitions/edit_collection_steps.rb
@@ -10,6 +10,11 @@
   expect(on(GatherPage).edit_overlay_element.when_present).to be_visible
 end
 
+Then(/^I enter (.*?) as the name$/) do |keys|
+  on(GatherPage).edit_overlay_title_element.when_present.clear
+  on(GatherPage).edit_overlay_title_element.when_present.send_keys(keys)
+end
+
 Then(/^I enter (.*?) as the description$/) do |keys|
   on(GatherPage).edit_overlay_description_element.when_present.clear
   on(GatherPage).edit_overlay_description_element.when_present.send_keys(keys)
@@ -19,7 +24,7 @@
   on(GatherPage).edit_overlay_done_element.when_present.click
 end
 
-Then(/^I click to save description$/) do
+Then(/^I click to save settings$/) do
   on(GatherPage).edit_overlay_save_desc_element.when_present.click
 end
 
@@ -27,6 +32,15 @@
   sleep 5
 end
 
+Then(/^I see (.*?) in the page url$/) do |text|
+  request.request_uri.should == send(#{text.gsub(' ','_')}_path)
+  response.should be_success
+end
+
+Then(/^the name of my collection is (.*?)$/) do |text|
+  expect(on(GatherPage).collection_title_element.when_present.text).to eq text
+end
+
 Then(/^the description of my collection is (.*?)$/) do |text|
   expect(on(GatherPage).collection_description_element.when_present.text).to 
eq text
 end
diff --git a/tests/browser/features/support/pages/gather_page.rb 
b/tests/browser/features/support/pages/gather_page.rb
index 4622ad8..de01127 100644
--- a/tests/browser/features/support/pages/gather_page.rb
+++ b/tests/browser/features/support/pages/gather_page.rb
@@ -5,12 +5,14 @@
   a(:my_first_public_collection, css: '.collection-card-title a', index:1)
   a(:edit, css: '.edit-collection')
   div(:edit_overlay, css: '.collection-editor-overlay')
+  text_field(:edit_overlay_title, css: '.collection-editor-overlay .title')
   textarea(:edit_overlay_description, css: '.collection-editor-overlay 
.description')
   button(:edit_overlay_save_desc,
 css: '.collection-editor-overlay .save-description')
   button(:edit_overlay_done,
 css: '.collection-editor-overlay .save')
   div(:collection_items, css: '.collection-cards')
+  h1(:collection_title, css: '.collection-header h1')
   div(:collection_description, css: '.collection-description')
   button(:edit_name_and_description, css: '.settings-action')
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icad09b2bc18575bf0678fec5dc0f1c7db12ed893
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] Close tutorial when clicking in to search input - change (mediawiki...Gather)

2015-06-30 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Close tutorial when clicking in to search input
..

Close tutorial when clicking in to search input

* Small improvement by showing tutorial with css

bug: T99109

Change-Id: I12f4a9ab6aa6f9014d26b58dfdab9c48daebd02e
---
M resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
M resources/ext.gather.collection.contentOverlay/content.hogan
M resources/ext.gather.collection.contentOverlay/contentOverlay.less
M resources/ext.gather.collection.editor/CollectionEditOverlay.js
4 files changed, 23 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/72/221972/1

diff --git 
a/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js 
b/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
index 7c55d0c..bce9f46 100644
--- 
a/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
+++ 
b/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
@@ -123,12 +123,10 @@
}
this.expandForm();
if ( this.options.showTutorial ) {
-   // Changes content area background color while 
in tutorial
+   // Shows tutorial and modifies background color
this.$( '.overlay-content' ).addClass( 
'interstitial' );
// Hide collection content
this.$( '.collectionContent' ).addClass( 
'hidden' );
-   // Show tutorial
-   this.$( '.tutorial' ).removeClass( 'hidden' );
}
},
/**
@@ -199,7 +197,6 @@
 * Event handler for clicking the tutorial next button
 */
onClickTutorialNext: function () {
-   this.$( '.tutorial' ).addClass( 'hidden' );
this.$( '.collectionContent' ).removeClass( 'hidden' );
this.$( '.overlay-content' ).removeClass( 
'interstitial' );
},
diff --git a/resources/ext.gather.collection.contentOverlay/content.hogan 
b/resources/ext.gather.collection.contentOverlay/content.hogan
index cf8fd48..c5c37f5 100644
--- a/resources/ext.gather.collection.contentOverlay/content.hogan
+++ b/resources/ext.gather.collection.contentOverlay/content.hogan
@@ -1,5 +1,5 @@
 {{{spinner}}}
-div class=tutorial hidden
+div class=tutorial
div class=heading{{tutorialHeading}}/div
div{{tutorialSubheading}}/div
div class=button-bar
diff --git a/resources/ext.gather.collection.contentOverlay/contentOverlay.less 
b/resources/ext.gather.collection.contentOverlay/contentOverlay.less
index b5a6cd0..8391d28 100644
--- a/resources/ext.gather.collection.contentOverlay/contentOverlay.less
+++ b/resources/ext.gather.collection.contentOverlay/contentOverlay.less
@@ -110,22 +110,30 @@
display: block;
}
}
+
+   .tutorial {
+   display: none;
+   }
+
// Toggle class to change background of content area
.interstitial {
background-color: @grayLightest;
overflow-y: hidden;
+
+   .tutorial {
+   display: block;
+
+   .heading {
+   font-size: 1.5em;
+   margin: 1em 0;
+   }
+   .button-bar {
+   text-align: center;
+   margin: 1em 0;
+   }
+   }
}
 
-   .tutorial {
-   .heading {
-   font-size: 1.5em;
-   margin: 1em 0;
-   }
-   .button-bar {
-   text-align: center;
-   margin: 1em 0;
-   }
-   }
 
h3 {
clear: both;
diff --git a/resources/ext.gather.collection.editor/CollectionEditOverlay.js 
b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
index 02659ee..a74bb1d 100644
--- a/resources/ext.gather.collection.editor/CollectionEditOverlay.js
+++ b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
@@ -210,6 +210,9 @@
.addClass( 'hidden' );
this.$( this._selectors.search ).removeClass( 

[MediaWiki-commits] [Gerrit] WIP: Make watchlist bold in first onboarding screen - change (mediawiki...Gather)

2015-06-30 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: WIP: Make watchlist bold in first onboarding screen
..

WIP: Make watchlist bold in first onboarding screen

* Using RL class MFResourceLoaderParsedMessageModule is still a bit
problematic as the message is parsing wikitext to escaped html.

bug: T99109

i

Change-Id: I4d60dac75c2945702368d74d38a93b0d33d25291
---
M extension.json
M i18n/en.json
2 files changed, 23 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/33/222033/1

diff --git a/extension.json b/extension.json
index cfb0efa..3974584 100644
--- a/extension.json
+++ b/extension.json
@@ -308,27 +308,28 @@
styles: [

resources/ext.gather.collection.contentOverlay/contentOverlay.less
],
-   messages: [
-   gather-collection-content-tutorial-heading,
-   gather-collection-content-tutorial-subheading,
-   gather-tutorial-dismiss-button-label,
-   gather-remove-from-collection-failed-toast,
-   gather-add-to-collection-failed-toast,
-   gather-new-collection-failed-toast,
-   gather-add-to-existing,
-   gather-watchlist-title,
-   gather-add-toast,
-   gather-add-failed-toast,
-   gather-add-title-invalid-toast,
-   gather-remove-toast,
-   gather-collection-member,
-   gather-create-new-button-label,
-   gather-add-to-new,
-   gather-collection-non-member,
-   gather-add-new-placeholder,
-   gather-add-to-another,
-   gather-view-collection
-   ],
+   class: MFResourceLoaderParsedMessageModule,
+   messages: {
+   gather-collection-content-tutorial-heading: 
gather-collection-content-tutorial-heading,
+   
gather-collection-content-tutorial-subheading: [parse],
+   gather-tutorial-dismiss-button-label: 
gather-tutorial-dismiss-button-label,
+   gather-remove-from-failed-collection-toast: 
gather-remove-from-failed-collection-toast,
+   gather-add-to-collection-failed-toast: 
gather-add-to-collection-failed-toast,
+   gather-new-collection-failed-toast: 
gather-new-collection-failed-toast,
+   gather-add-to-existing: 
gather-add-to-existing,
+   gather-watchlist-title: 
gather-watchlist-title,
+   gather-add-toast: gather-add-toast,
+   gather-add-failed-toast: 
gather-add-failed-toast,
+   gather-add-title-invalid-toast: 
gather-add-title-invalid-toast,
+   gather-remove-toast: gather-remove-toast,
+   gather-collection-member: 
gather-collection-member,
+   gather-create-new-button-label: 
gather-create-new-button-label,
+   gather-add-to-new: gather-add-to-new,
+   gather-collection-non-member: 
gather-collection-non-member,
+   gather-add-new-placeholder: 
gather-add-new-placeholder,
+   gather-add-to-another: 
gather-add-to-another,
+   gather-view-collection: 
gather-view-collection
+   },
templates: {
header.hogan: 
resources/ext.gather.collection.contentOverlay/header.hogan,
content.hogan: 
resources/ext.gather.collection.contentOverlay/content.hogan
diff --git a/i18n/en.json b/i18n/en.json
index 3b18cda..6a33d08 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -81,7 +81,7 @@
gather-add-failed-toast: There was a problem adding the item to your 
\$1\ collection.,
gather-add-title-invalid-toast: There was an issue with the title 
you entered. Please try something else,
gather-collection-content-tutorial-heading: Start a collection of 
your favorite interests that you can bookmark for later or share with others.,
-   gather-collection-content-tutorial-subheading: Or, add this to your 
watchlist to follow changes to the article.,
+   

[MediaWiki-commits] [Gerrit] Reload collection when exiting overlay after making changes. - change (mediawiki...Gather)

2015-06-29 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Reload collection when exiting overlay after making changes.
..

Reload collection when exiting overlay after making changes.

* Reload collection if collection settings were changed and overlay
** Was exited by clicking the back or cancel button.
* If collection name changes, reload with correct url.

Bug: T104025
Change-Id: I991dc45335e0c5b97b335af795628147799b76b5
---
M resources/ext.gather.collection.editor/CollectionEditOverlay.js
1 file changed, 28 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/72/221772/1

diff --git a/resources/ext.gather.collection.editor/CollectionEditOverlay.js 
b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
index 02659ee..d47efd0 100644
--- a/resources/ext.gather.collection.editor/CollectionEditOverlay.js
+++ b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
@@ -94,7 +94,8 @@
'input .search-header input': 'onRunSearch',
'click .search-header .back': 'onExitSearch',
'click .save-description': 'onSaveDescriptionClick',
-   'click .back': 'onBackClick',
+   'click .back': 'onSettingsBackClick',
+   'click .cancel': 'onCancelClick',
'click .save': 'onFirstPaneSaveClick',
'click .collection-privacy': 'onToggleCollectionPrivacy'
} ),
@@ -106,8 +107,13 @@
} ),
/** @inheritdoc */
initialize: function ( options ) {
+   // Initial properties;
+   this.id = null;
+   this.originalTitle = '';
+
if ( options  options.collection ) {
this.id = options.collection.id;
+   this.originalTitle = options.collection.title;
} else {
options.collection = {
// New collection is public by default
@@ -121,13 +127,11 @@
},
/** @inheritdoc */
postRender: function () {
-   var id = this.id;
Overlay.prototype.postRender.apply( this, arguments );
 
-   if ( id ) {
+   if ( this.id ) {
this._populateCollectionMembers();
} else {
-   this.id = null;
this._switchToSettingsPane();
}
},
@@ -296,9 +300,18 @@
deleteOverlay.show();
},
/**
+* Event handler when the cancel (back) button is clicked on 
the edit pane.
+*/
+   onCancelClick: function () {
+   Overlay.prototype.onExit.apply( this, arguments );
+   if ( this._stateChanged ) {
+   this._reloadCollection();
+   }
+   },
+   /**
 * Event handler when the back button is clicked on the 
title/edit description pane.
 */
-   onBackClick: function () {
+   onSettingsBackClick: function () {
if ( this.id ) {
// reset the values to their original values.
this.$( 'input.title' ).val( 
this.options.collection.title );
@@ -316,9 +329,18 @@
_reloadCollection: function () {
var self = this;
window.setTimeout( function () {
+   var collection;
router.navigate( '/' );
if ( self.options.reloadOnSave ) {
-   window.location.reload();
+   collection = self.options.collection;
+   // Reload collection with updated title 
in url
+   if ( self.originalTitle !== 
collection.title ) {
+   window.location.href = 
mw.util.getUrl(
+   [ 'Special:Gather', 
'id', collection.id, collection.title ].join( '/' )
+   );
+   } else {
+   window.location.reload();
+   }
}
}, 100 );
},

-- 
To view, 

[MediaWiki-commits] [Gerrit] Restore search icon in CollectionEditOverlay - change (mediawiki...Gather)

2015-06-25 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Restore search icon in CollectionEditOverlay
..

Restore search icon in CollectionEditOverlay

Change-Id: Ifaad645397f9a919e270760fd0726e915ba3187f
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/45/220845/1

diff --git a/extension.json b/extension.json
index 7c450fe..c48bb9e 100644
--- a/extension.json
+++ b/extension.json
@@ -484,6 +484,7 @@
dependencies: [
ext.gather.api,
skins.minerva.beta.images,
+   skins.minerva.alpha.images,
mobile.pagelist,
ext.gather.watchstar.icons,
mobile.search

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifaad645397f9a919e270760fd0726e915ba3187f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Delay tutorial so it is more noticeable to the user - change (mediawiki...Gather)

2015-06-25 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Delay tutorial so it is more noticeable to the user
..

Delay tutorial so it is more noticeable to the user

bug: T103213
Change-Id: I37e3a548884ebfb8934ba80544400ad387fbf839
---
M resources/ext.gather.init/init.js
1 file changed, 9 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/02/221002/1

diff --git a/resources/ext.gather.init/init.js 
b/resources/ext.gather.init/init.js
index 38cbb9e..2aca8a2 100644
--- a/resources/ext.gather.init/init.js
+++ b/resources/ext.gather.init/init.js
@@ -112,9 +112,14 @@
 
watchstar.insertBefore( $star );
$star.remove();
-   if ( shouldShow ) {
-   showPointer( watchstar );
-   }
+
+   // Delay tutorial so it's more noticeable to the user
+   setTimeout( function () {
+   if ( shouldShow ) {
+   showPointer( watchstar );
+   }
+   }, 1000 );
+
 
watchstar.on( 'completed', function ( firstTimeUser, 
isNewCollection ) {
if ( isNewCollection ) {
@@ -160,8 +165,8 @@
isAnon: user.isAnon(),
isWatched: $star.hasClass( 'watched' )
} );
-   skin.emit( 'changed' );
}
+   skin.emit( 'changed' );
} else {
revealCollectionsInMainMenu();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37e3a548884ebfb8934ba80544400ad387fbf839
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Changes to collection edit interface - change (mediawiki...Gather)

2015-06-23 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Changes to collection edit interface
..

Changes to collection edit interface

* Added cog icon for collection settings
* Added collection settings label
* Changed instances of edit to settings in the edit overlay
** As this was confusing considering we are already in the edit overlay
* Moved delete button to settings pane
* Styling tweaks to spans inside h1s so they are inline with ajacent icons

bug: T101202
Change-Id: I222e59ca9cb5371dd7bff490480be799b7d9195e
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M resources/ext.gather.collection.editor/CollectionEditOverlay.js
M resources/ext.gather.collection.editor/content.hogan
M resources/ext.gather.collection.editor/editOverlay.less
M resources/ext.gather.collection.editor/header.hogan
A resources/ext.gather.icons/settings.svg
8 files changed, 63 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/88/220288/1

diff --git a/extension.json b/extension.json
index ec17381..f68756c 100644
--- a/extension.json
+++ b/extension.json
@@ -136,7 +136,8 @@
collections-read-more: 
resources/ext.gather.icons/next.svg,
collection-owner: 
resources/ext.gather.icons/user.svg,
collection-flag: 
resources/ext.gather.icons/flag.svg,
-   collection-hide: 
resources/ext.gather.icons/suppress.svg
+   collection-hide: 
resources/ext.gather.icons/suppress.svg,
+   collection-settings: 
resources/ext.gather.icons/settings.svg
}
},
ext.gather.styles: {
@@ -446,6 +447,7 @@
mediawiki.ui.checkbox,
ext.gather.api,
ext.gather.styles,
+   ext.gather.icons,
ext.gather.collection.delete
],
messages: [
@@ -455,6 +457,7 @@
gather-edit-collection-label-public,
gather-edit-collection-save-label,
gather-edit-collection-title-label,
+   gather-edit-collection-settings-title-label,
gather-error-unknown-collection,
gather-overlay-continue,
gather-overlay-edit-button,
diff --git a/i18n/en.json b/i18n/en.json
index 9356920..e6cc37f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -49,6 +49,7 @@
gather-edit-collection-label-public: Public collection,
gather-edit-collection-save-label: Save,
gather-edit-collection-title-label: Editing collection,
+   gather-edit-collection-settings-title-label: Collection Settings,
gather-edit-collection-failed-error: There was an issue with your 
attempted change, please try something else.,
gather-edit-collection-clear-label: Clear,
gather-edit-collection-related-pages: Related pages,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 3791951..b9f4b23 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -51,6 +51,7 @@
gather-edit-collection-label-description: Label above input field 
for description of collection\n{{Identical|Description}},
gather-edit-collection-save-label: Label for save button in 
collection editor.\n{{Identical|Save}},
gather-edit-collection-title-label: Label for the title of the 
collection editor.,
+   gather-edit-collection-settings-title-label: Label for the header of 
the collection editor while editing collection settings.,
gather-edit-collection-failed-error: There was a problem saving the 
changes.,
gather-edit-collection-clear-label: Label for button that clears 
search.\n{{Identical|Clear}},
gather-edit-collection-related-pages: Label for header of a section 
with related pages suggested for a collection.,
diff --git a/resources/ext.gather.collection.editor/CollectionEditOverlay.js 
b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
index 312fec3..f01dd7b 100644
--- a/resources/ext.gather.collection.editor/CollectionEditOverlay.js
+++ b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
@@ -49,10 +49,10 @@
additionalClassNames: 'cancel',
label: mw.msg( 'mobile-frontend-overlay-close' )
} ).options,
-   editIcon: new Icon( {
+   settingsIcon: new Icon( {
tagName: 'a',
-   name: 'edit-enabled',
-   

[MediaWiki-commits] [Gerrit] Fix pointer position in page action overlay - change (mediawiki...Gather)

2015-06-22 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Fix pointer position in page action overlay
..

Fix pointer position in page action overlay

Emit change on skin when using gather or regular watchstar

bug: T103213
Change-Id: I4946a0b1aa6c45b0c70e08f0efaeac616cadd7f7
---
M resources/ext.gather.init/init.js
1 file changed, 13 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/13/220013/1

diff --git a/resources/ext.gather.init/init.js 
b/resources/ext.gather.init/init.js
index 38cbb9e..a66d75e 100644
--- a/resources/ext.gather.init/init.js
+++ b/resources/ext.gather.init/init.js
@@ -102,6 +102,8 @@
var shouldShow = shouldShowCollectionTutorial(),
$menuItem = revealCollectionsInMainMenu();
 
+
+
watchstar = new CollectionsWatchstar( {
page: page,
isAnon: user.isAnon(),
@@ -109,12 +111,17 @@
wasUserPrompted: shouldShow,
isNewlyAuthenticatedUser: mw.util.getParamValue( 
'article_action' ) === 'add_to_collection'
} );
-
watchstar.insertBefore( $star );
$star.remove();
-   if ( shouldShow ) {
-   showPointer( watchstar );
-   }
+
+   // FIXME: Ideally, we should be able to depend on the skin 
'change' event for positioning.
+   // However, something that is updating the dom is not emitting 
change on skin.
+   // For now this resolves 
https://phabricator.wikimedia.org/T103213
+   setTimeout( function () {
+   if ( shouldShow ) {
+   showPointer( watchstar );
+   }
+   }, 1 );
 
watchstar.on( 'completed', function ( firstTimeUser, 
isNewCollection ) {
if ( isNewCollection ) {
@@ -160,8 +167,9 @@
isAnon: user.isAnon(),
isWatched: $star.hasClass( 'watched' )
} );
-   skin.emit( 'changed' );
}
+   // Call this in either case
+   skin.emit( 'changed' );
} else {
revealCollectionsInMainMenu();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4946a0b1aa6c45b0c70e08f0efaeac616cadd7f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Make it possible to customize tutorial background color - change (mediawiki...MobileFrontend)

2015-06-19 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Make it possible to customize tutorial background color
..

Make it possible to customize tutorial background color

Change-Id: I02e34b22b951e19e93ff23feaee284a57a21f09a
---
M resources/mobile.contentOverlays/PageActionOverlay.js
M resources/mobile.contentOverlays/tutorials.less
2 files changed, 15 insertions(+), 8 deletions(-)


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

diff --git a/resources/mobile.contentOverlays/PageActionOverlay.js 
b/resources/mobile.contentOverlays/PageActionOverlay.js
index 214beaf..533aacf 100644
--- a/resources/mobile.contentOverlays/PageActionOverlay.js
+++ b/resources/mobile.contentOverlays/PageActionOverlay.js
@@ -72,20 +72,15 @@
 * @param {jQuery.Object} $pa An element that should be pointed 
at by the overlay
 */
addPointerArrow: function ( $pa ) {
-   var tb = 'solid 10px transparent',
-   paOffset = $pa.offset(),
+   var paOffset = $pa.offset(),
overlayOffset = this.$el.offset(),
center = $pa.width() / 2;
 
this._position( $pa );
-   this.$pointer = $( 'div' ).css( {
-   'border-bottom': 'solid 10px #2E76FF',
-   'border-right': tb,
-   'border-left': tb,
-   position: 'absolute',
-   top: -10,
+   this.$pointer = $( 'div class=tutorial-pointer' 
).css( {
// Add half of the element width and subtract 
10px for half of the arrow
// remove the left offset of the overlay as 
margin auto may be applied to it
+   top: -10,
left: paOffset.left + center - 10 - 
overlayOffset.left
} ).appendTo( this.$el );
this.options.skin.on( 'changed', $.proxy( this, 
'refreshPointerArrow', this.options.target ) );
diff --git a/resources/mobile.contentOverlays/tutorials.less 
b/resources/mobile.contentOverlays/tutorials.less
index 6017fc5..d2a5669 100644
--- a/resources/mobile.contentOverlays/tutorials.less
+++ b/resources/mobile.contentOverlays/tutorials.less
@@ -24,6 +24,13 @@
font-weight: bold;
}
 
+   // Generic pointer definition
+   .tutorial-pointer {
+   position: absolute;
+   border-right: solid 10px transparent;
+   border-left: solid 10px transparent;
+   }
+
.tutorial-overlay {
background: @colorTutorial;
box-shadow: none;
@@ -33,6 +40,11 @@
text-align: left;
}
 
+   // Pointer color nested so it may be changed in other tutorials
+   .tutorial-pointer {
+   border-bottom: solid 10px #2E76FF;
+   }
+
.button {
// use background to override gradient in other buttons
background: #fff;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02e34b22b951e19e93ff23feaee284a57a21f09a
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


[MediaWiki-commits] [Gerrit] WIP: Onboarding tutorial for first time gatherers - change (mediawiki...Gather)

2015-06-19 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: WIP: Onboarding tutorial for first time gatherers
..

WIP: Onboarding tutorial for first time gatherers

bug: T99109
Change-Id: If6687f83b94fc6999c44a2e40ca9a418aa8ceb82
---
M extension.json
M resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
M resources/ext.gather.collection.contentOverlay/content.hogan
M resources/ext.gather.collection.editor/CollectionEditOverlay.js
A resources/ext.gather.collection.editor/SearchTutorialOverlay.hogan
A resources/ext.gather.collection.editor/SearchTutorialOverlay.js
A resources/ext.gather.collection.editor/searchTutorialOverlay.less
M resources/ext.gather.init/init.js
M resources/ext.gather.routes/routes.js
M resources/ext.gather.watchstar/CollectionsWatchstar.js
10 files changed, 144 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/06/219506/1

diff --git a/extension.json b/extension.json
index c80570e..0c602cc 100644
--- a/extension.json
+++ b/extension.json
@@ -441,6 +441,7 @@
ext.gather.relatedpages,
ext.gather.logging,
mobile.overlays,
+   mobile.contentOverlays,
mobile.toast,
mediawiki.ui.checkbox,
ext.gather.api,
@@ -465,13 +466,17 @@
],
templates: {
header.hogan: 
resources/ext.gather.collection.editor/header.hogan,
-   content.hogan: 
resources/ext.gather.collection.editor/content.hogan
+   content.hogan: 
resources/ext.gather.collection.editor/content.hogan,
+   SearchTutorialOverlay.hogan: 
resources/ext.gather.collection.editor/SearchTutorialOverlay.hogan
},
scripts: [
+   
resources/ext.gather.collection.editor/SearchTutorialOverlay.js,

resources/ext.gather.collection.editor/CollectionEditOverlay.js
],
styles: [
-   
resources/ext.gather.collection.editor/editOverlay.less
+   
resources/ext.gather.collection.editor/editOverlay.less,
+   
resources/ext.gather.collection.editor/searchTutorialOverlay.less
+
]
},
ext.gather.page.search: {
diff --git 
a/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js 
b/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
index 0a15be1..7218464 100644
--- 
a/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
+++ 
b/resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
@@ -38,7 +38,8 @@
'input input': 'onInput',
'click .overlay-content li': 'onSelectCollection',
'touchend .create-collection': 'onCreateNewCollection',
-   'submit form': 'onCreateNewCollection'
+   'submit form': 'onCreateNewCollection',
+   'click .tutorial-next': 'onClickTutorialNext'
},
/** @inheritdoc */
hasFixedHeader: false,
@@ -62,6 +63,7 @@
subheading: mw.msg( 'gather-add-to-existing' ),
moreLinkLabel: mw.msg( 'gather-add-to-another' ),
createButtonLabel: mw.msg( 
'gather-create-new-button-label' ),
+   showTutorial: false,
collections: undefined
},
/** @inheritdoc */
@@ -106,6 +108,10 @@
this.$( 'form' ).append( this.createButton.$el 
);
}
this.expandForm();
+   if ( this.options.showTutorial ) {
+   this.$( '.collectionContent' ).addClass( 
'hidden' );
+   this.$(' .tutorial' ).removeClass( 'hidden' );
+   }
},
/**
 * Adjust the form so that it takes up the available screen.
@@ -170,6 +176,13 @@
 
$( ev.currentTarget ).remove();
this._loadCollections( user.getName(), 
this.options.page, this._continue );
+   },
+   /**
+* Event handler for clicking the tutorial next button
+*/
+   onClickTutorialNext: function () {
+   this.$( '.tutorial').addClass( 

[MediaWiki-commits] [Gerrit] Fix duplicate 'new' tag and menu item CTA - change (mediawiki...Gather)

2015-05-13 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Fix duplicate 'new' tag and menu item CTA
..

Fix duplicate 'new' tag and menu item CTA

* Do not append the tutorial or the menu tag if there already exists one.
* Only emit the comletion event once on CollectionEditOverlay (hide is always
called in those cases, no need to emit it explicitly).
* Only listen to 'collection-edit-completed' once for every collection creation
(was keeping the listening of previous created collections and triggering the
handler for the event multiple times).

Bug: T98947
Change-Id: Ie5f7f6d7149d1c42eeb6a769c8fb0de3864bc1cc
(cherry picked from commit 368b15f3e24e7b31dfd0670746560d39d2128802)
---
M resources/ext.gather.collection.editor/CollectionEditOverlay.js
M resources/ext.gather.init/init.js
M resources/ext.gather.watchstar/CollectionsContentOverlay.js
3 files changed, 17 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/45/210745/1

diff --git a/resources/ext.gather.collection.editor/CollectionEditOverlay.js 
b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
index 08e6936..836c61e 100644
--- a/resources/ext.gather.collection.editor/CollectionEditOverlay.js
+++ b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
@@ -240,13 +240,12 @@
} else {
toast.show( 
self.options.editSuccessMsg, 'toast' );
}
+   self.hide();
self._reloadCollection();
-   self._emitCompleted();
} );
} else if ( this._stateChanged ) {
this.hide();
this._reloadCollection();
-   this._emitCompleted();
} else {
// nothing to do.
this.hide();
diff --git a/resources/ext.gather.init/init.js 
b/resources/ext.gather.init/init.js
index e06b6bf..286fdf2 100644
--- a/resources/ext.gather.init/init.js
+++ b/resources/ext.gather.init/init.js
@@ -98,17 +98,24 @@
showPointer( watchstar );
}
watchstar.on( 'completed', function ( firstTimeUser, 
isNewCollection ) {
+   var $menuItem = $( '#mw-mf-page-left 
.collection-menu-item' );
if ( isNewCollection ) {
// FIXME: Rename pointer overlay?
-   new PageActionOverlay( {
-   target: $( '#mw-mf-main-menu-button' ),
-   summary: mw.msg( 'gather-menu-guider' ),
-   cancelMsg: mw.msg( 
'gather-add-to-collection-cancel' )
-   } ).show();
+   // Only append the overlay if it is not there 
yet
+   if ( $( '#mw-mf-page-center .tutorial-overlay' 
).length === 0 ) {
+   new PageActionOverlay( {
+   target: $( 
'#mw-mf-main-menu-button' ),
+   summary: mw.msg( 
'gather-menu-guider' ),
+   cancelMsg: mw.msg( 
'gather-add-to-collection-cancel' )
+   } ).show();
+   }
// FIXME: Hacky.. Should use MainMenu but Bug: 
T93257.
-   new Tag( {
-   label: 'new'
-   } ).appendTo( '#mw-mf-page-left 
.collection-menu-item' );
+   // Only append the tag if there is none.
+   if ( $menuItem.find( '.gather-tag' ).length === 
0 ) {
+   new Tag( {
+   label: 'new'
+   } ).appendTo( $menuItem );
+   }
}
} );
}
diff --git a/resources/ext.gather.watchstar/CollectionsContentOverlay.js 
b/resources/ext.gather.watchstar/CollectionsContentOverlay.js
index 6456989..6c23cca 100644
--- a/resources/ext.gather.watchstar/CollectionsContentOverlay.js
+++ b/resources/ext.gather.watchstar/CollectionsContentOverlay.js
@@ -361,7 +361,7 @@
return api.addCollection( title ).done( function ( 
collection ) {
api.addPageToCollection( collection.id, page 
).done( function () {

[MediaWiki-commits] [Gerrit] Update Gather with cherry picks - change (mediawiki/core)

2015-05-13 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Update Gather with cherry picks
..

Update Gather with cherry picks

Change-Id: If64689394c8b4a5e32fc543019da02ed52f6d644
---
M extensions/Gather
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/210826/1

diff --git a/extensions/Gather b/extensions/Gather
index d8fff3d..efee621 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit d8fff3d52a873d48ee86a1f68db3049b1216b208
+Subproject commit efee6215b6d25f9d49b010eefcb3f65b4027e787

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If64689394c8b4a5e32fc543019da02ed52f6d644
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf5
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update Gather with cherry-picks - change (mediawiki/core)

2015-05-07 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Update Gather with cherry-picks
..

Update Gather with cherry-picks

Change-Id: I47a69afdc69be8d252c28eba91857eca23d3e7d1
---
M extensions/Gather
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/209653/1

diff --git a/extensions/Gather b/extensions/Gather
index 5636dfc..acdd81d 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit 5636dfc0a2cf9723dd7fb8909646efad07bae12b
+Subproject commit acdd81d416d580a120c3f2c2a03930da822d3252

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47a69afdc69be8d252c28eba91857eca23d3e7d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Bump Flow on 1.26wmf5 for: - change (mediawiki/core)

2015-05-07 Thread Robmoen (Code Review)
Robmoen has submitted this change and it was merged.

Change subject: Bump Flow on 1.26wmf5 for:
..


Bump Flow on 1.26wmf5 for:

https://gerrit.wikimedia.org/r/209647
Fix more than just workflow_page_id === 0

Change-Id: I39e8bdf698d9cd1637359452e9ec89702cc2dc13
---
M extensions/Flow
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Robmoen: Verified; Looks good to me, approved



diff --git a/extensions/Flow b/extensions/Flow
index a079849..20308af 16
--- a/extensions/Flow
+++ b/extensions/Flow
-Subproject commit a0798498474749a3c81fe741f2e9ebf306e0297a
+Subproject commit 20308afbe8efe5e8c2a10e43f244a092202b82f5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I39e8bdf698d9cd1637359452e9ec89702cc2dc13
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf5
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update VisualEditor extension for I413c300a - change (mediawiki/core)

2015-05-07 Thread Robmoen (Code Review)
Robmoen has submitted this change and it was merged.

Change subject: Update VisualEditor extension for I413c300a
..


Update VisualEditor extension for I413c300a

New changes:
82ff8e7 mw.Target: Fix API breakage of watchlist preference check

Change-Id: Id0a3c601933a2a7e541a811e3e32bce11167faa9
---
M extensions/VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Robmoen: Verified; Looks good to me, approved



diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 08d904b..82ff8e7 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 08d904bcc55babb391244f899d0391cb8788cdda
+Subproject commit 82ff8e72498e988db159d0b0b8d094e81772a328

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0a3c601933a2a7e541a811e3e32bce11167faa9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Bump Flow on 1.26wmf4 for: - change (mediawiki/core)

2015-05-07 Thread Robmoen (Code Review)
Robmoen has submitted this change and it was merged.

Change subject: Bump Flow on 1.26wmf4 for:
..


Bump Flow on 1.26wmf4 for:

https://gerrit.wikimedia.org/r/209646
Fix more than just workflow_page_id === 0

Change-Id: Ic5a45e801c98181283f30d77476b8fbba2b04da3
---
M extensions/Flow
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Robmoen: Verified; Looks good to me, approved



diff --git a/extensions/Flow b/extensions/Flow
index f15796f..6f9e269 16
--- a/extensions/Flow
+++ b/extensions/Flow
-Subproject commit f15796f641bcedb53eb38169c6fb565c7f0a34b1
+Subproject commit 6f9e269fba135810582c2d7fd77b6038543f4214

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5a45e801c98181283f30d77476b8fbba2b04da3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update VisualEditor extension for I413c300a - change (mediawiki/core)

2015-05-07 Thread Robmoen (Code Review)
Robmoen has submitted this change and it was merged.

Change subject: Update VisualEditor extension for I413c300a
..


Update VisualEditor extension for I413c300a

New changes:
e859342 mw.Target: Fix API breakage of watchlist preference check

Change-Id: I965dd9ccc8035bc5773a45a48f716b92a8319656
---
M extensions/VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Robmoen: Verified; Looks good to me, approved



diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 880e8a9..e859342 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 880e8a9d11802f735600cc321f271d43c983ec53
+Subproject commit e859342f8b8ba6d8aaf6d2e1ae4b49759952f88c

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I965dd9ccc8035bc5773a45a48f716b92a8319656
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf5
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update Gather with cherry-picks - change (mediawiki/core)

2015-05-07 Thread Robmoen (Code Review)
Robmoen has submitted this change and it was merged.

Change subject: Update Gather with cherry-picks
..


Update Gather with cherry-picks

Change-Id: If0ec9f74a9d2bc1da98fb55a3b02579c3c96901e
---
M extensions/Gather
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Robmoen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extensions/Gather b/extensions/Gather
index 2dc5850..e5c3cff 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit 2dc5850bba21c3a5ccb9f10595b616dfccb3b37e
+Subproject commit e5c3cff1ae5e0bc8c183567f1be8e1de3c0c634f

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0ec9f74a9d2bc1da98fb55a3b02579c3c96901e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf5
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update Gather with cherry-picks - change (mediawiki/core)

2015-05-07 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Update Gather with cherry-picks
..

Update Gather with cherry-picks

Change-Id: If0ec9f74a9d2bc1da98fb55a3b02579c3c96901e
---
M extensions/Gather
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/49/209649/1

diff --git a/extensions/Gather b/extensions/Gather
index 2dc5850..e5c3cff 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit 2dc5850bba21c3a5ccb9f10595b616dfccb3b37e
+Subproject commit e5c3cff1ae5e0bc8c183567f1be8e1de3c0c634f

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0ec9f74a9d2bc1da98fb55a3b02579c3c96901e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf5
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Lower sampling rate - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Lower sampling rate
..

Lower sampling rate

I am an idiot. This is hexadecimal so there are 16 possibilities.
Sigh.

Bug: T98340
Change-Id: I8f85ab7d3380cd8e1991299df09578403adb91c7
(cherry picked from commit 8f76b354155be2587c53924b664ebd3405b03973)
---
M resources/mobile.betaoptin/init.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/resources/mobile.betaoptin/init.js 
b/resources/mobile.betaoptin/init.js
index 3b21696..2292c9c 100644
--- a/resources/mobile.betaoptin/init.js
+++ b/resources/mobile.betaoptin/init.js
@@ -23,9 +23,9 @@
} );
}
 
-   // a single character has 36 possibilities so this is 2/36 5.6% 
chance (a-z and 0-9)
+   // a single character has 16 possibilities so this is 1/16 
6.25% chance (a-f and 0-9)
// 3% chance of this happening
-   inSample = $.inArray( token.charAt( 0 ), [ '3', '2' ] ) !== -1;
+   inSample = $.inArray( token.charAt( 0 ), [ '3' ] ) !== -1;
if ( inStable  ( inSample || mw.util.getParamValue( 'debug' ) 
) ) {
new BetaOptinPanel()
.on( 'hide', function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f85ab7d3380cd8e1991299df09578403adb91c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update MobileFrontend for cherry-picks - change (mediawiki/core)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Update MobileFrontend for cherry-picks
..

Update MobileFrontend for cherry-picks

Change-Id: I9413b0c7e127d77471cfff429483f9e093150bfd
---
M extensions/MobileFrontend
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/00/209400/1

diff --git a/extensions/MobileFrontend b/extensions/MobileFrontend
index 57f38ae..44eaad2 16
--- a/extensions/MobileFrontend
+++ b/extensions/MobileFrontend
-Subproject commit 57f38ae59f1b9cee536bdf6b34b177e30059863e
+Subproject commit 44eaad2040399d7c7e481f3dd804452d5fd0c5f1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9413b0c7e127d77471cfff429483f9e093150bfd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Lower sampling rate - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Lower sampling rate
..

Lower sampling rate

I am an idiot. This is hexadecimal so there are 16 possibilities.
Sigh.

Bug: T98340
Cherry-picked from: I8f85ab7d3380cd8e1991299df09578403adb91c7

Change-Id: Idbd842b54a60caadb24534a8115f627c3228b1a6
---
M resources/mobile.betaoptin/init.js
1 file changed, 14 insertions(+), 3 deletions(-)


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

diff --git a/resources/mobile.betaoptin/init.js 
b/resources/mobile.betaoptin/init.js
index c9c23ad..2292c9c 100644
--- a/resources/mobile.betaoptin/init.js
+++ b/resources/mobile.betaoptin/init.js
@@ -11,10 +11,21 @@
token = mw.user.generateRandomSessionId();
settings.save( 'mobile-betaoptin-token', token );
}
-   // a single character has 36 possibilities so this is 2/36 5.6% 
chance (a-z and 0-9)
-   // 3% chance of this happening
+
inStable = !context.isBetaGroupMember();
-   inSample = $.inArray( token.charAt( 0 ), [ '3', '2' ] ) !== -1;
+   // Correct all those poor souls who already opted in to beta 
via panel
+   // and lost their images next time they view a page.
+   // FIXME: Remove this in 30 days.
+   if ( !inStable  mw.config.get( 'wgImagesDisabled' ) ) {
+   $.post( mw.util.getUrl( 'Special:MobileOptions' ), {
+   token: mw.user.tokens.get( 'editToken' ),
+   enableImages: true
+   } );
+   }
+
+   // a single character has 16 possibilities so this is 1/16 
6.25% chance (a-f and 0-9)
+   // 3% chance of this happening
+   inSample = $.inArray( token.charAt( 0 ), [ '3' ] ) !== -1;
if ( inStable  ( inSample || mw.util.getParamValue( 'debug' ) 
) ) {
new BetaOptinPanel()
.on( 'hide', function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idbd842b54a60caadb24534a8115f627c3228b1a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Lower sampling rate - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Lower sampling rate
..

Lower sampling rate

I am an idiot. This is hexadecimal so there are 16 possibilities.
Sigh.

Bug: T98340
Cherry-picked from: I8f85ab7d3380cd8e1991299df09578403adb91c7

Change-Id: Idbd842b54a60caadb24534a8115f627c3228b1a6
---
M resources/mobile.betaoptin/init.js
1 file changed, 14 insertions(+), 3 deletions(-)


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

diff --git a/resources/mobile.betaoptin/init.js 
b/resources/mobile.betaoptin/init.js
index c9c23ad..2292c9c 100644
--- a/resources/mobile.betaoptin/init.js
+++ b/resources/mobile.betaoptin/init.js
@@ -11,10 +11,21 @@
token = mw.user.generateRandomSessionId();
settings.save( 'mobile-betaoptin-token', token );
}
-   // a single character has 36 possibilities so this is 2/36 5.6% 
chance (a-z and 0-9)
-   // 3% chance of this happening
+
inStable = !context.isBetaGroupMember();
-   inSample = $.inArray( token.charAt( 0 ), [ '3', '2' ] ) !== -1;
+   // Correct all those poor souls who already opted in to beta 
via panel
+   // and lost their images next time they view a page.
+   // FIXME: Remove this in 30 days.
+   if ( !inStable  mw.config.get( 'wgImagesDisabled' ) ) {
+   $.post( mw.util.getUrl( 'Special:MobileOptions' ), {
+   token: mw.user.tokens.get( 'editToken' ),
+   enableImages: true
+   } );
+   }
+
+   // a single character has 16 possibilities so this is 1/16 
6.25% chance (a-f and 0-9)
+   // 3% chance of this happening
+   inSample = $.inArray( token.charAt( 0 ), [ '3' ] ) !== -1;
if ( inStable  ( inSample || mw.util.getParamValue( 'debug' ) 
) ) {
new BetaOptinPanel()
.on( 'hide', function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idbd842b54a60caadb24534a8115f627c3228b1a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Don't show toast on startup - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Don't show toast on startup
..

Don't show toast on startup

When animations get turned on the transition also gets enabled so we see the
toast fade out (animations use visibility: hidden)

This works around that by only applying the duration when the animation class
is present

Bug: T98282
Change-Id: I63c5c026b8f2cab5f5f9f4a2c71377fa84ac68dc
(cherry picked from commit f0ba48a0954b6ef85bd3083cb1cbcdc5ec9e11bb)
---
M resources/mobile.startup/Panel.js
M resources/mobile.toast/toast.less
2 files changed, 11 insertions(+), 7 deletions(-)


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

diff --git a/resources/mobile.startup/Panel.js 
b/resources/mobile.startup/Panel.js
index 0dd8e13..1fcebdc 100644
--- a/resources/mobile.startup/Panel.js
+++ b/resources/mobile.startup/Panel.js
@@ -37,7 +37,7 @@
// just before show(); this is important for 
animations to work
// (0ms doesn't work on Firefox, 10ms is enough)
setTimeout( function () {
-   self.$el.addClass( 'visible' );
+   self.$el.addClass( 'visible animated' );
self.emit( 'show' );
}, self.minHideDelay );
}
diff --git a/resources/mobile.toast/toast.less 
b/resources/mobile.toast/toast.less
index afcc229..56e1ca2 100644
--- a/resources/mobile.toast/toast.less
+++ b/resources/mobile.toast/toast.less
@@ -56,12 +56,16 @@
// especially on browsers that don't support position: fixed
bottom: 100px;
opacity: 0;
-   // delay visibility transition to make other transitions visible
-   // http://fvsch.com/code/transition-fade/test5.html
-   // need to assign to a temporary variable to preserve commas
-   // 
https://github.com/leafo/lessphp/issues/105#issuecomment-2872598
-   @transition: @duration, opacity @duration, visibility 0s 
@duration, bottom 0s @duration;
-   .transition-transform( @transition );
+
+   // Only apply the transition when an animation is needed (when 
drawer/toast hidden/shown)
+   .animated {
+   // delay visibility transition to make other 
transitions visible
+   // http://fvsch.com/code/transition-fade/test5.html
+   // need to assign to a temporary variable to preserve 
commas
+   // 
https://github.com/leafo/lessphp/issues/105#issuecomment-2872598
+   @transition: @duration, opacity @duration, visibility 
0s @duration, bottom 0s @duration;
+   .transition-transform( @transition );
+   }
 
.visible {
bottom: 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63c5c026b8f2cab5f5f9f4a2c71377fa84ac68dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Re-enable images for our users. - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Re-enable images for our users.
..

Re-enable images for our users.

Any user who opted into beta via our new panel would have also
lost images. This temporary fix turns them back on.

It also has the temporary knock on effect of disallowing images for our
beta users. We can turn this off later once we've measured the impact.

Bug: T98340
Change-Id: I4c9db46422f59836388134cfdccd1ad5afcf272b
(cherry picked from commit 42cb34e366dca1f3a68660d7c8e3c058fa87047e)
---
M resources/mobile.betaoptin/init.js
1 file changed, 12 insertions(+), 1 deletion(-)


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

diff --git a/resources/mobile.betaoptin/init.js 
b/resources/mobile.betaoptin/init.js
index c9c23ad..3b21696 100644
--- a/resources/mobile.betaoptin/init.js
+++ b/resources/mobile.betaoptin/init.js
@@ -11,9 +11,20 @@
token = mw.user.generateRandomSessionId();
settings.save( 'mobile-betaoptin-token', token );
}
+
+   inStable = !context.isBetaGroupMember();
+   // Correct all those poor souls who already opted in to beta 
via panel
+   // and lost their images next time they view a page.
+   // FIXME: Remove this in 30 days.
+   if ( !inStable  mw.config.get( 'wgImagesDisabled' ) ) {
+   $.post( mw.util.getUrl( 'Special:MobileOptions' ), {
+   token: mw.user.tokens.get( 'editToken' ),
+   enableImages: true
+   } );
+   }
+
// a single character has 36 possibilities so this is 2/36 5.6% 
chance (a-z and 0-9)
// 3% chance of this happening
-   inStable = !context.isBetaGroupMember();
inSample = $.inArray( token.charAt( 0 ), [ '3', '2' ] ) !== -1;
if ( inStable  ( inSample || mw.util.getParamValue( 'debug' ) 
) ) {
new BetaOptinPanel()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c9db46422f59836388134cfdccd1ad5afcf272b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Allow ios users to close the main menu - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Allow ios users to close the main menu
..

Allow ios users to close the main menu

Bug: T97621
Change-Id: I2b8d16e5ccf9df44ab779512c14d7ce32e0c4b9e
(cherry picked from commit a8626d210516ae4da30c6b417c66325ba293f9f7)
---
M resources/mobile.startup/Skin.js
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/resources/mobile.startup/Skin.js b/resources/mobile.startup/Skin.js
index 0ec4ca5..1849160 100644
--- a/resources/mobile.startup/Skin.js
+++ b/resources/mobile.startup/Skin.js
@@ -29,9 +29,7 @@
/**
 * @inheritdoc
 */
-   events: {
-   'click #mw-mf-page-center': '_onPageCenterClick'
-   },
+   events: {},
 
/**
 * Close navigation if content tapped
@@ -136,6 +134,9 @@
 * Fired when appearance of skin changes.
 */
this.emit( 'changed' );
+   // FIXME: Move back into events when T98200 resolved
+   this.$( '#mw-mf-page-center' ).on( 'click',
+   $.proxy( this, '_onPageCenterClick' ) );
},
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b8d16e5ccf9df44ab779512c14d7ce32e0c4b9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Allow ios users to close the main menu - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Allow ios users to close the main menu
..

Allow ios users to close the main menu

Bug: T97621
Change-Id: I2b8d16e5ccf9df44ab779512c14d7ce32e0c4b9e
(cherry picked from commit a8626d210516ae4da30c6b417c66325ba293f9f7)
---
M resources/mobile.startup/Skin.js
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/resources/mobile.startup/Skin.js b/resources/mobile.startup/Skin.js
index 0ec4ca5..1849160 100644
--- a/resources/mobile.startup/Skin.js
+++ b/resources/mobile.startup/Skin.js
@@ -29,9 +29,7 @@
/**
 * @inheritdoc
 */
-   events: {
-   'click #mw-mf-page-center': '_onPageCenterClick'
-   },
+   events: {},
 
/**
 * Close navigation if content tapped
@@ -136,6 +134,9 @@
 * Fired when appearance of skin changes.
 */
this.emit( 'changed' );
+   // FIXME: Move back into events when T98200 resolved
+   this.$( '#mw-mf-page-center' ).on( 'click',
+   $.proxy( this, '_onPageCenterClick' ) );
},
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b8d16e5ccf9df44ab779512c14d7ce32e0c4b9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Re-enable images for our users. - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Re-enable images for our users.
..

Re-enable images for our users.

Any user who opted into beta via our new panel would have also
lost images. This temporary fix turns them back on.

It also has the temporary knock on effect of disallowing images for our
beta users. We can turn this off later once we've measured the impact.

Bug: T98340
Change-Id: I4c9db46422f59836388134cfdccd1ad5afcf272b
(cherry picked from commit 42cb34e366dca1f3a68660d7c8e3c058fa87047e)
---
M resources/mobile.betaoptin/init.js
1 file changed, 12 insertions(+), 1 deletion(-)


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

diff --git a/resources/mobile.betaoptin/init.js 
b/resources/mobile.betaoptin/init.js
index c9c23ad..3b21696 100644
--- a/resources/mobile.betaoptin/init.js
+++ b/resources/mobile.betaoptin/init.js
@@ -11,9 +11,20 @@
token = mw.user.generateRandomSessionId();
settings.save( 'mobile-betaoptin-token', token );
}
+
+   inStable = !context.isBetaGroupMember();
+   // Correct all those poor souls who already opted in to beta 
via panel
+   // and lost their images next time they view a page.
+   // FIXME: Remove this in 30 days.
+   if ( !inStable  mw.config.get( 'wgImagesDisabled' ) ) {
+   $.post( mw.util.getUrl( 'Special:MobileOptions' ), {
+   token: mw.user.tokens.get( 'editToken' ),
+   enableImages: true
+   } );
+   }
+
// a single character has 36 possibilities so this is 2/36 5.6% 
chance (a-z and 0-9)
// 3% chance of this happening
-   inStable = !context.isBetaGroupMember();
inSample = $.inArray( token.charAt( 0 ), [ '3', '2' ] ) !== -1;
if ( inStable  ( inSample || mw.util.getParamValue( 'debug' ) 
) ) {
new BetaOptinPanel()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c9db46422f59836388134cfdccd1ad5afcf272b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Don't disable images whilst opting into beta - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Don't disable images whilst opting into beta
..

Don't disable images whilst opting into beta

Far too mean to be trolling like this.

Bug: T98187
Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
(cherry picked from commit 391d6f37e3efee931ed1317b39f1c31d6c9d4ed0)
---
M includes/specials/SpecialMobileOptions.php
1 file changed, 6 insertions(+), 4 deletions(-)


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

diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 183c03a..f382761 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -269,11 +269,13 @@
}
$context-setMobileMode( $group );
$imagesDisabled = !$request-getBool( 'enableImages' );
-   if ( $context-imagesDisabled() !== $imagesDisabled ) {
-   // Only record when the state has changed
-   $schemaData['images'] = $imagesDisabled ? off : on;
+   if ( $request-getVal( 'enableImages' ) !== null ) {
+   if ( $context-imagesDisabled() !== $imagesDisabled ) {
+   // Only record when the state has changed
+   $schemaData['images'] = $imagesDisabled ? off 
: on;
+   }
+   $context-setDisableImagesCookie( $imagesDisabled );
}
-   $context-setDisableImagesCookie( $imagesDisabled );
 
$returnToTitle = Title::newFromText( $request-getText( 
'returnto' ) );
if ( $returnToTitle ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Don't disable images whilst opting into beta - change (mediawiki...MobileFrontend)

2015-05-06 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Don't disable images whilst opting into beta
..

Don't disable images whilst opting into beta

Far too mean to be trolling like this.

Bug: T98187
Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
(cherry picked from commit 391d6f37e3efee931ed1317b39f1c31d6c9d4ed0)
---
M includes/specials/SpecialMobileOptions.php
1 file changed, 6 insertions(+), 4 deletions(-)


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

diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 183c03a..f382761 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -269,11 +269,13 @@
}
$context-setMobileMode( $group );
$imagesDisabled = !$request-getBool( 'enableImages' );
-   if ( $context-imagesDisabled() !== $imagesDisabled ) {
-   // Only record when the state has changed
-   $schemaData['images'] = $imagesDisabled ? off : on;
+   if ( $request-getVal( 'enableImages' ) !== null ) {
+   if ( $context-imagesDisabled() !== $imagesDisabled ) {
+   // Only record when the state has changed
+   $schemaData['images'] = $imagesDisabled ? off 
: on;
+   }
+   $context-setDisableImagesCookie( $imagesDisabled );
}
-   $context-setDisableImagesCookie( $imagesDisabled );
 
$returnToTitle = Title::newFromText( $request-getText( 
'returnto' ) );
if ( $returnToTitle ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update Gather and MobileFrontend to master - change (mediawiki/core)

2015-05-05 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Update Gather and MobileFrontend to master
..

Update Gather and MobileFrontend to master

Change-Id: I5580437bfcca06802c12d08f8fb6289013e97471
---
M extensions/Gather
M extensions/MobileFrontend
2 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/209134/1

diff --git a/extensions/Gather b/extensions/Gather
index caac3a7..5636dfc 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit caac3a773e41d980c86e05da189fc36ee3550c29
+Subproject commit 5636dfc0a2cf9723dd7fb8909646efad07bae12b
diff --git a/extensions/MobileFrontend b/extensions/MobileFrontend
index 34647ed..a49c788 16
--- a/extensions/MobileFrontend
+++ b/extensions/MobileFrontend
-Subproject commit 34647ed45a5375e669835710eba981a1fc6be91c
+Subproject commit a49c7884e924ff5d1fd547068f6ddcd237a41a84

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5580437bfcca06802c12d08f8fb6289013e97471
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update Gather and MobileFrontend to master - change (mediawiki/core)

2015-05-05 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Update Gather and MobileFrontend to master
..

Update Gather and MobileFrontend to master

Change-Id: Id4ad88c5a29f392e1a909db17920a35c2ac84621
---
M extensions/Gather
M extensions/MobileFrontend
2 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/209132/1

diff --git a/extensions/Gather b/extensions/Gather
index 086b602..5636dfc 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit 086b602d5c92474e6821fd83d47f0665ca6b4e9c
+Subproject commit 5636dfc0a2cf9723dd7fb8909646efad07bae12b
diff --git a/extensions/MobileFrontend b/extensions/MobileFrontend
index 7c104b5..a49c788 16
--- a/extensions/MobileFrontend
+++ b/extensions/MobileFrontend
-Subproject commit 7c104b5947ef172dd81b22895fd51eef4dc69ee4
+Subproject commit a49c7884e924ff5d1fd547068f6ddcd237a41a84

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4ad88c5a29f392e1a909db17920a35c2ac84621
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add overlay class to confirm overlay - change (mediawiki...Gather)

2015-04-29 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Add overlay class to confirm overlay
..

Add overlay class to confirm overlay

bug: T97609
Change-Id: I626d6090d044acbf9c42a115a4ec3f5d4bb8deac
---
M resources/ext.gather.collection.confirm/ConfirmationOverlay.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/84/207684/1

diff --git a/resources/ext.gather.collection.confirm/ConfirmationOverlay.js 
b/resources/ext.gather.collection.confirm/ConfirmationOverlay.js
index 4f7a9b9..f8c3cc2 100644
--- a/resources/ext.gather.collection.confirm/ConfirmationOverlay.js
+++ b/resources/ext.gather.collection.confirm/ConfirmationOverlay.js
@@ -12,7 +12,7 @@
 */
ConfirmationOverlay = CollectionsContentOverlayBase.extend( {
/** @inheritdoc */
-   className: 'collection-confirmation-overlay content-overlay 
position-fixed',
+   className: 'overlay collection-confirmation-overlay 
content-overlay position-fixed',
/** @inheritdoc */
defaults: $.extend( {}, 
CollectionsContentOverlayBase.prototype.defaults, {
fixedHeader: false,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I626d6090d044acbf9c42a115a4ec3f5d4bb8deac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Fix php fatal error on empty collection message - change (mediawiki...Gather)

2015-04-29 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Fix php fatal error on empty collection message
..

Fix php fatal error on empty collection message

PHP Fatal error:  Call to a member function getName()

Change-Id: I8cb92ae3fc62a32519f773d43150e9d425afce70
---
M includes/views/Collection.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/60/207660/1

diff --git a/includes/views/Collection.php b/includes/views/Collection.php
index cd56709..1a4931a 100644
--- a/includes/views/Collection.php
+++ b/includes/views/Collection.php
@@ -133,7 +133,7 @@
return Html::openElement( 'div', array( 'class' = 
'collection-empty' ) ) .
Html::element( 'h3', array(), wfMessage( 'gather-empty' 
)-text() ) .
Html::element( 'div', array(),
-   wfMessage( $key, $user-getName() )-text() ) .
+   wfMessage( $key, $this-user-getName() 
)-text() ) .
Html::closeElement( 'div' );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8cb92ae3fc62a32519f773d43150e9d425afce70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Fix php fatal error on empty collection message - change (mediawiki...Gather)

2015-04-29 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Fix php fatal error on empty collection message
..

Fix php fatal error on empty collection message

PHP Fatal error:  Call to a member function getName()

Change-Id: I8cb92ae3fc62a32519f773d43150e9d425afce70
---
M includes/views/Collection.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/66/207666/1

diff --git a/includes/views/Collection.php b/includes/views/Collection.php
index 0f4de6f..62669b8 100644
--- a/includes/views/Collection.php
+++ b/includes/views/Collection.php
@@ -130,7 +130,7 @@
return Html::openElement( 'div', array( 'class' = 
'collection-empty' ) ) .
Html::element( 'h3', array(), wfMessage( 'gather-empty' 
)-text() ) .
Html::element( 'div', array(),
-   wfMessage( $key, $user-getName() )-text() ) .
+   wfMessage( $key, $this-user-getName() 
)-text() ) .
Html::closeElement( 'div' );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8cb92ae3fc62a32519f773d43150e9d425afce70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] hygiene: make resource names consistent with their paths - change (mediawiki...Gather)

2015-04-28 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: hygiene: make resource names consistent with their paths
..

hygiene: make resource names consistent with their paths

Change-Id: I899d9f263bd5aa483982dd27f1a77f1a5e9233c0
---
M resources/ext.gather.collection.confirm/ConfirmationOverlay.js
M resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
M resources/ext.gather.collection.editor/CollectionEditOverlay.js
M resources/ext.gather.collection.flag/CollectionFlagOverlay.js
M resources/ext.gather.routes/routes.js
M tests/qunit/ext.gather.collection.editor/test_CollectionEditOverlay.js
6 files changed, 9 insertions(+), 9 deletions(-)


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

diff --git a/resources/ext.gather.collection.confirm/ConfirmationOverlay.js 
b/resources/ext.gather.collection.confirm/ConfirmationOverlay.js
index aa3ee26..4f7a9b9 100644
--- a/resources/ext.gather.collection.confirm/ConfirmationOverlay.js
+++ b/resources/ext.gather.collection.confirm/ConfirmationOverlay.js
@@ -49,6 +49,6 @@
}
} );
 
-   M.define( 'ext.gather.confirm/ConfirmationOverlay', ConfirmationOverlay 
);
+   M.define( 'ext.gather.collection.confirm/ConfirmationOverlay', 
ConfirmationOverlay );
 
 }( mw.mobileFrontend, jQuery ) );
diff --git a/resources/ext.gather.collection.delete/CollectionDeleteOverlay.js 
b/resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
index 28e8f2c..046ff1f 100644
--- a/resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
+++ b/resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
@@ -6,7 +6,7 @@
toast = M.require( 'toast' ),
futureToasts = M.require( 'ext.gather.alerts/futureToasts' ),
CollectionsApi = M.require( 
'ext.gather.watchstar/CollectionsApi' ),
-   ConfirmationOverlay = M.require( 
'ext.gather.confirm/ConfirmationOverlay' );
+   ConfirmationOverlay = M.require( 
'ext.gather.collection.confirm/ConfirmationOverlay' );
 
/**
 * Overlay for deleting a collection
@@ -65,6 +65,6 @@
}
} );
 
-   M.define( 'ext.gather.delete/CollectionDeleteOverlay', 
CollectionDeleteOverlay );
+   M.define( 'ext.gather.collection.delete/CollectionDeleteOverlay', 
CollectionDeleteOverlay );
 
 }( mw.mobileFrontend, jQuery ) );
diff --git a/resources/ext.gather.collection.editor/CollectionEditOverlay.js 
b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
index aab72f0..b941476 100644
--- a/resources/ext.gather.collection.editor/CollectionEditOverlay.js
+++ b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
@@ -9,7 +9,7 @@
SchemaGather = M.require( 'ext.gather.logging/SchemaGather' ),
schema = new SchemaGather(),
router = M.require( 'router' ),
-   CollectionDeleteOverlay = M.require( 
'ext.gather.delete/CollectionDeleteOverlay' );
+   CollectionDeleteOverlay = M.require( 
'ext.gather.collection.delete/CollectionDeleteOverlay' );
 
/**
 * Overlay for editing a collection
@@ -291,6 +291,6 @@
}
} );
 
-   M.define( 'ext.gather.edit/CollectionEditOverlay', 
CollectionEditOverlay );
+   M.define( 'ext.gather.collection.edit/CollectionEditOverlay', 
CollectionEditOverlay );
 
 }( mw.mobileFrontend, jQuery ) );
diff --git a/resources/ext.gather.collection.flag/CollectionFlagOverlay.js 
b/resources/ext.gather.collection.flag/CollectionFlagOverlay.js
index 0795e58..76766ae 100644
--- a/resources/ext.gather.collection.flag/CollectionFlagOverlay.js
+++ b/resources/ext.gather.collection.flag/CollectionFlagOverlay.js
@@ -1,7 +1,7 @@
 ( function ( M, $ ) {
 
var CollectionFlagOverlay,
-   ConfirmationOverlay = M.require( 
'ext.gather.confirm/ConfirmationOverlay' ),
+   ConfirmationOverlay = M.require( 
'ext.gather.collection.confirm/ConfirmationOverlay' ),
SchemaGatherFlags = M.require( 
'ext.gather.logging/SchemaGatherFlags' ),
schema = new SchemaGatherFlags(),
toast = M.require( 'toast' );
diff --git a/resources/ext.gather.routes/routes.js 
b/resources/ext.gather.routes/routes.js
index 24e1d9b..d31f6a3 100644
--- a/resources/ext.gather.routes/routes.js
+++ b/resources/ext.gather.routes/routes.js
@@ -12,7 +12,7 @@
if ( collection ) {
if ( action === 'edit' ) {
mw.loader.using( 
'ext.gather.collection.editor' ).done( function () {
-   var CollectionEditOverlay = 
M.require( 'ext.gather.edit/CollectionEditOverlay' );
+   var CollectionEditOverlay = 

[MediaWiki-commits] [Gerrit] Update Gather - change (mediawiki/core)

2015-04-28 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Update Gather
..

Update Gather

Change-Id: I27e16b959edc95638a9a1e8f7612392102f7cd3e
---
M extensions/Gather
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/77/207277/1

diff --git a/extensions/Gather b/extensions/Gather
index ee88ecf..30739ba 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit ee88ecf12721299b26fc63c3c8a6ce30b7e708d4
+Subproject commit 30739ba52b8bb44720514ec06d90d50753654b75

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27e16b959edc95638a9a1e8f7612392102f7cd3e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Refactor collection flag button to be an actual view - change (mediawiki...Gather)

2015-04-27 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Refactor collection flag button to be an actual view
..

Refactor collection flag button to be an actual view

Change-Id: I592cd0df9dfcf9bc2c5db4b62e461cbb6ddfe3e0
Dependency: Ib709ada5bd991b74e1c93eb3baa835653dc72dd6
---
M resources/Resources.php
A resources/ext.gather.collection.flag/CollectionFlagButton.js
M resources/ext.gather.special/init.js
M resources/ext.gather.styles/collections.less
4 files changed, 68 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/73/206973/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 92dcb0a..8b9cade 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -322,6 +322,7 @@
),
'scripts' = array(
'ext.gather.collection.flag/CollectionFlagOverlay.js',
+   'ext.gather.collection.flag/CollectionFlagButton.js',
),
),
 
diff --git a/resources/ext.gather.collection.flag/CollectionFlagButton.js 
b/resources/ext.gather.collection.flag/CollectionFlagButton.js
new file mode 100644
index 000..9e25f21
--- /dev/null
+++ b/resources/ext.gather.collection.flag/CollectionFlagButton.js
@@ -0,0 +1,60 @@
+( function ( M ) {
+
+   var CollectionsApi = M.require( 'ext.gather.watchstar/CollectionsApi' ),
+   CollectionFlagOverlay = M.require( 
'ext.gather.flag/CollectionFlagOverlay' ),
+   Button = M.require( 'Button' ),
+   Icon = M.require( 'Icon' ),
+   api = new CollectionsApi(),
+   CollectionFlagButton;
+
+   /**
+* A wrapper for creating a button.
+* @class Button
+* @extends View
+*/
+   CollectionFlagButton = Button.extend( {
+   /** @inheritdoc */
+   defaults: {
+   tagName: 'div',
+   additionalClassNames: new Icon( {
+   name: 'collection-flag',
+   additionalClassNames: 'mw-ui-quiet'
+   } ).getClassName(),
+   title: mw.msg( 'gather-flag-collection-flag-label' )
+   },
+   events: {
+   'click': 'onCollectionFlagButtonClick'
+   },
+   /** @inheritdoc */
+   postRender: function () {
+   Button.prototype.postRender.apply( this, arguments );
+   this.$el.attr( 'title', this.options.title );
+   },
+   onCollectionFlagButtonClick: function ( ev ) {
+   var flagOverlay,
+   $flag = this.$el;
+   ev.stopPropagation();
+   ev.preventDefault();
+
+   if ( !$flag.hasClass( 'disabled' ) ) {
+   // Prevent multiple clicks
+   $flag.addClass( 'disabled' );
+   api.getCollection( this.options.collectionId 
).done( function ( collection ) {
+   flagOverlay = new 
CollectionFlagOverlay( {
+   collection: collection
+   } );
+   flagOverlay.show();
+   flagOverlay.on( 'collection-flagged', 
function () {
+   // After flagging, remove flag 
icon.
+   $flag.detach();
+   } );
+   flagOverlay.on( 'hide', function () {
+   $flag.removeClass( 'disabled' );
+   } );
+   } );
+   }
+   }
+   } );
+   M.define( 'ext.gather.flag/CollectionFlagButton', CollectionFlagButton 
);
+
+}( mw.mobileFrontend ) );
diff --git a/resources/ext.gather.special/init.js 
b/resources/ext.gather.special/init.js
index 2e2de29..1401b4c 100644
--- a/resources/ext.gather.special/init.js
+++ b/resources/ext.gather.special/init.js
@@ -1,45 +1,13 @@
 ( function ( M, $ ) {
 
-   var CollectionsApi = M.require( 'ext.gather.watchstar/CollectionsApi' ),
-   CollectionFlagOverlay = M.require( 
'ext.gather.flag/CollectionFlagOverlay' ),
-   Icon = M.require( 'Icon' ),
-   api = new CollectionsApi();
+   var CollectionFlagButton = M.require( 
'ext.gather.flag/CollectionFlagButton' );
 
$( function () {
-   var flagIcon, $flag,
-   $collection = $( '.collection' );
+   var $collection = $( 

[MediaWiki-commits] [Gerrit] WIP: Create collection button on Special:Gather - change (mediawiki...Gather)

2015-04-27 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: WIP: Create collection button on Special:Gather
..

WIP: Create collection button on Special:Gather

Allows creation of a collection from a users list of collections.
* Add is-owner data property to collection list
* Created CreateCollectionButton class
* Make collection api allow edits to a collection with a null id.
* Make tweaks to CollectionEditOverlay to allow initial null collection id

TODO:
Minor styling, button icon and some i18n

Bug: T95214
Change-Id: I9f845238d43b3696fd1b3b1ceacef51d9f34ec75
---
M includes/models/CollectionsList.php
M includes/specials/SpecialGather.php
M includes/views/CollectionsList.php
M resources/Resources.php
M resources/ext.gather.api/CollectionsApi.js
M resources/ext.gather.collection.editor/CollectionEditOverlay.js
M resources/ext.gather.collection.editor/content.hogan
A resources/ext.gather.special/CreateCollectionButton.js
M resources/ext.gather.special/init.js
9 files changed, 122 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/02/207002/1

diff --git a/includes/models/CollectionsList.php 
b/includes/models/CollectionsList.php
index 9f09027..c5eeb3d 100644
--- a/includes/models/CollectionsList.php
+++ b/includes/models/CollectionsList.php
@@ -93,6 +93,15 @@
}
 
/**
+* Returns if the user is the owner of the list of collections
+* @param User $user user to check if it is the owner
+* @return boolean
+*/
+   public function isOwner( User $user ) {
+   return $this-user-equals( $user );
+   }
+
+   /**
 * Return local url for list of collections
 * Example: /wiki/Special:Gather/by/user
 *
diff --git a/includes/specials/SpecialGather.php 
b/includes/specials/SpecialGather.php
index 0246c9a..960c16a 100644
--- a/includes/specials/SpecialGather.php
+++ b/includes/specials/SpecialGather.php
@@ -191,7 +191,7 @@
wfMessage( 'gather-meta-description', 
$user-getName() ),
models\Image::getThumbnail( 
$collectionsList-getFile() )
);
-   $this-render( new views\CollectionsList( 
$collectionsList ) );
+   $this-render( new views\CollectionsList( 
$this-getUser(), $collectionsList ) );
} else {
$this-renderError( new views\NoPublic() );
}
diff --git a/includes/views/CollectionsList.php 
b/includes/views/CollectionsList.php
index 12db333..2721729 100644
--- a/includes/views/CollectionsList.php
+++ b/includes/views/CollectionsList.php
@@ -13,9 +13,11 @@
  */
 class CollectionsList extends View {
/**
+* @param User $user that is viewing the collection
 * @param models\CollectionsList $collectionsList
 */
-   public function __construct( $collectionsList ) {
+   public function __construct( $user, $collectionsList ) {
+   $this-user = $user;
$this-collectionsList = $collectionsList;
}
 
@@ -56,7 +58,10 @@
public function getHtml( $data = array() ) {
$html = Html::openElement(
'div',
-   array( 'class' = 'collections-list content 
view-border-box' )
+   array(
+   'class' = 'collections-list content 
view-border-box',
+   'data-is-owner' = 
$this-collectionsList-isOwner( $this-user ) ? true : false,
+   )
);
// Get items
$html .= $this-getListItemsHtml( $this-collectionsList );
diff --git a/resources/Resources.php b/resources/Resources.php
index 8b9cade..12fd082 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -345,6 +345,7 @@
'ext.gather.moderation',
),
'scripts' = array(
+   'ext.gather.special/CreateCollectionButton.js',
'ext.gather.special/init.js',
),
'messages' = array(
diff --git a/resources/ext.gather.api/CollectionsApi.js 
b/resources/ext.gather.api/CollectionsApi.js
index 8ff4146..1a08afa 100644
--- a/resources/ext.gather.api/CollectionsApi.js
+++ b/resources/ext.gather.api/CollectionsApi.js
@@ -207,20 +207,23 @@
/**
 * Edits a collection
 * @method
-* @param {Number} id unique identifier of collection
+* @param {Number} id optional unique identifier of collection
 * @param {String} title of collection
 * @param {String} description of collection
 * @param {Boolean} isPrivate whether it should be stored 

[MediaWiki-commits] [Gerrit] hygiene: Consistent collection url generation - change (mediawiki...Gather)

2015-04-24 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: hygiene: Consistent collection url generation
..

hygiene: Consistent collection url generation

Change-Id: I68c50e57e80bdc9dbb6c4b8ddc39591879f66c83
---
M includes/views/ReportTableRow.php
1 file changed, 5 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/32/206432/1

diff --git a/includes/views/ReportTableRow.php 
b/includes/views/ReportTableRow.php
index 40e2367..d83bdc4 100644
--- a/includes/views/ReportTableRow.php
+++ b/includes/views/ReportTableRow.php
@@ -29,15 +29,13 @@
 
/**
 * Renders a html link for a collection page
-* @param string $text of the link
-* @param User $user owner of the collection
-* @param int $id of the collection
+* @param models\CollectionInfo $collection
 * @return string
 */
-   private function collectionLink( $text, $user, $id ) {
+   private function collectionLink( $collection ) {
return Html::element( 'a', array(
-   'href' = SpecialPage::getTitleFor( 'Gather', 'by/' . 
$user.'/'.$id )-getLocalUrl()
-   ), $text );
+   'href' = $collection-getUrl()
+   ), $collection-getTitle() );
}
 
/**
@@ -68,7 +66,7 @@
$id = $collection-getId();
 
$html = Html::openElement( 'li' )
-   . $this-collectionLink( $title, $owner, $id )
+   . $this-collectionLink( $collection )
. Html::element( 'span', array(), 
$collection-getDescription() )
. Html::element( 'span', array(), 
$collection-getCount() )
. $this-userLink( $owner )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68c50e57e80bdc9dbb6c4b8ddc39591879f66c83
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Prevent multiple clicks to flag and detach from dom on confi... - change (mediawiki...Gather)

2015-04-23 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Prevent multiple clicks to flag and detach from dom on 
confirmation
..

Prevent multiple clicks to flag and detach from dom on confirmation

Change-Id: I9a159557449d1712993bcfe3a17214fd739e571b
---
M resources/ext.gather.special/init.js
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/91/206191/1

diff --git a/resources/ext.gather.special/init.js 
b/resources/ext.gather.special/init.js
index 6923d77..cdcc32f 100644
--- a/resources/ext.gather.special/init.js
+++ b/resources/ext.gather.special/init.js
@@ -20,15 +20,18 @@
var flagOverlay;
ev.stopPropagation();
ev.preventDefault();
+
if ( !$flag.hasClass( 'disabled' ) ) {
+   // Prevent multiple clicks
+   $flag.addClass( 'disabled' );
api.getCollection( $collection.data( 
'id' ) ).done( function ( collection ) {
flagOverlay = new 
CollectionFlagOverlay( {
collection: collection
} );
flagOverlay.show();
flagOverlay.on( 
'collection-flagged', function () {
-   // After flagging, 
prevent click from opening flag confirmation again
-   $flag.addClass( 
'disabled' );
+   // After flagging, 
remove flag icon.
+   $flag.detach();
} );
} );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a159557449d1712993bcfe3a17214fd739e571b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Switch URL used for collection in moderation notification - change (mediawiki...Gather)

2015-04-23 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Switch URL used for collection in moderation notification
..

Switch URL used for collection in moderation notification

Change-Id: Id133570788f5bed78d0fed2db85b9305a01408cc
---
M includes/api/ApiEditList.php
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/92/206292/1

diff --git a/includes/api/ApiEditList.php b/includes/api/ApiEditList.php
index bf8a1f3..9178c6b 100644
--- a/includes/api/ApiEditList.php
+++ b/includes/api/ApiEditList.php
@@ -132,10 +132,12 @@
// Do echo notification
if ( class_exists( 'EchoEvent' ) ) {
$eventType = $mode === 
'showlist' ? 'gather-unhide' : 'gather-hide';
+   // FIXME: better long term 
solution for generating collection urls needed
+   // Model currently handles it 
which is not accessible from here
$collectionTitle = 
SpecialPage::getTitleFor( 'Gather' )
-   -getSubpage( 'by' )
-   -getSubpage( 
User::newFromId( $row-gl_user ) )
-   -getSubpage( 
$row-gl_id );
+   -getSubpage( 'id' )
+   -getSubpage( 
$row-gl_id )
+   -getSubpage( 
$row-gl_label );
 
EchoEvent::create( array(
'type' = $eventType,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id133570788f5bed78d0fed2db85b9305a01408cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Update Mobilefrontend to cherry pick - change (mediawiki/core)

2015-04-23 Thread Robmoen (Code Review)
Robmoen has submitted this change and it was merged.

Change subject: Update Mobilefrontend to cherry pick
..


Update Mobilefrontend to cherry pick

Change-Id: Ie40c7fc00711b4cad908183b2f69806720161a94
---
M extensions/MobileFrontend
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Robmoen: Verified; Looks good to me, approved



diff --git a/extensions/MobileFrontend b/extensions/MobileFrontend
index 2cb4084..1ab0377 16
--- a/extensions/MobileFrontend
+++ b/extensions/MobileFrontend
-Subproject commit 2cb408472df7fea3e66536f4b35d26f858da4481
+Subproject commit 1ab0377c2c0676f365b0244d797b84678a327bae

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie40c7fc00711b4cad908183b2f69806720161a94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update MobileFrontend to cherry-picks - change (mediawiki/core)

2015-04-23 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Update MobileFrontend to cherry-picks
..

Update MobileFrontend to cherry-picks

Change-Id: I0fe0ebb5c3b13ca9d993dc3d31e7843d9f0169d1
---
M extensions/MobileFrontend
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/28/206328/1

diff --git a/extensions/MobileFrontend b/extensions/MobileFrontend
index 5f35b2f..f27403a 16
--- a/extensions/MobileFrontend
+++ b/extensions/MobileFrontend
-Subproject commit 5f35b2f27fb669081e09a77ba9e7a568a695a611
+Subproject commit f27403a3016f8d31b9d0a14a0b035730cdff3235

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fe0ebb5c3b13ca9d993dc3d31e7843d9f0169d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf2
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update MobileFrontend to cherry-picks - change (mediawiki/core)

2015-04-23 Thread Robmoen (Code Review)
Robmoen has submitted this change and it was merged.

Change subject: Update MobileFrontend to cherry-picks
..


Update MobileFrontend to cherry-picks

Change-Id: I0fe0ebb5c3b13ca9d993dc3d31e7843d9f0169d1
---
M extensions/MobileFrontend
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Robmoen: Verified; Looks good to me, approved



diff --git a/extensions/MobileFrontend b/extensions/MobileFrontend
index 5f35b2f..f27403a 16
--- a/extensions/MobileFrontend
+++ b/extensions/MobileFrontend
-Subproject commit 5f35b2f27fb669081e09a77ba9e7a568a695a611
+Subproject commit f27403a3016f8d31b9d0a14a0b035730cdff3235

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fe0ebb5c3b13ca9d993dc3d31e7843d9f0169d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf2
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update Mobilefrontend to cherry pick - change (mediawiki/core)

2015-04-23 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Update Mobilefrontend to cherry pick
..

Update Mobilefrontend to cherry pick

Change-Id: Ie40c7fc00711b4cad908183b2f69806720161a94
---
M extensions/MobileFrontend
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/24/206324/1

diff --git a/extensions/MobileFrontend b/extensions/MobileFrontend
index 2cb4084..1ab0377 16
--- a/extensions/MobileFrontend
+++ b/extensions/MobileFrontend
-Subproject commit 2cb408472df7fea3e66536f4b35d26f858da4481
+Subproject commit 1ab0377c2c0676f365b0244d797b84678a327bae

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie40c7fc00711b4cad908183b2f69806720161a94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Revert Update Gather to master - change (mediawiki/core)

2015-04-21 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Revert Update Gather to master
..

Revert Update Gather to master

This reverts commit 5962ddf7d895e473e7383e62e972a70c4c7c4e71.

Change-Id: Ib4e254a2ca24e93511bfd0c33ee71d5305000beb
---
M extensions/Gather
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/205737/1

diff --git a/extensions/Gather b/extensions/Gather
index b2b36fd..0568ec8 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit b2b36fd2ce9ba3629cc2b42acb9b93ca76980a13
+Subproject commit 0568ec80a25aa46b5efea07eee41683fa67b4828

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4e254a2ca24e93511bfd0c33ee71d5305000beb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf2
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update Gather to master - change (mediawiki/core)

2015-04-21 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Update Gather to master
..

Update Gather to master

Change-Id: I30452d49f57be4371550ebd396e00bda1f89deb6
---
M extensions/Gather
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/205721/1

diff --git a/extensions/Gather b/extensions/Gather
index 0568ec8..b2b36fd 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit 0568ec80a25aa46b5efea07eee41683fa67b4828
+Subproject commit b2b36fd2ce9ba3629cc2b42acb9b93ca76980a13

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30452d49f57be4371550ebd396e00bda1f89deb6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf2
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update Gather to master - change (mediawiki/core)

2015-04-21 Thread Robmoen (Code Review)
Robmoen has submitted this change and it was merged.

Change subject: Update Gather to master
..


Update Gather to master

Change-Id: I30452d49f57be4371550ebd396e00bda1f89deb6
---
M extensions/Gather
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Robmoen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extensions/Gather b/extensions/Gather
index 0568ec8..b2b36fd 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit 0568ec80a25aa46b5efea07eee41683fa67b4828
+Subproject commit b2b36fd2ce9ba3629cc2b42acb9b93ca76980a13

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30452d49f57be4371550ebd396e00bda1f89deb6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf2
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Revert Update Gather to master - change (mediawiki/core)

2015-04-21 Thread Robmoen (Code Review)
Robmoen has submitted this change and it was merged.

Change subject: Revert Update Gather to master
..


Revert Update Gather to master

This reverts commit 5962ddf7d895e473e7383e62e972a70c4c7c4e71.

Change-Id: Ib4e254a2ca24e93511bfd0c33ee71d5305000beb
---
M extensions/Gather
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Robmoen: Verified; Looks good to me, approved



diff --git a/extensions/Gather b/extensions/Gather
index b2b36fd..0568ec8 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit b2b36fd2ce9ba3629cc2b42acb9b93ca76980a13
+Subproject commit 0568ec80a25aa46b5efea07eee41683fa67b4828

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4e254a2ca24e93511bfd0c33ee71d5305000beb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf2
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Split out dialog from collection delete overlay - change (mediawiki...Gather)

2015-04-16 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Split out dialog from collection delete overlay
..

Split out dialog from collection delete overlay

Introduces new ConfirmationOverlay class

Change-Id: Iafc725abdac69597af55f25116e49160853554a5
---
M resources/Resources.php
A resources/ext.gather.collection.confirm/ConfirmationOverlay.js
A resources/ext.gather.collection.confirm/confirmationOverlay.hogan
R resources/ext.gather.collection.confirm/confirmationOverlay.less
M resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
D resources/ext.gather.collection.delete/content.hogan
6 files changed, 103 insertions(+), 60 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/09/204609/1

diff --git a/resources/Resources.php b/resources/Resources.php
index a1f6385..f355973 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -63,6 +63,7 @@
'images' = array(
'collections-read-more' = 'ext.gather.icons/next.svg',
'collection-owner' = 'ext.gather.icons/user.svg',
+   'collection-flag' = 'ext.gather.icons/flag.svg',
),
),
 
@@ -96,6 +97,7 @@
),
'scripts' = array(
'ext.gather.logging/SchemaGather.js',
+   'ext.gather.logging/SchemaGatherFlags.js',
),
),
 
@@ -119,6 +121,25 @@
),
'scripts' = array(

'ext.gather.collection.base/CollectionsContentOverlayBase.js',
+   ),
+   ),
+
+   'ext.gather.collection.confirm' = 
$wgGatherResourceFileModuleBoilerplate + array(
+   'dependencies' = array(
+   'ext.gather.collection.base',
+   ),
+   'styles' = array(
+   
'ext.gather.collection.confirm/confirmationOverlay.less',
+   ),
+   'messages' = array(
+   'gather-error-unknown-collection',
+   'gather-confirmation-cancel-button-label',
+   ),
+   'templates' = array(
+   'confirmationOverlay.hogan' = 
'ext.gather.collection.confirm/confirmationOverlay.hogan',
+   ),
+   'scripts' = array(
+   'ext.gather.collection.confirm/ConfirmationOverlay.js',
),
),
 
@@ -241,7 +262,7 @@
 
'ext.gather.collection.delete' = 
$wgGatherResourceFileModuleBoilerplate + array(
'dependencies' = array(
-   'ext.gather.collection.base',
+   'ext.gather.collection.confirm',
'mobile.toast',
'ext.gather.api',
'mediawiki.util'
@@ -250,19 +271,11 @@
'gather-delete-collection-confirm',
'gather-delete-collection-heading',
'gather-delete-collection-delete-label',
-   'gather-delete-collection-cancel-label',
'gather-delete-collection-success',
'gather-delete-collection-failed-error',
-   'gather-error-unknown-collection',
-   ),
-   'templates' = array(
-   'content.hogan' = 
'ext.gather.collection.delete/content.hogan',
),
'scripts' = array(

'ext.gather.collection.delete/CollectionDeleteOverlay.js',
-   ),
-   'styles' = array(
-   'ext.gather.collection.delete/deleteOverlay.less',
),
),
 
@@ -270,6 +283,7 @@
'dependencies' = array(
'ext.gather.collection.editor',
'ext.gather.collection.delete',
+   'ext.gather.collection.flag',
),
'scripts' = array(
'ext.gather.special/init.js',
diff --git a/resources/ext.gather.collection.confirm/ConfirmationOverlay.js 
b/resources/ext.gather.collection.confirm/ConfirmationOverlay.js
new file mode 100644
index 000..aa3ee26
--- /dev/null
+++ b/resources/ext.gather.collection.confirm/ConfirmationOverlay.js
@@ -0,0 +1,54 @@
+( function ( M, $ ) {
+
+   var ConfirmationOverlay,
+   toast = M.require( 'toast' ),
+   icons = M.require( 'icons' ),
+   CollectionsContentOverlayBase = M.require( 
'ext.gather.collection.base/CollectionsContentOverlayBase' );
+
+   /**
+* Action confirmation overlay base class
+* @extends CollectionsContentOverlayBase
+* @class ConfirmationOverlay
+*/
+   ConfirmationOverlay = 

[MediaWiki-commits] [Gerrit] Add flag collection button and confirm overlay - change (mediawiki...Gather)

2015-04-16 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Add flag collection button and confirm overlay
..

Add flag collection button and confirm overlay

Added flag icon to collection when not watchlist or
** collection owner
Added CollectionFlagOverlay for flag confirmation
Added SchemaGatherFlags
NEEDS:
* Review
* Schema logging tested
* userGroups is currently an empty string
bug: T94871

Change-Id: I2b373e5415f76f85dba78d246b3c22af2284c261
---
M i18n/en.json
M i18n/qqq.json
M includes/Gather.hooks.php
M includes/views/Collection.php
A resources/ext.gather.collection.flag/CollectionFlagOverlay.js
A resources/ext.gather.collection.flag/content.hogan
A resources/ext.gather.collection.flag/flagOverlay.less
A resources/ext.gather.icons/flag.svg
A resources/ext.gather.logging/SchemaGatherFlags.js
M resources/ext.gather.special/init.js
M resources/ext.gather.styles/collections.less
11 files changed, 179 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/11/204611/1

diff --git a/i18n/en.json b/i18n/en.json
index 567ead9..b974dce 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -40,9 +40,13 @@
gather-delete-collection-confirm: Are you sure you want to delete 
this collection?,
gather-delete-collection-heading: Delete collection,
gather-delete-collection-delete-label: Delete,
-   gather-delete-collection-cancel-label: Cancel,
gather-delete-collection-success: Collection was successfully 
deleted.,
gather-delete-collection-failed-error: There was a problem deleting 
this collection.,
+   gather-flag-collection-heading: Flag collection,
+   gather-flag-collection-confirm: Are you sure you want to flag this 
collection for review?,
+   gather-flag-collection-flag-label: Flag,
+   gather-flag-collection-success: Collection was successfully 
flagged.,
+   gather-confirmation-cancel-button-label: Cancel,
gather-error-unknown-collection: Cannot find the requested 
collection to edit.,
gather-collection-member: Is member of collection.,
gather-collection-non-member: Is not member of collection.,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index d7a66ff..1d1c9b4 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -43,11 +43,15 @@
gather-edit-collection-save-label: Label for save button in 
collection editor.\n{{Identical|Done}},
gather-edit-collection-failed-error: There was a problem saving the 
changes.,
gather-delete-collection-confirm: Text under the heading asking the 
user if they would like to delete a collection.,
-   gather-delete-collection-heading: Heading for collection delete 
overlay,
-   gather-delete-collection-delete-label: Label for delete button in 
delete overlay.\n{{Identical|Delete}},
-   gather-delete-collection-cancel-label: Label for cancel button in 
delete overlay.\n{{Identical|Cancel}},
+   gather-delete-collection-heading: Heading for collection delete 
confirmation overlay,
+   gather-delete-collection-delete-label: Label for delete button in 
delete confirmation overlay.\n{{Identical|Delete}},
gather-delete-collection-success: Toast message indicating that 
deletion was successful.,
gather-delete-collection-failed-error: Toast error indicating there 
was a problem deleting the collection.,
+   gather-flag-collection-heading: Heading text for collection flag 
conirmation overlay,
+   gather-flag-collection-confirm: Text under the heading asking the 
user if they would like to flag a collection for review.,
+   gather-flag-collection-flag-label: Label for flag button in flag 
collection confirmation overlay.,
+   gather-flag-collection-success: Toast message indicating that 
flagging the collection was successful.,
+   gather-confirmation-cancel-button-label: Label for cancel button in 
confirmation overlay.\n{{Identical|Cancel}},
gather-error-unknown-collection: Error message test when you try to 
edit a collection you do not own or that does not exist.,
gather-collection-member: Alternative text displayed next to 
collection name when page is a member.,
gather-collection-non-member: Alternative text displayed next to 
collection name when page is not a member.,
diff --git a/includes/Gather.hooks.php b/includes/Gather.hooks.php
index 119e5cb..5351ff1 100644
--- a/includes/Gather.hooks.php
+++ b/includes/Gather.hooks.php
@@ -62,8 +62,9 @@
public static function onEventLoggingRegisterSchemas( $schemas ) {
$schemas += array(
'GatherClicks' = 11770314,
+   'GatherFlags' = 11793295,
);
-   self::registerSchemas( array( 'schema.GatherClicks' ) );
+   self::registerSchemas( array( 'schema.GatherClicks', 
'schema.GatherFlags' 

[MediaWiki-commits] [Gerrit] Add flag collection button and overlay - change (mediawiki...Gather)

2015-04-14 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Add flag collection button and overlay
..

Add flag collection button and overlay

Added flag icon to collection when not watchlist or
** collection owner
Factored ConfirmationOverlay from CollectionDeleteOverlay
Added CollectionFlagOverlay for flag confirmation
Added SchemaGatherFlags

NEEDS:
* Review
* Schema logging tested
* userGroups is currently an empty string

bug: T94871

Change-Id: I1b732712573a4f71d60434a80191964544219508
---
M i18n/en.json
M i18n/qqq.json
M includes/Gather.hooks.php
M includes/views/Collection.php
M resources/Resources.php
A resources/ext.gather.collection.confirm/ConfirmationOverlay.js
A resources/ext.gather.collection.confirm/confirmationOverlay.hogan
C resources/ext.gather.collection.confirm/confirmationOverlay.less
M resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
A resources/ext.gather.collection.flag/CollectionFlagOverlay.js
R resources/ext.gather.collection.flag/content.hogan
R resources/ext.gather.collection.flag/flagOverlay.less
A resources/ext.gather.icons/flag.svg
A resources/ext.gather.logging/SchemaGatherFlags.js
M resources/ext.gather.special/init.js
M resources/ext.gather.styles/collections.less
16 files changed, 265 insertions(+), 69 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/01/204201/1

diff --git a/i18n/en.json b/i18n/en.json
index 567ead9..b974dce 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -40,9 +40,13 @@
gather-delete-collection-confirm: Are you sure you want to delete 
this collection?,
gather-delete-collection-heading: Delete collection,
gather-delete-collection-delete-label: Delete,
-   gather-delete-collection-cancel-label: Cancel,
gather-delete-collection-success: Collection was successfully 
deleted.,
gather-delete-collection-failed-error: There was a problem deleting 
this collection.,
+   gather-flag-collection-heading: Flag collection,
+   gather-flag-collection-confirm: Are you sure you want to flag this 
collection for review?,
+   gather-flag-collection-flag-label: Flag,
+   gather-flag-collection-success: Collection was successfully 
flagged.,
+   gather-confirmation-cancel-button-label: Cancel,
gather-error-unknown-collection: Cannot find the requested 
collection to edit.,
gather-collection-member: Is member of collection.,
gather-collection-non-member: Is not member of collection.,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index d7a66ff..1d1c9b4 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -43,11 +43,15 @@
gather-edit-collection-save-label: Label for save button in 
collection editor.\n{{Identical|Done}},
gather-edit-collection-failed-error: There was a problem saving the 
changes.,
gather-delete-collection-confirm: Text under the heading asking the 
user if they would like to delete a collection.,
-   gather-delete-collection-heading: Heading for collection delete 
overlay,
-   gather-delete-collection-delete-label: Label for delete button in 
delete overlay.\n{{Identical|Delete}},
-   gather-delete-collection-cancel-label: Label for cancel button in 
delete overlay.\n{{Identical|Cancel}},
+   gather-delete-collection-heading: Heading for collection delete 
confirmation overlay,
+   gather-delete-collection-delete-label: Label for delete button in 
delete confirmation overlay.\n{{Identical|Delete}},
gather-delete-collection-success: Toast message indicating that 
deletion was successful.,
gather-delete-collection-failed-error: Toast error indicating there 
was a problem deleting the collection.,
+   gather-flag-collection-heading: Heading text for collection flag 
conirmation overlay,
+   gather-flag-collection-confirm: Text under the heading asking the 
user if they would like to flag a collection for review.,
+   gather-flag-collection-flag-label: Label for flag button in flag 
collection confirmation overlay.,
+   gather-flag-collection-success: Toast message indicating that 
flagging the collection was successful.,
+   gather-confirmation-cancel-button-label: Label for cancel button in 
confirmation overlay.\n{{Identical|Cancel}},
gather-error-unknown-collection: Error message test when you try to 
edit a collection you do not own or that does not exist.,
gather-collection-member: Alternative text displayed next to 
collection name when page is a member.,
gather-collection-non-member: Alternative text displayed next to 
collection name when page is not a member.,
diff --git a/includes/Gather.hooks.php b/includes/Gather.hooks.php
index 119e5cb..5351ff1 100644
--- a/includes/Gather.hooks.php
+++ b/includes/Gather.hooks.php
@@ -62,8 +62,9 @@
public static function 

[MediaWiki-commits] [Gerrit] Skin styles done the proper way - change (mediawiki...Gather)

2015-04-14 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Skin styles done the proper way
..

Skin styles done the proper way

Don't wipe out minerva specific styles.

Bug: T96011
Change-Id: Ib885f08c9c341740a39604ca3e5cd959ddfa1dbb
---
M resources/Resources.php
1 file changed, 1 insertion(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/58/204158/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 5a5319d..7850072 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -73,6 +73,7 @@
'ext.gather.styles/editfeed.less',
),
'skinStyles' = array(
+   'minerva' = 'ext.gather.styles/minerva.less',
'vector' = 'ext.gather.styles/vector.less'
),
),
@@ -290,12 +291,6 @@
'scripts' = array(
'ext.gather.lists/init.js',
),
-   ),
-);
-
-$wgResourceModuleSkinStyles['minerva'] = 
$wgGatherMobileSpecialPageResourceBoilerplate + array(
-   'ext.gather.styles' = array(
-   'ext.gather.styles/minerva.less',
),
 );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib885f08c9c341740a39604ca3e5cd959ddfa1dbb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: wmf/1.26wmf1
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Skin styles done the proper way - change (mediawiki...Gather)

2015-04-14 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Skin styles done the proper way
..

Skin styles done the proper way

Don't wipe out minerva specific styles.

Bug: T96011
Change-Id: Ib885f08c9c341740a39604ca3e5cd959ddfa1dbb
---
M resources/Resources.php
1 file changed, 1 insertion(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/59/204159/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 5a5319d..7850072 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -73,6 +73,7 @@
'ext.gather.styles/editfeed.less',
),
'skinStyles' = array(
+   'minerva' = 'ext.gather.styles/minerva.less',
'vector' = 'ext.gather.styles/vector.less'
),
),
@@ -290,12 +291,6 @@
'scripts' = array(
'ext.gather.lists/init.js',
),
-   ),
-);
-
-$wgResourceModuleSkinStyles['minerva'] = 
$wgGatherMobileSpecialPageResourceBoilerplate + array(
-   'ext.gather.styles' = array(
-   'ext.gather.styles/minerva.less',
),
 );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib885f08c9c341740a39604ca3e5cd959ddfa1dbb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: wmf/1.25wmf24
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Skin styles done the proper way - change (mediawiki...Gather)

2015-04-14 Thread Robmoen (Code Review)
Robmoen has submitted this change and it was merged.

Change subject: Skin styles done the proper way
..


Skin styles done the proper way

Don't wipe out minerva specific styles.

Bug: T96011
Change-Id: Ib885f08c9c341740a39604ca3e5cd959ddfa1dbb
---
M resources/Resources.php
1 file changed, 1 insertion(+), 6 deletions(-)

Approvals:
  Robmoen: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/Resources.php b/resources/Resources.php
index 5a5319d..7850072 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -73,6 +73,7 @@
'ext.gather.styles/editfeed.less',
),
'skinStyles' = array(
+   'minerva' = 'ext.gather.styles/minerva.less',
'vector' = 'ext.gather.styles/vector.less'
),
),
@@ -290,12 +291,6 @@
'scripts' = array(
'ext.gather.lists/init.js',
),
-   ),
-);
-
-$wgResourceModuleSkinStyles['minerva'] = 
$wgGatherMobileSpecialPageResourceBoilerplate + array(
-   'ext.gather.styles' = array(
-   'ext.gather.styles/minerva.less',
),
 );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib885f08c9c341740a39604ca3e5cd959ddfa1dbb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: wmf/1.26wmf1
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] updating gather - change (mediawiki/core)

2015-04-14 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: updating gather
..

updating gather

Change-Id: Ib3ce5087f1b2bca901e04f88ef40398c355f2be1
---
M extensions/Gather
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/63/204163/1

diff --git a/extensions/Gather b/extensions/Gather
index 3ed7017..935bda7 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit 3ed701706fc728f8533409753e6a7cc09fcdedaa
+Subproject commit 935bda74be8aa31de4a5221defe5395ba3f90ef4

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3ce5087f1b2bca901e04f88ef40398c355f2be1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf1
Gerrit-Owner: Robmoen rm...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] updating gather - change (mediawiki/core)

2015-04-14 Thread Robmoen (Code Review)
Robmoen has submitted this change and it was merged.

Change subject: updating gather
..


updating gather

Change-Id: Ib3ce5087f1b2bca901e04f88ef40398c355f2be1
---
M extensions/Gather
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Robmoen: Verified; Looks good to me, approved



diff --git a/extensions/Gather b/extensions/Gather
index 3ed7017..935bda7 16
--- a/extensions/Gather
+++ b/extensions/Gather
-Subproject commit 3ed701706fc728f8533409753e6a7cc09fcdedaa
+Subproject commit 935bda74be8aa31de4a5221defe5395ba3f90ef4

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3ce5087f1b2bca901e04f88ef40398c355f2be1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf1
Gerrit-Owner: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Remove privacy tag from public collection - change (mediawiki...Gather)

2015-04-13 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Remove privacy tag from public collection
..

Remove privacy tag from public collection

bug: T95639
Change-Id: I7bc5c53c1c60aac2ebaeb068eec9c0893d16b6d2
---
M includes/views/Collection.php
1 file changed, 9 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/66/203966/1

diff --git a/includes/views/Collection.php b/includes/views/Collection.php
index 3abde95..d5b7df1 100644
--- a/includes/views/Collection.php
+++ b/includes/views/Collection.php
@@ -44,16 +44,20 @@
$collection = $this-collection;
$description = $collection-getDescription();
$owner = $collection-getOwner();
+
if ( $collection-isHidden() ) {
$privacy = 'Hidden';
-   } else {
-   $privacy = $collection-isPublic() ? 'Public' : 
'Private';
+   } elseif ( !$collection-isPublic() ) {
+   $privacy = 'Private';
}
 
$html = Html::openElement( 'div', array( 'class' = 
'collection-header' ) ) .
-   Html::openElement( 'div', array( 'class' = 
'collection-meta' ) ) .
-   Html::element( 'div', array( 'class' = 
'collection-privacy' ), $privacy ) .
-   Html::closeElement( 'div' ) .
+   Html::openElement( 'div', array( 'class' = 
'collection-meta' ) );
+   // Provide privacy tag if collection is not public
+   if ( isset( $privacy ) ) {
+   $html .= Html::element( 'div', array( 'class' = 
'collection-privacy' ), $privacy );
+   }
+   $html .= Html::closeElement( 'div' ) .
Html::element( 'h1', array( 'id' = 'section_0' ), 
$collection-getTitle() ) .
Html::element( 'div', array( 'class' = 
'collection-description' ), $description ) .
$this-getOwnerHtml( $owner ) .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7bc5c53c1c60aac2ebaeb068eec9c0893d16b6d2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Add moderation expectations to Special:GatherLists for admins - change (mediawiki...Gather)

2015-04-13 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Add moderation expectations to Special:GatherLists for admins
..

Add moderation expectations to Special:GatherLists for admins

Include message to administrator with a link to [[beta protocol]]
which outlines the expectations for moderation of collections

bug: T95635
Change-Id: Iab6029d29f89024961f17f96500c8a1f08a62f27
---
M i18n/en.json
M i18n/qqq.json
M includes/views/ReportTable.php
M resources/ext.gather.styles/lists.less
4 files changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/49/203949/1

diff --git a/i18n/en.json b/i18n/en.json
index 567ead9..97bcb82 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -26,6 +26,7 @@
gather-lists-show-collection: Do you want to make list \$1\ by $2 
public again?,
gather-lists-show-success-toast: List \$1\ was made public again 
successfully.,
gather-lists-show-failure-toast: Failed to show list \$1\.,
+   gather-lists-hide-protocol: Before hiding or un-hiding a list, 
please refer to the [[beta protocol]] for Gather Collections Moderation,
gather-editfeed-show: Show,
gather-editfeed-title: Edits to pages in my collections,
gather-editfeed-empty: There have been no recent edits to any pages 
in this collection.,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index d7a66ff..8520121 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -31,6 +31,7 @@
gather-lists-show-collection: Label asking for confirmation when 
revealing a user's collection for moderation purposes. Parameters:\n* $1 - 
Title of the collection.\n* $2 - User name of the owner.,
gather-lists-show-success-toast: Label for toast displaying that 
specified list was shown successfully. Only shown to admins. Parameters:\n* $1 
- Title of the collection.,
gather-lists-show-failure-toast: Label for toast diaplaying that 
showing specified list failed. Only shown to admins. Parameters:\n* $1 - Title 
of the collection.,
+   gather-lists-hide-protocol: Text shown to administrator with a link 
to the [[beta protocol]] page which outlines moderation expectations on 
[[Special:GatherLists]],
gather-editfeed-show: Label for button that toggles list on feed of 
edits.\n{{Identical|Show}},
gather-editfeed-title: Title for page that allows you to view edits 
inside a collection.,
gather-editfeed-empty: Message that shows when no edits have been 
made recently to any pages inside a collection.,
diff --git a/includes/views/ReportTable.php b/includes/views/ReportTable.php
index 2dc7bba..ea16191 100644
--- a/includes/views/ReportTable.php
+++ b/includes/views/ReportTable.php
@@ -35,6 +35,11 @@
protected function getHtml( $data = array() ) {
$html = '';
$html .= Html::openElement( 'div', array( 'class' = 'content 
gather-lists' ) );
+   // Display protocol for hiding another users list
+   if ( $data['canHide'] ) {
+   $html .= Html::rawElement( 'div', array( 'class' = 
'hide-protocol' ),
+   wfMessage( 'gather-lists-hide-protocol' 
)-parse() );
+   }
$html .= Html::openElement( 'ul', array() );
$html .= Html::openElement( 'li', array( 'class' = 'heading' ) 
)
. Html::element( 'span', array(), wfMessage( 
'gather-lists-collection-title' ) )
diff --git a/resources/ext.gather.styles/lists.less 
b/resources/ext.gather.styles/lists.less
index 9fce8de..5665790 100644
--- a/resources/ext.gather.styles/lists.less
+++ b/resources/ext.gather.styles/lists.less
@@ -4,6 +4,10 @@
 .gather-lists {
padding-top: 1em;
 
+   .hide-protocol {
+   text-align: center;
+   }
+
ul {
display: table;
width: 100%;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab6029d29f89024961f17f96500c8a1f08a62f27
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Fix jscs coding style issues - change (mediawiki...Gather)

2015-04-10 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Fix jscs coding style issues
..

Fix jscs coding style issues

Change-Id: Ic0f4daea11ee253a6fc30769b1c018f381131426
---
M resources/ext.gather.watchstar/CollectionsContentOverlay.js
M tests/qunit/ext.gather.collection.editor/test_CollectionEditOverlay.js
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/60/203460/1

diff --git a/resources/ext.gather.watchstar/CollectionsContentOverlay.js 
b/resources/ext.gather.watchstar/CollectionsContentOverlay.js
index b7c22fd..86626fa 100644
--- a/resources/ext.gather.watchstar/CollectionsContentOverlay.js
+++ b/resources/ext.gather.watchstar/CollectionsContentOverlay.js
@@ -91,7 +91,7 @@
 
this.createButton  = new ButtonWithSpinner( {
label: mw.msg( 'gather-create-new-button-label' 
),
-   flags: ['primary', 'constructive']
+   flags: [ 'primary', 'constructive' ]
} );
this.createButton.setDisabled( true );
// Binding here as widgets are not views and are 
created after events map runs
diff --git 
a/tests/qunit/ext.gather.collection.editor/test_CollectionEditOverlay.js 
b/tests/qunit/ext.gather.collection.editor/test_CollectionEditOverlay.js
index 86d1cfd..7a904eb 100644
--- a/tests/qunit/ext.gather.collection.editor/test_CollectionEditOverlay.js
+++ b/tests/qunit/ext.gather.collection.editor/test_CollectionEditOverlay.js
@@ -23,7 +23,7 @@
 
/**
 * Generate string of a certain length
-* @param {Number} length length of desired string
+* @param {Number} len length of desired string
 * @returns {String} generated string
 */
function getStringWithLength( len ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0f4daea11ee253a6fc30769b1c018f381131426
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Return listpages results in query object - change (mediawiki...Gather)

2015-04-10 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Return listpages results in query object
..

Return listpages results in query object

bug: T94124
Change-Id: I41cd540c3faa4de0be3da5e619c0f9c9cdeb2b05
---
M includes/api/ApiQueryListPages.php
1 file changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/61/203461/1

diff --git a/includes/api/ApiQueryListPages.php 
b/includes/api/ApiQueryListPages.php
index 767c031..acf0282 100644
--- a/includes/api/ApiQueryListPages.php
+++ b/includes/api/ApiQueryListPages.php
@@ -114,9 +114,8 @@
$titles = $this-queryListItems( $params, 
$isGenerator );
}
}
-
if ( !$isGenerator ) {
-   $this-getResult()-setIndexedTagName_internal( 
$this-getModuleName(), 'wr' );
+   $this-getResult()-setIndexedTagName_internal( 
$this-getModulePath(), 'wr' );
} else {
$resultPageSet-populateFromTitles( $titles );
}
@@ -159,7 +158,7 @@
if ( !$isGenerator ) {
$vals = array();
ApiQueryBase::addTitleInfo( $vals, $t );
-   $fit = $this-getResult()-addValue( 
$this-getModuleName(), null, $vals );
+   $fit = $this-getResult()-addValue( 
$this-getModulePath(), null, $vals );
if ( !$fit ) {
$this-setContinueEnumParameter( 
'continue', $row-gli_order );
break;
@@ -225,7 +224,7 @@
if ( !$isGenerator ) {
$vals = array();
ApiQueryBase::addTitleInfo( $vals, $t );
-   $fit = $this-getResult()-addValue( 
$this-getModuleName(), null, $vals );
+   $fit = $this-getResult()-addValue( 
$this-getModulePath(), null, $vals );
if ( !$fit ) {
$this-setContinueEnumParameter( 
'continue', $row-wl_namespace . '|' . $row-wl_title );
break;
@@ -237,6 +236,10 @@
return $titles;
}
 
+   public function getModulePath() {
+   return array( 'query', $this-getModuleName() );
+   }
+
public function getCacheMode( $params ) {
return 'anon-public-user-private';
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41cd540c3faa4de0be3da5e619c0f9c9cdeb2b05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Use button with spinner for create collection button - change (mediawiki...Gather)

2015-04-08 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Use button with spinner for create collection button
..

Use button with spinner for create collection button

Uses oo-ui button styles for constructive

bug: T93424
Change-Id: I308fea0abbff555fe3f5cebc78c72543de784500
---
M resources/Resources.php
M resources/ext.gather.watchstar/CollectionsContentOverlay.js
M resources/ext.gather.watchstar/content.hogan
3 files changed, 22 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/23/202923/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 85e9d27..1263066 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -123,6 +123,7 @@
'ext.gather.collection.base',
'mobile.settings',
'ext.gather.watchstar.icons',
+   'mobile.buttonWithSpinner',
),
'styles' = array(
'ext.gather.watchstar/contentOverlay.less',
diff --git a/resources/ext.gather.watchstar/CollectionsContentOverlay.js 
b/resources/ext.gather.watchstar/CollectionsContentOverlay.js
index 44e719e..eab8271 100644
--- a/resources/ext.gather.watchstar/CollectionsContentOverlay.js
+++ b/resources/ext.gather.watchstar/CollectionsContentOverlay.js
@@ -7,7 +7,8 @@
user = M.require( 'user' ),
Icon = M.require( 'Icon' ),
CollectionsApi = M.require( 
'ext.gather.watchstar/CollectionsApi' ),
-   CollectionsContentOverlayBase = M.require( 
'ext.gather.collection.base/CollectionsContentOverlayBase' );
+   CollectionsContentOverlayBase = M.require( 
'ext.gather.collection.base/CollectionsContentOverlayBase' ),
+   ButtonWithSpinner = M.require( 'ButtonWithSpinner' );
 
/**
 * A clickable watchstar for managing collections
@@ -52,7 +53,6 @@
} ).toHtmlString(),
title: mw.config.get( 'wgTitle' ),
spinner: icons.spinner().toHtmlString(),
-   createButtonLabel: mw.msg( 
'gather-create-new-button-label' ),
placeholder: mw.msg( 'gather-add-new-placeholder' ),
subheadingNewCollection: mw.msg( 'gather-add-to-new' ),
subheading: mw.msg( 'gather-add-to-existing' ),
@@ -87,6 +87,19 @@
},
/** @inheritdoc */
postRender: function () {
+   var $form = this.$( 'form' );
+
+   this.createButton  = new ButtonWithSpinner( {
+   label: mw.msg( 'gather-create-new-button-label' 
),
+   flags: 'constructive'
+   } );
+   this.createButton.setDisabled( true );
+   this.createButton.on( 'click', function () {
+   $form.submit();
+   } );
+
+   $form.append( this.createButton.$element );
+   // Hide base overlay's spinner
this.hideSpinner();
},
/**
@@ -168,9 +181,8 @@
 */
onInput: function ( ev ) {
var $input = $( ev.target ),
-   val = $input.val(),
-   $button = $input.next( 'button' );
-   $button.prop( 'disabled', val === '' );
+   val = $input.val();
+   this.createButton.setDisabled( val === '' );
},
/**
 * Event handler for setting up a new collection
@@ -182,13 +194,10 @@
 
ev.preventDefault();
if ( this.isTitleValid( title ) ) {
-   this.showSpinner();
this.addCollection( title, page );
schema.log( {
eventName: 'new-collection'
} );
-
-   this.addCollection( title, page );
} else {
toast.show( mw.msg( 
'gather-add-title-invalid-toast' ), 'toast error' );
}
@@ -292,7 +301,7 @@
schema.log( {
eventName: 'add-collection-error'
} );
-   self.hideSpinner();
+   self.createButton.hideSpinner();
toast.show( mw.msg( 
'gather-add-to-collection-failed-toast' ), 'toast error' );
} );
 

[MediaWiki-commits] [Gerrit] Hygiene: Fancy string generation on collection tests - change (mediawiki...Gather)

2015-04-07 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Hygiene: Fancy string generation on collection tests
..

Hygiene: Fancy string generation on collection tests

Change-Id: I37e4e6f532505645a263dd93da1e0b54bd892e56
---
M tests/qunit/ext.gather.collection.editor/test_CollectionEditOverlay.js
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/06/202606/1

diff --git 
a/tests/qunit/ext.gather.collection.editor/test_CollectionEditOverlay.js 
b/tests/qunit/ext.gather.collection.editor/test_CollectionEditOverlay.js
index f66d614..86d1cfd 100644
--- a/tests/qunit/ext.gather.collection.editor/test_CollectionEditOverlay.js
+++ b/tests/qunit/ext.gather.collection.editor/test_CollectionEditOverlay.js
@@ -24,14 +24,10 @@
/**
 * Generate string of a certain length
 * @param {Number} length length of desired string
-* @returns {String} randomly generated string
+* @returns {String} generated string
 */
function getStringWithLength( len ) {
-   var i, str = '';
-   for ( i = 0; i  len; i++ ) {
-   str += 'a';
-   }
-   return str;
+   return Array( len + 1 ).join( 'a' );
}
 
QUnit.test( 'Collection title validation', 2, function ( assert ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37e4e6f532505645a263dd93da1e0b54bd892e56
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Remove outline from collections watchstar - change (mediawiki...Gather)

2015-04-07 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Remove outline from collections watchstar
..

Remove outline from collections watchstar

When clicking watchstar, button becomes outlined.
Setting outline to none on the button prevents this.

Change-Id: I206586dac0c8926e94126ea29ad7d70fa70b8ae0
---
M resources/ext.gather.watchstar/contentOverlay.less
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/96/202596/1

diff --git a/resources/ext.gather.watchstar/contentOverlay.less 
b/resources/ext.gather.watchstar/contentOverlay.less
index 0760e34..5b56d4b 100644
--- a/resources/ext.gather.watchstar/contentOverlay.less
+++ b/resources/ext.gather.watchstar/contentOverlay.less
@@ -14,6 +14,10 @@
overflow: hidden;
 }
 
+.collection-star-container button {
+   outline: none;
+}
+
 .overlay.collection-overlay {
font-size: .9em;
text-align: left;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I206586dac0c8926e94126ea29ad7d70fa70b8ae0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Don't show collection tutorial on the main page - change (mediawiki...Gather)

2015-04-07 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Don't show collection tutorial on the main page
..

Don't show collection tutorial on the main page

bug: T95355
Change-Id: Ic542bcd93ee387298c9ac279235be85e5f176f8d
---
M resources/ext.gather.init/init.js
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/00/202600/1

diff --git a/resources/ext.gather.init/init.js 
b/resources/ext.gather.init/init.js
index 0938872..ec8def3 100644
--- a/resources/ext.gather.init/init.js
+++ b/resources/ext.gather.init/init.js
@@ -18,6 +18,8 @@
function shouldShowCollectionTutorial() {
if (
mw.config.get( 'wgNamespaceNumber' ) === 0 
+   // Show when not on the main page
+   mw.config.get( 'wgIsMainPage' ) === false 
// Don't show this when mobile is showing edit tutorial
mw.util.getParamValue( 'article_action' ) !== 
'signup-edit' 
// Don't show if the overlay is open as user could have 
clicked watchstar

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic542bcd93ee387298c9ac279235be85e5f176f8d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
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


[MediaWiki-commits] [Gerrit] Better explanations in error messages - change (mediawiki...Gather)

2015-04-07 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Better explanations in error messages
..

Better explanations in error messages

bug: T93817
Change-Id: I48d03c8846331a201485ef63c894b70816a74023
---
M i18n/en.json
M i18n/qqq.json
M includes/views/Collection.php
M resources/Resources.php
M resources/ext.gather.watchstar/CollectionsContentOverlay.js
5 files changed, 10 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/12/202612/1

diff --git a/i18n/en.json b/i18n/en.json
index a1ab6ad..78f78ed 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -32,7 +32,7 @@
gather-edit-collection-label-description: Description,
gather-edit-collection-label-privacy: Private collection,
gather-edit-collection-save-label: Done,
-   gather-edit-collection-failed-error: There was a problem saving the 
changes.,
+   gather-edit-collection-failed-error: There was an issue with your 
attempted change, please try something else.,
gather-delete-collection-confirm: Are you sure you want to delete 
this collection?,
gather-delete-collection-heading: Delete collection,
gather-delete-collection-delete-label: Delete,
@@ -50,7 +50,8 @@
gather-add-toast: The page has been added to your \$1\ 
collection.,
gather-new-collection-failed-toast: There was a problem creating 
your \$1\ collection.,
gather-add-failed-toast: There was a problem adding the item to your 
\$1\ collection.,
-   gather-add-to-collection-summary: Would you like to add $1 to a 
collection?,
+   gather-add-title-invalid-toast: There was an issue with the title 
you entered. Please try something else,
+   gather-add-to-collection-summary: Add $1 to a collection of articles 
you can share with the world!,
gather-add-to-collection-confirm: Add to collection,
gather-add-to-collection-cancel: No thanks,
gather-remove-toast: The page has been removed from your \$1\ 
collection.,
@@ -70,7 +71,7 @@
gather-public: Public,
gather-article-count: $1 {{PLURAL:$1|page|pages}},
gather-empty: Nothing in this collection yet...,
-   gather-empty-footer: I don't know how you got here but this is a sad 
place.,
+   gather-empty-footer: Create a collection by clicking on the star 
icon while reading a $1 article.,
gather-edit-button: Edit,
gather-delete-button: Delete,
right-gather-hidelist: Force a public user list to become hidden,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 5d58ec4..4f177a1 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -55,6 +55,7 @@
gather-add-toast: Message displayed when you add an item to a 
collection. Parameters:\n* $1 - Name of collection.,
gather-new-collection-failed-toast: Message displayed when creating 
a new collection fails. Parameters:\n* $1 - Name of collection.,
gather-add-failed-toast: Message displayed when adding an item to a 
collection fails. Parameters:\n* $1 - Name of collection.,
+   gather-add-title-invalid-toast: Message displayed to a user when 
editing or creating a collection fails because of an invalid title.,
gather-add-to-collection-summary: Text for a tutorial overlay 
presented to a user the first time they see the collections watchstar asking 
them if they would like to add the current page to a 
collection.\n\nParameters:\n* $1 - page title,
gather-add-to-collection-confirm: Label for button that user can 
click if they would like to add the current page to a collection,
gather-add-to-collection-cancel: Label for button that user can 
click if they do not want to add to a collection.\n{{Identical|No thanks}},
@@ -75,7 +76,7 @@
gather-public: Label for a collection when it is publicly 
visible\n{{Identical|Public}},
gather-article-count: Expression of the number of pages in a 
collection. Parameter:\n* $1 - number of pages in the 
collection\n{{Identical|Page}},
gather-empty: Message shown on an empty rendered collection on 
[[Special:Gather]].,
-   gather-empty-footer: Footnote shown on an empty rendered collection 
on [[Special:Gather]].,
+   gather-empty-footer: Footnote shown on an empty collection on 
[[Special:Gather]] which instructs to the user how to add articles to a 
collection on their wiki. \nParameters: $1 - Name of site,
gather-edit-button: Label for a button that enables editing a 
collection.\n{{Identical|Edit}},
gather-delete-button: Label for a button that enables deleting a 
collection.\n{{Identical|Delete}},
right-gather-hidelist: With gather, users can create lists and make 
them public. This right gives admins a way to hide or restore a list that 
violates WP policy.\n\n{{Doc-right|gather-hidelist}},
diff --git a/includes/views/Collection.php 

[MediaWiki-commits] [Gerrit] WIP: Add to collection from search - change (mediawiki...Gather)

2015-04-01 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: WIP: Add to collection from search
..

WIP: Add to collection from search

bug: T90991
Change-Id: I5e91476c256cdf9a63a91b482146248d081d2287
---
M resources/Resources.php
M resources/ext.gather.collection.editor/CollectionEditOverlay.js
M resources/ext.gather.collection.editor/content.hogan
A resources/ext.gather.search/CollectionPageList.js
A resources/ext.gather.search/CollectionPageListItem.hogan
A resources/ext.gather.search/CollectionSearchOverlay.js
6 files changed, 202 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/62/201362/1

diff --git a/resources/Resources.php b/resources/Resources.php
index bd74619..ddacc55 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -154,6 +154,7 @@
 
'ext.gather.collection.editor' = 
$wgGatherResourceFileModuleBoilerplate + array(
'dependencies' = array(
+   'ext.gather.search',
'ext.gather.logging',
'mobile.overlays',
'mobile.toast',
@@ -178,6 +179,23 @@
),
),
 
+   'ext.gather.search' = $wgGatherResourceFileModuleBoilerplate + array(
+   'dependencies' = array(
+   'mobile.search',
+   'ext.gather.watchstar',
+   ),
+   'templates' = array(
+   'CollectionPageListItem.hogan' = 
'ext.gather.search/CollectionPageListItem.hogan',
+   ),
+   'messages' = array(
+   'mobile-frontend-watchlist-modified'
+   ),
+   'scripts' = array(
+   'ext.gather.search/CollectionPageList.js',
+   'ext.gather.search/CollectionSearchOverlay.js',
+   ),
+   ),
+
'ext.gather.collection.delete' = 
$wgGatherResourceFileModuleBoilerplate + array(
'dependencies' = array(
'ext.gather.collection.base',
diff --git a/resources/ext.gather.collection.editor/CollectionEditOverlay.js 
b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
index 482f6da..94afce2 100644
--- a/resources/ext.gather.collection.editor/CollectionEditOverlay.js
+++ b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
@@ -3,6 +3,7 @@
var CollectionEditOverlay,
toast = M.require( 'toast' ),
CollectionsApi = M.require( 
'ext.gather.watchstar/CollectionsApi' ),
+   CollectionSearchOverlay = M.require( 
'ext.gather.search/CollectionSearchOverlay' ),
Overlay = M.require( 'Overlay' ),
SchemaGather = M.require( 'ext.gather.logging/SchemaGather' ),
schema = new SchemaGather(),
@@ -35,7 +36,8 @@
} ),
/** @inheritdoc */
events: $.extend( {}, Overlay.prototype.events, {
-   'click .save': 'onSaveClick'
+   'click .save': 'onSaveClick',
+   'click .collectionSearchInput': 
'onCollectionSearchInput'
} ),
/** @inheritdoc */
templatePartials: $.extend( {}, 
Overlay.prototype.templatePartials, {
@@ -88,6 +90,15 @@
 
},
/**
+* Reveal the search overlay
+* @param {jQuery.Event} ev
+* @ignore
+*/
+   onCollectionSearchInput: function () {
+   var collection = this.options.collection;
+   new CollectionSearchOverlay( { collection: collection } 
).show();
+   },
+   /**
 * Tests if title is valid
 * @param {[type]} title Proposed collection title
 * @returns {Boolean}
diff --git a/resources/ext.gather.collection.editor/content.hogan 
b/resources/ext.gather.collection.editor/content.hogan
index 94a3ab4..58a8ed5 100644
--- a/resources/ext.gather.collection.editor/content.hogan
+++ b/resources/ext.gather.collection.editor/content.hogan
@@ -1,3 +1,4 @@
+input class=collectionSearchInput type=text
 div class=content
{{#collection}}
label{{nameLabel}}/label
diff --git a/resources/ext.gather.search/CollectionPageList.js 
b/resources/ext.gather.search/CollectionPageList.js
new file mode 100644
index 000..b3ce036
--- /dev/null
+++ b/resources/ext.gather.search/CollectionPageList.js
@@ -0,0 +1,52 @@
+( function ( M, $ ) {
+
+   var PageList = M.require( 'modules/PageList' ),
+   View = M.require( 'View' ),
+   Icon = M.require( 'Icon' ),
+   CollectionPageList;
+
+   /**
+* List of items page view
+* @class PageList
+* 

  1   2   3   4   5   >