Page MenuHomePhabricator

Add post-publication dialog to Wikidata editor
Closed, ResolvedPublic

Description

User story:

As an event participant who has made edits to Wikidata, I want to be able to associate my edit with the event via the post-publication dialog, so that I have an easy way of having my edits counted in the contribution statistics.

Acceptance Criteria:

  • Add post-publication dialog when editing statements in Wikidata (see details on dialog in T400953)
  • Contributions tab to be updated to display changes due to Wikidata edits
    • This only includes new statements, and edits to statements, per T411829#11525600 - new items created is out of scope for this task
Designs:

Note that these have different text depending on the use case.

  • Participant is registered for one active event:
DesktopMobile
Screenshot 2025-07-31 at 3.26.09 PM.png (336×678 px, 122 KB)
mobile (2).png (568×320 px, 49 KB)
  • Participant is registered for more than one active event:
DesktopMobile
Screenshot 2025-07-31 at 3.26.15 PM.png (386×642 px, 128 KB)
mobile (3).png (568×320 px, 51 KB)

Event Timeline

ifried renamed this task from [placeholder] Add post-publication dialog to Wikidata to [placeholder] Add post-publication dialog to Wikidata editor.Dec 8 2025, 5:30 PM
ifried updated the task description. (Show Details)
ifried renamed this task from [placeholder] Add post-publication dialog to Wikidata editor to Add post-publication dialog to Wikidata editor.Dec 8 2025, 5:36 PM
ifried triaged this task as High priority.

I've had a look at this. For starters, I came across T344984: [REPO][CLIENT][SW] Wikibase: Fire postEdit hook after making an edit which is a previous instance of the same problem: Wikibase not signaling via standard means that an edit was just made. T344984#9537155 has a(n incomplete) list of the various edit types that can be done in wikibase; there does not seem to be a shared mechanism to uniformly react to all the different edit types.

I experimented a bit locally, and found the wikibase.statement.saved and wikibase.statement.removed hooks; however:

  • They only work for statements (and not e.g. labels)
  • The hook handler isn't given the new revision's ID, nor is it updated in wgRevisionId. It might still be possible to get it from the RevisionStore, plus some adjustments on our side.

So, @ifried I could work on this partial implementation if that's fine, although I do think it'd be worth inquiring with wikibase folks about standardization of the post-edit behaviour.

We discussed this in a team meeting today with @Daimona The partial implementation that provides support for statements (but not labels, as well as some other stuff) is not the absolute ideal, but it is much better than the current status quo and we believe it will handle many use cases of editing events that target Wikidata. For this reason, we can proceed to just focus on support for editing Wikidata statements within the scope of this ticket, and we can consider if/how we handle other cases within the scope of other tickets in the future.

Change #1228536 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] postEdit: extract logic for getting revision ID

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

Change #1228537 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/Wikibase@master] StatementsChanger: pass new revision ID to hook handlers

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

Change #1228538 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Implement post-edit dialog for Wikibase statement edits

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

Change #1228595 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[integration/config@master] Zuul: [mediawiki/extensions/CampaignEvents] Add Wikibase phan dependency

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

Change #1228595 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/extensions/CampaignEvents] Add Wikibase phan dependency

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

Change #1228536 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] postEdit: extract logic for getting revision ID

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

Change #1228537 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] StatementsChanger: pass new revision ID to hook handlers

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

Change #1228538 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Implement post-edit dialog for Wikibase statement edits

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

Testing notes:

Add post-publication dialog when editing statements in Wikidata
Contributions tab to be updated to display changes due to Wikidata edits (this includes articles added/improved)

Screenshot 2026-02-14 at 2.17.49 PM.png (1×1 px, 224 KB)

Screenshot 2026-02-14 at 2.28.16 PM.png (1×2 px, 172 KB)

In the meantime, moving to Product sign-off so @ifried can double check that everything looks good here for expected behavior against our updated AC - thanks!

Hi Lauren, it's not currently on our roadmap, but we're investigating how "easy" or "hard" it is to squeeze it in. I'll get back to you next week with a definite answer. Thanks for bringing this to our attention.

Hii @ldelench_wmf, T344984 is not within our team's (Wikidata Integration Team) scope at the moment and will not be working on it in the near future. But we're happy to discuss it to see where it might fit in. Thanks!

Thank you for testing this, @ldelench_wmf! I will close this task as done, since all the work we could do is complete.

And hello @seanleong-WMDE, thanks for the response! Maybe we can briefly chat about this in the next few weeks? If yes, I could set up a meeting. Let me know! I will be out of the office for the remainder of the week, but I'll be back on Monday March 23. Thanks!

Thank you for testing this, @ldelench_wmf! I will close this task as done, since all the work we could do is complete.

And hello @seanleong-WMDE, thanks for the response! Maybe we can briefly chat about this in the next few weeks? If yes, I could set up a meeting. Let me know! I will be out of the office for the remainder of the week, but I'll be back on Monday March 23. Thanks!

@seanleong-WMDE let me know if you want me to tag along to the meeting :)

Thank you for testing this, @ldelench_wmf! I will close this task as done, since all the work we could do is complete.

And hello @seanleong-WMDE, thanks for the response! Maybe we can briefly chat about this in the next few weeks? If yes, I could set up a meeting. Let me know! I will be out of the office for the remainder of the week, but I'll be back on Monday March 23. Thanks!

Hii @ifried, yes, that would be great! I suspect our time zones will be a problem. I will send you a ping in Slack, and maybe we can schedule from there. Thanks!

@Ifeatu_Nnaobi_WMDE, okay!