Page MenuHomePhabricator

Allow organizer or editor to remove an edit
Open, In Progress, Needs TriagePublic5 Estimated Story Points

Description

User stories:

As an organizer of an event, I want to be able to remove any edits done by participants that I do not think are valid event edits, so that the contribution data for the event can be reliable and accurate.

As an event participant who made an edit, I want to be able to remove any edits done by me that I do not think are valid event edits, so that I can be properly recognized for the contributions that I made and have a clear understanding of my impact.

Acceptance Criteria:
  • Given that a user is on the Contributions tab,
    • They should see a new "Actions" column in the table view,
      • And the column should be the last column in the table view,
    • And if they are an organizer of the event,
      • They should see a trash icon for each edit in the Actions column,
      • And the icon has a tooltip with the message "Remove contribution" on mouse over
    • And if they are a participant who made an edit during the event,
      • They should see a trash icon for each edit they made in the Actions column,
      • And the icon has a tooltip with the message "Remove contribution" on mouse over
  • And if they click on the trash icon,
    • They should see a dialog to verify their choice,
      • And the dialog should have the following text:
        • Header: "Remove this edit from [event name]"
        • Line 1: "Are you sure you want to remove this edit from the event?"
        • Line 2: "It won't be deleted, but it will no longer be associated with the event."
      • And the dialog should have the following options as buttons:
    • Cancel
    • Remove (in red)
  • And, if they select "Remove,"
    • The association should be hard deleted
      • Note: This may be changed to soft deletion when we enable logging (see T406633)
    • The user should get a confirmation message informing that their edit was removed from the event, with the following text: "The edit was removed from the event."
  • And, if they select "Cancel,"
    • The dialog should disappear and no other action will need to occur
  • If there is an error when trying to delete
    • The user should get an error message with the following text: "Error removing contribution."
  • The new DELETE endpoint should be documented

Design proposal:

add an 'actions' column to the contributions table, where we'll have Remove as an action (represented with cdxIconTrash) - participants will only see the remove action for edits that they have made, not edits that others have made:

remove_action.png (811ร—1 px, 112 KB)

if they click on the Remove action, a dialog comes up that asks if they want to remove their edit from the event, informing the user that the edit will not be deleted, but it will be unassociated with the event:

remove_dialog.png (1ร—2 px, 183 KB)

if they click on "Remove" on the action, they'll get a confirmation/success message informing that their edit was removed from the event:

remove_confirmation.png (1ร—2 px, 145 KB)

Out of scope:
  • Bulk delete
  • Separate column/view to show deleted associations
  • Support for who has final "vote" in an "association war"
  • Logging: This will be handled separately in T406633. In the future, we will want to have some way to show deleted associations (i.e., who deleted + when deleted), such as a new column or new tab with the data. This way, organizers or participants can stay up-to-date on changes that they may want to monitor. But we do not need to show this data in the UI for this ticket.

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptAug 27 2025, 8:57 PM
ifried renamed this task from [placeholder] Allow organizer or editor to remove an edit to Allow organizer or editor to remove an edit.Sep 17 2025, 7:04 PM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)

Some questions that have come up logging:

  • Do we do it now (i.e., in this ticket) or later? If we do it now, we need to figure out all open questions now. If we do it later, we have more time to figure this stuff out, but we would not have logging of older data.
  • Where do we display the log? Special:Log is local, so we probably cannot use it if we want global support (which we probably do). We may need to create our own log page for the extension, such as Special:CollaborativeLog.
  • Who can see this data? For example, is it just the organizers, admins, and the person who made the edit that was added/removed? Or everyone? I guess the question is if there is anything sensitive or protected that we would not want to show to a larger audience.
  • We should try to make these decisions once -- and then not change them.

My thoughts so far:

  • We ultimately want logging, but I think it could be okay if we don't include it at first so we can get feedback on how people would want it to be managed.
  • My instinct today is: Wait for later, so we can collect more user insights (maybe in second learning session in late October, followed by a survey?) and then do logging as a separate ticket for V2
ifried updated the task description. (Show Details)

Change #1195179 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] Add new methods to handle contribution deletion

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

Change #1195209 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] Add new endpoint to delete contributions

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

Change #1195179 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add new methods to handle contribution deletion

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

@ifried @JFernandez-WMF Just reading through the AC, would it make sense to change "Your edit was successfully removed from the event" to "The edit ..."? Given that organizers can also delete edits that aren't theirs.

Change #1195722 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] Add trash icon to remove a contribution

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

Ah, yes, good catch, @Daimona! Will update AC.

Change #1195209 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add new endpoint to delete contributions

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

Question about Actions column for unnamed users, asked during code review:

The Actions column (with delete buttons) is only shown to named users. For unnamed users, the column will appear empty in the contributions table.

Is this behavior acceptable?

  • Named users (event organizers or contribution owner): see Actions column with delete buttons
  • Named users (not event organizers and not contribution owner): see empty Actions column
  • Unnamed users: see empty Actions column

cc: @ifried , @JFernandez-WMF

Hi @cmelo,

I think it is preferable to see no Actions column rather than an empty Actions column. However, I think this could be handled in a separate task or later. I wouldn't want it to block the more important update that this ticket provides, which is allowing users to remove edits. Do you think it should be a separate ticket to hide the Action column for these users? Would it be hard to do?

Hi @cmelo,

I think it is preferable to see no Actions column rather than an empty Actions column. However, I think this could be handled in a separate task or later. I wouldn't want it to block the more important update that this ticket provides, which is allowing users to remove edits. Do you think it should be a separate ticket to hide the Action column for these users? Would it be hard to do?

Thanks @ifried, and yes doing it in a separate task sound good to me!

with the following text: "The edit was successfully removed from the event."

This is against https://www.mediawiki.org/wiki/Help:System_message#Avoid_jargon_and_slang. Can we drop "successfully" from the copy?

@Daimona, yes, I removed the word "successfully." Thanks for that callout. So, @cmelo, note that the copy has been slightly altered.

And separate ticket created: T408024.

Test wiki created on Patch demo by CMelo (WMF) using patch(es) linked to this task:
https://3418ffa02b.catalyst.wmcloud.org/w/

Test wiki created on Patch demo by CMelo (WMF) using patch(es) linked to this task:
https://24ea17598d.catalyst.wmcloud.org/w/

Hi @ifried, I see that the dialog messages in the AC are different from the design proposal, and would like to check which one to use the one in the AC or the on in the designs?

@cmelo, thanks for checking! The AC is the source of truth for the text.

Hi @ifried, I have added a new AC, which is the one below:

  • If there is an error when trying to delete
    • The user should get an error message with the following text: "Error deleting contribution."

This is in case the API fails to delete the contribution for some reason, in practice this should "never" happen, but in case there is an error when calling the API I added this error message to inform the user.
Would like to confirm the error message if ok.

Change #1199726 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] Improve performance when loading the trash icon

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

Looks good. I would suggest: "Error removing contribution."

Hi @ifried ,
Following up on our backlog refinement discussion where we decided to set the pagination limit to 50 for now, due to performance issues:

I wanted to check with you whether we should create a follow-up task to potentially increase this limit in the future/finds a way to not impact performance, or if we should wait and see if users actually need more than 50 items per page before taking any action.
Options:

  • Create a follow-up task now (lower priority) to revisit the pagination limit
  • Wait for user feedback/usage data to determine if the 50-item limit is sufficient

Change #1201163 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] Optimize delete permissions in EventContributionsPager to show or not the trash icon

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

Hi @ifried I added a tooltip for when the user mouse over the trash icon, I just added it to the AC, and would like to confirm with you if this is ok.
What I added to the AC was:

  • And the icon has a tooltip with the message "Remove contribution" on mouse over

Yes, that tooltip tex is fine. Thank you, @cmelo!