jenkins-bot has submitted this change and it was merged.

Change subject: Make LeftNavEditTutorial no longer an A/B test
......................................................................


Make LeftNavEditTutorial no longer an A/B test

We now display the LeftNavEditTutorial to all new users who sign-up
from the left nav sidebar.

Also removing eventTracking code that is no longer needed.

Change-Id: I7a861dfd9854a069d662386c6173a3c82268168f
---
M i18n/en.json
M i18n/qqq.json
M includes/MobileFrontend.hooks.php
M includes/Resources.php
M includes/skins/UserLoginMobileTemplate.php
D javascripts/loggingSchemas/mobileLeftNavbarEditCTA.js
M javascripts/modules/editor/EditorOverlay.js
M javascripts/modules/tutorials/newbieEditor.js
8 files changed, 8 insertions(+), 78 deletions(-)

Approvals:
  Siebrand: Looks good to me, but someone else must approve
  MaxSem: Looks good to me, but someone else must approve
  JGonera: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/i18n/en.json b/i18n/en.json
index f7f7c65..338d81f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -81,10 +81,9 @@
     "mobile-frontend-editor-summary-request": "How did you improve the page?",
     "mobile-frontend-editor-switch-confirm": "You must save your edit before 
switching to another editing mode.",
     "mobile-frontend-editor-switch-editor": "Switch editor",
-    "mobile-frontend-editor-tutorial-alt-summary": "Why not improve $1? Don't 
be afraid of the markup!",
     "mobile-frontend-editor-tutorial-cancel": "No, thanks",
     "mobile-frontend-editor-tutorial-confirm": "Start editing",
-    "mobile-frontend-editor-tutorial-summary": "Don't be scared of markup. Try 
improving the $1 page.",
+    "mobile-frontend-editor-tutorial-summary": "Try improving the $1 page. 
Don't be scared of markup.",
     "mobile-frontend-editor-unavailable": "Mobile editing is not currently 
available on your browser. Please try a different browser.",
     "mobile-frontend-editor-unavailable-header": "Editor unavailable",
     "mobile-frontend-editor-undo-unsupported": "Undo is not currently 
supported on mobile devices.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 32b6a5f..57eb699 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -106,7 +106,6 @@
        "mobile-frontend-editor-summary-request": "Header above edit summary 
input field asking the user to summarize the changes they made to the page.",
        "mobile-frontend-editor-switch-confirm": "Warning message telling the 
user they must save their changes before switching to a different editing 
interface.",
        "mobile-frontend-editor-switch-editor": "Label for button that allows 
the user to switch between two different editing interfaces",
-       "mobile-frontend-editor-tutorial-alt-summary": "Identical to 
{{msg-mw|Mobile-frontend-editor-tutorial-confirm}}, however shows when the user 
has not expressed an intent to edit so language is more 
suggestive.\n\nParameters:\n* $1 - page title\nSee also:\n* 
{{msg-mw|Mobile-frontend-editor-tutorial-summary}}",
        "mobile-frontend-editor-tutorial-cancel": "Label for button that user 
can click if they do not want to edit.\n{{Identical|No thanks}}",
        "mobile-frontend-editor-tutorial-confirm": "Text for the button a user 
clicks after they have read the editing tutorial and are ready to edit the 
page.\n\nSee also:\n* {{msg-mw|Mobile-frontend-editor-tutorial-summary}}",
        "mobile-frontend-editor-tutorial-summary": "Text for tutorial overlay 
presented to a user the first time they try to edit a page.\n\nParameters:\n* 
$1 - page title\nSee also:\n* 
{{msg-mw|Mobile-frontend-editor-tutorial-alt-summary}}",
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 8a638a2..97e3448 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -789,15 +789,10 @@
                                'schema' => 'MobileWebClickTracking',
                                'revision' => 5929948,
                        ),
-                       'schema.MobileLeftNavbarEditCTA' => array(
-                               'schema' => 'MobileLeftNavbarEditCTA',
-                               'revision' => 7074652,
-                       ),
                );
 
                $scripts = array(
                        'javascripts/loggingSchemas/mobileWebEditing.js',
-                       'javascripts/loggingSchemas/mobileLeftNavbarEditCTA.js',
                        'javascripts/loggingSchemas/MobileWebClickTracking.js',
                );
                if ( class_exists( 'ResourceLoaderSchemaModule' ) ) {
diff --git a/includes/Resources.php b/includes/Resources.php
index 7ea2094..4bad577 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -737,7 +737,6 @@
                'messages' => array(
                        // newbieEditor.js
                        'mobile-frontend-editor-tutorial-summary',
-                       'mobile-frontend-editor-tutorial-alt-summary',
                        'mobile-frontend-editor-tutorial-confirm',
                        'mobile-frontend-editor-tutorial-cancel',
                ),
diff --git a/includes/skins/UserLoginMobileTemplate.php 
b/includes/skins/UserLoginMobileTemplate.php
index 2275099..ba2fabc 100644
--- a/includes/skins/UserLoginMobileTemplate.php
+++ b/includes/skins/UserLoginMobileTemplate.php
@@ -42,7 +42,7 @@
                if ( isset( $actionQuery['returntoquery'] ) ) {
                        $query['returntoquery'] = $actionQuery['returntoquery'];
                        // Allow us to distinguish sign ups from the left nav 
to logins.
-                       // This allows us to apply story 1402 A/B test.
+                       // This allows us to show them an edit tutorial when 
they return to the page.
                        if ( $query['returntoquery'] === 'welcome=yes' ) {
                                $query['returntoquery'] = 
'campaign=leftNavSignup';
                        }
diff --git a/javascripts/loggingSchemas/mobileLeftNavbarEditCTA.js 
b/javascripts/loggingSchemas/mobileLeftNavbarEditCTA.js
deleted file mode 100644
index e725e4d..0000000
--- a/javascripts/loggingSchemas/mobileLeftNavbarEditCTA.js
+++ /dev/null
@@ -1,19 +0,0 @@
-( function( M, $ ) {
-
-       function log( data ) {
-               var options = {
-                       userId: mw.config.get( 'wgUserId' ),
-                       bucket: M.isTestA ? 'test' : 'control',
-                       mobileMode: mw.config.get( 'wgMFMode' ),
-                       pageId: mw.config.get( 'wgArticleId' ),
-                       pageNamespace: mw.config.get( 'wgNamespaceNumber' ),
-                       isEditable: mw.config.get( 'wgIsPageEditable' ),
-                       revId: mw.config.get( 'wgRevisionId' )
-               };
-               return M.log( 'MobileLeftNavbarEditCTA', $.extend( options, 
data ) );
-       }
-
-       M.define( 'loggingSchemas/mobileLeftNavbarEditCTA', {
-               log: log
-       } );
-} )( mw.mobileFrontend, jQuery );
diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index 248cc56..88b216d 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -6,11 +6,9 @@
                        mw.config.get( 'wgVisualEditorConfig' 
).namespaces.indexOf( mw.config.get( 'wgNamespaceNumber' ) ) > -1 &&
                        mw.config.get( 'wgTranslatePageTranslation' ) !== 
'translation' &&
                        mw.config.get( 'wgPageContentModel' ) === 'wikitext',
-               inNavSignupCampaign = M.query.campaign === 'leftNavSignup',
                Section = M.require( 'Section' ),
                EditorApi = M.require( 'modules/editor/EditorApi' ),
                AbuseFilterPanel = M.require( 'modules/editor/AbuseFilterPanel' 
),
-               mobileLeftNavbarEditCTA = M.require( 
'loggingSchemas/mobileLeftNavbarEditCTA' ),
                EditorOverlay;
 
        /**
@@ -85,12 +83,6 @@
                        }
 
                        this._loadContent();
-                       if ( inNavSignupCampaign ) {
-                               // Log edit page impression
-                               mobileLeftNavbarEditCTA.log( {
-                                       action: 'page-edit-impression'
-                               } );
-                       }
                },
 
                _prepareForSave: function() {
@@ -202,11 +194,6 @@
                                options.captchaWord = this.$( '.captcha-word' 
).val();
                        }
 
-                       if ( inNavSignupCampaign ) {
-                               mobileLeftNavbarEditCTA.log( {
-                                       action: 'page-save-attempt',
-                               } );
-                       }
                        this._showHidden( '.saving-header' );
 
                        this.api.save( options ).
@@ -218,11 +205,6 @@
                                                return;
                                        }
 
-                                       if ( inNavSignupCampaign ) {
-                                               mobileLeftNavbarEditCTA.log( {
-                                                       action: 
'page-save-success',
-                                               } );
-                                       }
                                        self.onSave();
                                } ).
                                fail( function( data ) {
diff --git a/javascripts/modules/tutorials/newbieEditor.js 
b/javascripts/modules/tutorials/newbieEditor.js
index 6bf92b4..5ce23cf 100644
--- a/javascripts/modules/tutorials/newbieEditor.js
+++ b/javascripts/modules/tutorials/newbieEditor.js
@@ -13,22 +13,19 @@
 ( function( M, $ ) {
        var PageActionOverlay = M.require( 
'modules/tutorials/PageActionOverlay' ),
                user = M.require( 'user' ),
-               schema = M.require( 'loggingSchemas/mobileLeftNavbarEditCTA' ),
                escapeHash = M.escapeHash,
                inEditor = window.location.hash.indexOf( '#editor/' ) > - 1,
                hash = window.location.hash,
-               // Whether or not the user was just redirected from a leftNav 
signup
-               leftNavSignup = !user.isAnon() && M.query.campaign === 
'leftNavSignup' &&
-                       mw.config.get( 'wgNamespaceNumber' ) === 0 && !inEditor,
-               // Whether or not the user should actually see the guider 
(currently an A/B test)
-               shouldShowLeftNavEditTutorial = leftNavSignup && M.isTestA &&
+               // Whether or not the user should see the leftNav guider
+               shouldShowLeftNavEditTutorial = !user.isAnon() &&
+                       M.query.campaign === 'leftNavSignup' &&
+                       mw.config.get( 'wgNamespaceNumber' ) === 0 &&
+                       !inEditor &&
                        mw.config.get( 'wgIsPageEditable' ),
                // If the user came from an edit button signup, show guider.
                shouldShowEditTutorial = M.query.article_action === 
'signup-edit' && !inEditor &&
                        !user.isAnon() && mw.config.get( 'wgIsPageEditable' ),
                showTutorial = shouldShowEditTutorial || 
shouldShowLeftNavEditTutorial,
-               msg = shouldShowEditTutorial ? 
'mobile-frontend-editor-tutorial-summary' :
-                       'mobile-frontend-editor-tutorial-alt-summary',
                editOverlay, target, $target, href;
 
        if ( hash && hash.indexOf( '/' ) === -1 ) {
@@ -37,35 +34,20 @@
                target = '#ca-edit .edit-page';
        }
 
-       // If the user is in the leftNavSignup campaign and the page is in main 
namespace,
-       // record the page impression (even if they can't edit the page)
-       if ( leftNavSignup ) {
-               schema.log( { action: 'page-impression' } );
-       }
-
        // Note the element might have a new ID if the wikitext was changed so 
check it exists
        if ( $( target ).length > 0 && showTutorial ) {
 
                if ( shouldShowLeftNavEditTutorial ) {
-                       // Log the impression for the call-to-action
-                       schema.log( { action: 'cta-impression' } );
                        // Append the funnel name to the edit link's url
                        $target = $( target );
                        href = $target.attr( 'href' );
                        $target.attr( 'href', href + '/leftNavSignup' );
-                       // Add appropriate logging functionality to the edit 
button
-                       $target.on( M.tapEvent( 'click' ), function() {
-                               schema.log( {
-                                       action: 'page-edit-click',
-                                       clickSource: 'edit'
-                               } );
-                       } );
                }
 
                editOverlay = new PageActionOverlay( {
                        target: target,
                        className: 'slide active editing',
-                       summary: mw.msg( msg, mw.config.get( 'wgTitle' ) ),
+                       summary: mw.msg( 
'mobile-frontend-editor-tutorial-summary', mw.config.get( 'wgTitle' ) ),
                        confirmMsg: mw.msg( 
'mobile-frontend-editor-tutorial-confirm' ),
                        cancelMsg: mw.msg( 
'mobile-frontend-editor-tutorial-cancel' )
                } );
@@ -77,13 +59,6 @@
                        editOverlay.hide();
                        // Load the editing interface by changing the URL hash
                        window.location.href = $( target ).attr( 'href' );
-                       if ( shouldShowLeftNavEditTutorial ) {
-                               // Log the action
-                               schema.log( {
-                                       action: 'page-edit-click',
-                                       clickSource: 'cta'
-                               } );
-                       }
                } );
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a861dfd9854a069d662386c6173a3c82268168f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Kaldari <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to