Mattflaschen has uploaded a new change for review.

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


Change subject: Declare tour as requiring wikitext, but it doesn't work yet.
......................................................................

Declare tour as requiring wikitext, but it doesn't work yet.

Add comments about bug.

Change-Id: I9db16b60bafa0b586a55d6e12596044cde41f6d2
---
M modules/ext.guidedTour.lib.js
M modules/tours/firstedit.js
2 files changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GuidedTour 
refs/changes/35/84735/1

diff --git a/modules/ext.guidedTour.lib.js b/modules/ext.guidedTour.lib.js
index 9d8e142..6bd4d72 100644
--- a/modules/ext.guidedTour.lib.js
+++ b/modules/ext.guidedTour.lib.js
@@ -1196,6 +1196,9 @@
                        return $( '.ve-ce-documentNode[contenteditable="true"]' 
).length > 0;
                },
 
+               // TODO (mattflaschen, 2013-09-18): This doesn't work at page 
load.
+               // Should it also check mw.util.getParamValue( 'veaction' )?
+               // See showTour TODO.
                /**
                 * Checks whether VisualEditor is open
                 *
@@ -1536,6 +1539,13 @@
                                                        return 
subCookie.firstSpecialPageName === args.pageName;
                                                }
                                                break;
+                                       // XXX (mattflaschen, 2013-09-18): This 
doesn't work yet.  There
+                                       // are two scenarios:
+                                       // 1. VE is loaded at page load.  
Doesn't work because the check happens before
+                                       //   VE is loaded.
+                                       // 2. If it's a wikitext load, but the 
user transitions into VE (most common scenario)
+                                       //   it fails since shouldShowTour is 
only called when the tour is first loaded, not in
+                                       //   skipThenUpdateDisplay (or the 
wrapper around that).
                                        case 'wikitext':
                                                // Any screen that is *not* 
VisualEditor-specific
                                                // Reading, history, 
wikitext-specific screens, etc.
diff --git a/modules/tours/firstedit.js b/modules/tours/firstedit.js
index 6968673..88d9c36 100644
--- a/modules/tours/firstedit.js
+++ b/modules/tours/firstedit.js
@@ -28,6 +28,7 @@
        isVeInstalled = !!mw.libs.ve;
        gt.defineTour( {
                name: 'firstedit',
+               showConditionally: 'wikitext',
                steps: [ {
                        titlemsg: 'guidedtour-tour-firstedit-edit-page-title',
                        descriptionmsg: isVeInstalled ?

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9db16b60bafa0b586a55d6e12596044cde41f6d2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>

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

Reply via email to