Page MenuHomePhabricator

Impact Module Extensibility: allow transcluding Special:Impact on wikitext pages with {{Special:Impact/username}}
Closed, ResolvedPublicFeature

Description

Following up from T217281, this is a feature request to allow transcluding Special:Impact on wikitext pages with {{Special:Impact/username}}

Notes on implementation:

  1. usages of "your", "you", "you've", etc need to be replaced so it's clear the impact data is for the user that it's rendered for
  2. We'd need to update the stats on page load using JS, as otherwise they are valid as of the time the special page was transcluded
  3. [...] any number of other things I haven't thought of

Event Timeline

kostajh changed the subtype of this task from "Task" to "Feature Request".Mar 22 2019, 7:07 PM
KStoller-WMF renamed this task from Homepage: Make Special:Impact includable so it can be transcluded on pages to Impact Module Extensibility: Make Impact Module includable so it can be transcluded on pages.Jul 18 2022, 11:24 PM
KStoller-WMF renamed this task from Impact Module Extensibility: Make Impact Module includable so it can be transcluded on pages to Impact Module Extensibility: allow transcluding Special:Impact on wikitext pages with {{Special:Impact/username}}.Jul 18 2022, 11:30 PM
KStoller-WMF subscribed.

Removing T222310 as parent tasks since it was decided that client rendering will make this task too complex to include it as an extensibility goal for the new impact module / positive reinforcement work.

Removing T222310 as parent tasks since it was decided that client rendering will make this task too complex to include it as an extensibility goal for the new impact module / positive reinforcement work.

It seems to mostly "just work":

image.png (1×2 px, 262 KB)

The relevant code is setting isIncludable() { return true; } on SpecialImpact.php.

usages of "your", "you", "you've", etc need to be replaced so it's clear the impact data is for the user that it's rendered for

One easy way to fix this is to just remove "Your" from the strings in all scenarios, so "Your impact" becomes "Impact", and "Your recent activity" becomes "Recent activity". That has the benefit of working better for smaller screens, too.

We'd need to update the stats on page load using JS, as otherwise they are valid as of the time the special page was transcluded

We are always fetching and rendering data via the client-side, so this isn't a concern like it was with the older Impact module where we server-side rendered the content.

kostajh moved this task from Inbox to Triaged on the Growth-Team board.

@KStoller-WMF I'm moving this to Triaged, but if you want the one-line patch to allow users to embed {{Special:Impact/SomeUser}}, we can do that very easily.

Exciting, thanks for letting me know that this is relatively low effort! Let's get the initial version out before we tackle that work, but I definitely want to consider this for the second iteration!

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

[mediawiki/extensions/GrowthExperiments@master] User impact: allow to transclude Special:Impact/username

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

Is there a use case for this? I can't see how it would be used.

Is there a use case for this? I can't see how it would be used.

I believe the primary use case is someone who wants to embed the impact module on their userpage, to highlight their impact data to others.

Sgs changed the task status from Open to In Progress.Jun 29 2023, 2:42 PM

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

[mediawiki/extensions/GrowthExperiments@master] User impact: increase request rate limits for impact data

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

Change 935437 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] User impact: increase request rate limits for impact data

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

Change 878179 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] User impact: allow to transclude Special:Impact/<username>

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

Sgs changed the task status from In Progress to Open.Jul 12 2023, 12:26 PM
Sgs moved this task from Code Review to QA on the Growth-Team (Sprint 0 (Growth Team)) board.
Etonkovidova subscribed.

Checked on testwiki wmf.18 - the "your" and "you" etc have been removed for transcluded Impact module as per the following requirement:

usages of "your", "you", "you've", etc need to be replaced so it's clear the impact data is for the user that it's rendered for

Impact module on HomepageTranscluded on User page
Screen Shot 2023-07-21 at 1.31.03 PM.png (1×958 px, 149 KB)
Screen Shot 2023-07-21 at 1.30.29 PM.png (1×2 px, 185 KB)