Page MenuHomePhabricator

Hide Actions column in Contributions tab if no actions available
Closed, DeclinedPublic

Description

Acceptance Criteria:
  • Hide Actions column in Contributions tab if no actions available

Event Timeline

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

[mediawiki/extensions/CampaignEvents@master] Hide Actions column in Contributions tab if no actions available

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

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

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

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

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

Change #1201163 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Optimize permission checks for contribution deletion buttons

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

Change #1200082 abandoned by Cmelo:

[mediawiki/extensions/CampaignEvents@master] Hide Actions column in Contributions tab if no actions available

Reason:

chenges done in another patch

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

vaughnwalters subscribed.

If a user removes all of the edits that they are associated with, then the actions column will still display until page refresh. Should we hard refresh the page after all events that are associated with a user are deleted, so that the actions column is removed? Besides this case, it is working as expected.

Screen Recording 2025-11-17 at 6.34.27 PM.gif (1×2 px, 1 MB)

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

[mediawiki/extensions/CampaignEvents@master] Remove actions column when there is no actions

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

If a user removes all of the edits that they are associated with, then the actions column will still display until page refresh. Should we hard refresh the page after all events that are associated with a user are deleted, so that the actions column is removed? Besides this case, it is working as expected.

Screen Recording 2025-11-17 at 6.34.27 PM.gif (1×2 px, 1 MB)

I add a patch to remove the column if there is no more delete actions to be done in the page, but without a hard refresh, but there is one trick thing to have in mind:

  • in scenarios like the organizer removing contributions, if they do something like, change the limit to 20 and remove the 20 one by one then they will have an empty page, and will need to refresh the page anyway, this may also be trick in scenarios that have many pages and the user is e.g in the last page, and removes all in that page, because if that happens, and we reload the page we would need to also change the page parameter to be -1, because if not they will be redirected to a page (I mean page number) that does not exist.
    • Another option for this could be just leave the empty page in case the organizer removes all, which means the organizer would need to change the page manually using the pagination to see the remaining data

Also, a question was raised in code review that is:
Couldn't we just keep the status quo, which is leave the column in this case, and if the user refreshes the column does not show anymore?
I don't have a personal preference, but if we decide to go with removing the column, we would need to address the scenario mentioned above.

cc: @ifried

We decided in today’s meeting to leave it as it is. This means that if the user has only one contribution to delete and deletes it, we will not automatically remove the “Actions” column. However, it will no longer be visible after refreshing the page if there are no contributions left to delete, which is the current status quo.

Change #1206875 abandoned by Cmelo:

[mediawiki/extensions/CampaignEvents@master] Remove actions column when there is no actions

Reason:

We decided in today’s meeting to leave it as it is. This means that if the user has only one contribution to delete and deletes it, we will not automatically remove the “Actions” column. However, it will no longer be visible after refreshing the page if there are no contributions left to delete, which is the current status quo. T408024#11462687

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