Page MenuHomePhabricator

When Suggested edits are unavailable, new Impact module stays in unactivated state
Closed, ResolvedPublic

Description

The impact module displays the number of views for articles recently edited. At the moment, the only non-Wikipedia wiki that uses this impact module is French Wiktionary.
A new impact module has recently been designed by the Growth team. It can be tested using ?new-impact=1 in the homepage URL.

The old impact module looks like this:
https://fr.wiktionary.org/wiki/Sp%C3%A9cial:Accueil_de_l%E2%80%99espace_personnel It returns top 5 most read entries:

20220427_193946-0506f.jpg (394×671 px, 56 KB)

The new impact module looks like this:
https://fr.wiktionary.org/wiki/Sp%C3%A9cial:Accueil_de_l%E2%80%99espace_personnel?new-impact=1
It returns no edits:

Capture d’écran_2023-02-08_16-44-41.png (471×676 px, 77 KB)

This is caused by NewImpact::getState requiring loading user to have access to Suggested edits in order for new impact module to show data at Special:Homepage. See T329192#8634963 for some additional details.

Event Timeline

In theory, getting data on any view of my impact module should give me the same result everywhere.

So I checked again and
https://fr.wiktionary.org/wiki/Sp%C3%A9cial:Impact/Trizek?new-impact=1 the public view works,
https://fr.wiktionary.org/wiki/Sp%C3%A9cial:Accueil_de_l%E2%80%99espace_personnel?new-impact=1, displayed on the Homepage, isn't working.

Can you clarify? Are you saying it still looks like this?

Capture d’écran_2023-02-08_16-44-41.png (471×676 px, 77 KB)

The conditions for showing new impact module activated (ie. non-empty) in the Homepage are:

  • user has access to Suggested edits, AND
  • user has at least one edit

For fr.wiktionary, the first condition is not true (it is the only Growth projects with this configuration; see wgGEHomepageSuggestedEditsEnabled in the config repo). Removing the first condition (NewImpact.php:330) should bring new Impact module to life. Not sure what other consequences that might have.

This seems to be a bug in behavior requested in T321963 (different footer in the new Impact module if Suggested edits are unavailable), see 59b28fc26e and 53819f929d for commits introducing this behavior.

Urbanecm_WMF renamed this task from New impact module lists no edits on Wiktionary to When Suggested edits are unavailable, new Impact module stays in unactivated state.Feb 21 2023, 9:51 PM
Urbanecm_WMF updated the task description. (Show Details)

Change 891657 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] User impact: show the module on its activated state for wikis without suggested edits enabled

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

In theory, getting data on any view of my impact module should give me the same result everywhere.

Right

So I checked again and
https://fr.wiktionary.org/wiki/Sp%C3%A9cial:Impact/Trizek?new-impact=1 the public view works,

That's because you used your username in the URL Special:Impact/<username> and that passed the third check (explained below) showing the module activated

https://fr.wiktionary.org/wiki/Sp%C3%A9cial:Accueil_de_l%E2%80%99espace_personnel?new-impact=1, displayed on the Homepage, isn't working.

That's because in the homepage the third check (explained below) does not pass, hence the module shows unactivated.

The conditions for showing new impact module activated (ie. non-empty) in the Homepage are:

  • user has access to Suggested edits, AND
  • user has at least one edit

There's a third one:

  • the data should be shown with third person texts ($this->shouldShowForOtherUser())

Which is whether the user requesting the data is different from the owner of the data (aka visit Special:Impact/<username> where the username is not yours! ). When the user requesting and owning the data via Special:Impact/<username> are the same we're forcing this condition to be true.

I have removed the user has access to suggested edits check because it does not seem relevant for the purpose of using the impact module.

[...]

The conditions for showing new impact module activated (ie. non-empty) in the Homepage are:

  • user has access to Suggested edits, AND
  • user has at least one edit

There's a third one:

  • the data should be shown with third person texts ($this->shouldShowForOtherUser())

That is correct (I included that requirement implicitly by saying "new impact module in the Homepage", as there's no way to use a different username while you're in the Homepage).

I have removed the user has access to suggested edits check because it does not seem relevant for the purpose of using the impact module.

Sounds reasonable :).

Change 891657 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] User impact: show the module on its activated state for wikis without suggested edits enabled

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

kostajh triaged this task as Medium priority.Mar 1 2023, 8:31 PM
Etonkovidova subscribed.

Checked frwiktionary wmf.25 - the Homepage for a user without any edits displays the following Impact module.

Screen Shot 2023-03-02 at 6.21.55 PM.png (1×1 px, 100 KB)

@Trizek-WMF - can you check how the activated Impact module looks like for a logged in user?

I now see the new impact module at French Wiktionary. Thank you everyone!