Page MenuHomePhabricator

Echo congratulations thresholds shouldn't be hard-coded
Closed, DeclinedPublic

Description

https://github.com/wikimedia/mediawiki-extensions-Echo/blob/dff7e8072/Hooks.php#L450

$thresholds = array( 1, 10, 100, 1000 );

These congratulations thresholds should be configurable instead of being hard-coded. Some wikis might want to use different values (e.g., Wikidata).

Event Timeline

Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptFeb 18 2016, 2:45 PM
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald Transcript
Haritha28 added a subscriber: Haritha28.

Change 272308 had a related patch set uploaded (by Haritha28):
Echo congragulations threshold should'nt be hardcoded

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

Haritha28 moved this task from Backlog to Doing on the good first task board.Feb 21 2016, 5:29 AM

These congratulations thresholds should be configurable instead of being hard-coded. Some wikis might want to use different values (e.g., Wikidata).

I'm just about OK with us adding this functionality to the extension, though this product change was explicitly designed with denary back-off, but I'm not OK with us providing a terrible experience for users by letting these thresholds be altered on Wikimedia wikis. The array (which shouldn't have been added without code review, cough cough) is the trivial part of this; any local changes would need to be accompanied with 300 i18n local changes into the MediaWiki namespace, which never actually happens (and there's no TWN system per wiki, sadly).

Given that scenario, do you think you still want this change?

The array (which shouldn't have been added without code review, cough cough) is the trivial part of this; any local changes would need to be accompanied with 300 i18n local changes into the MediaWiki namespace, which never actually happens (and there's no TWN system per wiki, sadly).

Given that scenario, do you think you still want this change?

Oh. I now see how this was implemented. Yikes.

One option might be to make the message keys more generic. notification-header-thank-you-1-edit and notification-header-thank-you-10-edit could be notification-header-thank-you-A-edit and notification-header-thank-you-B-edit (or even 1-edit and 2-edit).

The array (which shouldn't have been added without code review, cough cough) is the trivial part of this; any local changes would need to be accompanied with 300 i18n local changes into the MediaWiki namespace, which never actually happens (and there's no TWN system per wiki, sadly).

Given that scenario, do you think you still want this change?

Oh. I now see how this was implemented. Yikes.

One option might be to make the message keys more generic. notification-header-thank-you-1-edit and notification-header-thank-you-10-edit could be notification-header-thank-you-A-edit and notification-header-thank-you-B-edit (or even 1-edit and 2-edit).

Sure, you could go and build a different product, but that's intentionally not the one we built. :-) Re-writing all the "Well done on your tenth edit" messages to be "Well done on your {{PLURAL:Nth edit}}" isn't the objective.

Ltrlg added a subscriber: Ltrlg.Feb 24 2016, 2:27 PM
Jdforrester-WMF closed this task as Declined.Mar 7 2016, 10:58 PM

Per discussion.

Part of my confusion here was that when I looked at https://gerrit.wikimedia.org/r/264900 and saw that it got merged, I was like "that's just the functionality, not the actual thresholds, I looked in Echo.php and everything." And then Lego was like "nope!" and I was like "wtf why are these thresholds hardcoded in Hooks.php?"

I'm fine with a decline of this for now. Denary back-off or not, I think some wikis will want to customize the thresholds, but I don't have a strong enough use-case currently.

There's been separate discussion of moving this code into the Thanks extension, if we end up merging a lot of the Echo code into MediaWiki core.

Change 272308 abandoned by TheDJ:
Echo congragulations threshold should'nt be hardcoded

Reason:
Abandon, per task discussion

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

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptNov 17 2017, 3:04 PM