JGonera has uploaded a new change for review.
https://gerrit.wikimedia.org/r/93012
Change subject: Remove uploads CTA
......................................................................
Remove uploads CTA
Change-Id: Ic74a689d1d45b108b02f5326297caf3b04c172c8
---
M MobileFrontend.i18n.php
M includes/Resources.php
M javascripts/modules/uploads/PhotoUploaderButton.js
M javascripts/modules/uploads/lead-photo-init.js
4 files changed, 3 insertions(+), 26 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/12/93012/1
diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 90470ba..3dc0dcc 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -271,7 +271,6 @@
'mobile-frontend-photo-cancel' => 'Cancel',
'mobile-frontend-photo-upload-user-count' =>
'{{PLURAL:$1|<span>1</span> upload|<span>$1</span> uploads}}',
'mobile-frontend-photo-upload-user-count-over-limit' => '500+ uploads',
- 'mobile-frontend-photo-upload-cta' => 'Please login or sign up to add
an image.',
'mobile-frontend-photo-upload-login' => 'You must be logged in to add
an image.',
'mobile-frontend-image-heading-describe' => "'''Describe''' image",
'mobile-frontend-image-uploading' => "'''Uploading''' image...",
diff --git a/includes/Resources.php b/includes/Resources.php
index 46230a5..89d2fae 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -573,9 +573,6 @@
'mobile-frontend-drawer-cancel',
'mobile-frontend-overlay-escape',
- // PhotoUploaderButton.js
- 'mobile-frontend-photo-upload-cta',
-
// LearnMoreOverlay.js, newbie.js
'cancel',
diff --git a/javascripts/modules/uploads/PhotoUploaderButton.js
b/javascripts/modules/uploads/PhotoUploaderButton.js
index eb413d9..30364dd 100644
--- a/javascripts/modules/uploads/PhotoUploaderButton.js
+++ b/javascripts/modules/uploads/PhotoUploaderButton.js
@@ -1,7 +1,6 @@
( function( M, $ ) {
var View = M.require( 'view' ),
popup = M.require( 'notifications' ),
- CtaDrawer = M.require( 'CtaDrawer' ),
PhotoUploaderButton,
LeadPhotoUploaderButton;
@@ -83,23 +82,7 @@
},
postRender: function() {
- var self = this, $input = this.$( 'input' ), ctaDrawer;
-
- // show CTA instead if not logged in
- if ( !M.isLoggedIn() ) {
- ctaDrawer = new CtaDrawer( {
- content: mw.msg(
'mobile-frontend-photo-upload-cta' ),
- queryParams: {
- campaign:
'mobile_uploadPageActionCta',
- returntoquery:
'article_action=photo-upload'
- }
- } );
- this.$el.click( function( ev ) {
- ctaDrawer.show();
- ev.preventDefault();
- } );
- return;
- }
+ var self = this, $input = this.$( 'input' );
$input.
// accept must be set via attr otherwise cannot
use camera on Android
diff --git a/javascripts/modules/uploads/lead-photo-init.js
b/javascripts/modules/uploads/lead-photo-init.js
index 4850639..e50a26f 100644
--- a/javascripts/modules/uploads/lead-photo-init.js
+++ b/javascripts/modules/uploads/lead-photo-init.js
@@ -2,7 +2,6 @@
var
funnel = $.cookie( 'mwUploadsFunnel' ) || 'article',
- showCta = mw.config.get( 'wgMFEnablePhotoUploadCTA' ) || funnel
=== 'nearby',
popup = M.require( 'notifications' ),
LeadPhotoUploaderButton = M.require(
'modules/uploads/LeadPhotoUploaderButton' ),
PhotoUploaderButton = M.require(
'modules/uploads/PhotoUploaderButton' ),
@@ -12,7 +11,7 @@
return $container.find( mw.config.get(
'wgMFLeadPhotoUploadCssSelector' ) ).length === 0;
}
- // reset the funnel cookie as it is no longer valid (this stops upload
cta showing on further page loads)
+ // reset the funnel cookie as it is no longer valid
if ( funnel ) {
$.cookie( 'mwUploadsFunnel', null );
}
@@ -30,8 +29,7 @@
isEditable = mw.config.get( 'wgIsPageEditable' ),
validNamespace = ( M.inNamespace( '' ) ||
M.inNamespace( 'user' ) );
- if ( !M.isLoggedIn() && !showCta ) {
- // Note with the CTA this is unnecessary but the new
nav requires showing the upload button at all times
+ if ( !M.isLoggedIn() ) {
return makeDisabledButton(
'mobile-frontend-photo-upload-anon' );
} else if ( !isEditable ) {
return makeDisabledButton(
'mobile-frontend-photo-upload-protected' );
--
To view, visit https://gerrit.wikimedia.org/r/93012
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic74a689d1d45b108b02f5326297caf3b04c172c8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits