Page MenuHomePhabricator

Server-launched guided tour can show on the wrong page if the user navigates away before full page load
Closed, ResolvedPublic

Description

The issue is minor - there are two edge cases where guided tours popups are displayed unnecessary:

(1) "Introducing: New Filters for Edit Review (beta)" should be dismissed explicitly

  1. On testwiki, login as a user who does not enable "New filters for edit review" beta feature.
  2. Go to Preferences-Beta and enable "New filters for edit review"
  3. Go to RC page and observe "Introducing: New Filters for Edit Review (beta)" popup - do not click on 'Got it!' or on 'No thanks'.

If you do one of the following

  • click on Watchlist link (in the navigation menu)
  • Log out
  • Log out and then log in again (if the land page is RC)

You will see "Introducing: New Filters for Edit Review (beta)" popup displayed.

Screen Shot 2017-06-07 at 11.29.23 AM.png (481×898 px, 103 KB)

Screen Shot 2017-06-07 at 11.09.17 AM.png (645×1 px, 171 KB)

(2) "New beta feature available for this page" popup appears on the page with already enabled RC filters.

  1. As a user who never enabled "New filters for edit review" beta feature, log in to betalabs.
  2. Go to Beta features and enable "New filters for edit review"
  3. Click on the 'Recent changes' link on the left. On RC page the popup will be displayed.
    Screen Shot 2017-06-07 at 10.22.00 AM.png (653×1 px, 184 KB)

Event Timeline

Can not reproduce.

Please clear all cookies then try again.

If you can still reproduce, let's schedule a meeting to do a screen share.

The issue is reproducible only when the connection is slow, so a user is able to navigate to other pages before the popup is fully loaded. I attached the screen recording to illustrate it.

More screenshots:

Screen Shot 2017-06-22 at 11.22.47 PM.png (562×1 px, 193 KB)

Screen Shot 2017-06-22 at 10.19.25 PM.png (679×1 px, 175 KB)

Okay, I think I know what it is.

I don't think it's a regression (both since I think I identified it, and the only change to the code in wmf/1.30.0-wmf.4 is rEGTOfac5ddd92955: Add phpcs and make pass

I think the user is navigating away before https://phabricator.wikimedia.org/diffusion/EGTO/browse/master/modules/ext.guidedTour.lib/ext.guidedTour.lib.Step.js;94b34bbfd7e9841447b3584c0c481f09b12973d7$641 runs.

This could be fixed by adding showConditionally support to the server (GuidedTourLauncher) with stickToFirstPage.

This should take a Title object as a parameter. Note that the firstSpecialPageName format in the cookie needs to match wgPageName, which is localized and getPrefixedDBKey (Especial:CambiosRecientes). So we should call fixSpecialName. (Or the client-side could canonicalize it, but I think this is easier).

Mattflaschen-WMF renamed this task from [regression-1.30.0-wmf.4]Persistence of guided tours to Server-launched guided tour can show on the wrong page if the user navigates away before full page load.Jun 22 2017, 10:27 PM

@Mooeypoo reports this, or a similar issue, happening today on mw.org

Considering a lot of people are going to see the intro tour upon beta graduation, we may want to prioritize this higher if we have some time.

Change 377915 had a related patch set uploaded (by Mooeypoo; owner: Mooeypoo):
[mediawiki/extensions/WikimediaMessages@master] [wip] RCFilters tours: Only load on specific page

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

Change 378827 had a related patch set uploaded (by Mattflaschen; owner: Mattflaschen):
[mediawiki/extensions/GuidedTour@master] Allow directly launching tour from server without ?tour= or cookies

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

Change 378827 merged by jenkins-bot:
[mediawiki/extensions/GuidedTour@master] Allow directly launching tour from server without ?tour= or cookies

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

Change 377915 merged by jenkins-bot:
[mediawiki/extensions/WikimediaMessages@master] RCFilters tours: Only load on specific page

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

Change 378835 had a related patch set uploaded (by Mattflaschen; owner: Mattflaschen):
[mediawiki/extensions/GuidedTour@wmf/1.30.0-wmf.18] Allow directly launching tour from server without ?tour= or cookies

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

Change 378836 had a related patch set uploaded (by Mattflaschen; owner: Mooeypoo):
[mediawiki/extensions/WikimediaMessages@wmf/1.30.0-wmf.18] RCFilters tours: Only load on specific page

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

Change 378835 merged by jenkins-bot:
[mediawiki/extensions/GuidedTour@wmf/1.30.0-wmf.18] Allow directly launching tour from server without ?tour= or cookies

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

Change 378836 merged by jenkins-bot:
[mediawiki/extensions/WikimediaMessages@wmf/1.30.0-wmf.18] RCFilters tours: Only load on specific page

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

Stashbot added a subscriber: Stashbot.

Mentioned in SAL (#wikimedia-operations) [2017-09-19T15:33:35Z] <catrope@tin> Started scap: core, GuidedTour and WikimediaMessages patches for T176191, T167262 and T175765

Mentioned in SAL (#wikimedia-operations) [2017-09-19T15:54:08Z] <catrope@tin> Finished scap: core, GuidedTour and WikimediaMessages patches for T176191, T167262 and T175765 (duration: 20m 32s)

Checked in betalabs along with checking T169613: Introduce the New Filters to users upon beta graduation - the guided tour appears only on the pages that it's supposed to be.