Page MenuHomePhabricator

Add "Contributions" tab to EventDetails special page (summary view)
Closed, ResolvedPublic

Description

User story:

As an event organizer and/or participant, I want to see what everyone did during an event so that I can understand the overall output and impact.

Background information

We will be adding a new tab to EventDetails, which will be called "Contributions." For the MVP, it will have 2 sections: a table view and a summary view. This ticket represents the work to add the summary view. There is a separate ticket for table view: T400722.

The summary view gives an overall picture of what was accomplished during the event. At first, we will be focused on displaying just a few data points for the MVP, but we may add more over time.

This view will be visible to everyone. However, the contributions made by private participants will only be shared with those who are allowed to see them. The contributions made by public participants will be displayed to everyone.

More notes:

  • The Contributions tab must always be visible, regardless of whether the event has associated edits or not.
  • Characters are out of scope for the MVP.
Acceptance criteria (summary of contributions):
  • Given that any user (logged in or logged out) is viewing the “Contributions” tab for an event,
    • Then they should see 6 contribution summary cards displayed above the table:
      • Participants
      • Wikis edited
      • Articles created
      • Articles edited
      • Bytes changed
      • Links changed
    • And each card should use the Card component
  • Given that any user (logged in or logged out) is viewing the “Bytes changed” and “Links changed” cards,
    • Then values should be visually split into positive and negative numbers,
    • Use the same formatting as that found in page histories (ChangesList::showCharacterDifference)
  • And for contributions that are made by publicly registered participants,
    • Then their contribution data should be shown to all users who view the Contributions tab in both aggregate and per edit view
  • And for contributions that are made by privately registered participants,
    • Then their contribution data should only be shown to permitted viewers (i.e., event organizers, wiki admins or other user groups designed as permitted by the wikis, and the participant who made the edits) in the granular and aggregate view in the Contributions tab
  • Note that designs and details related to private registrant support will be handled in a separate ticket, depending on decisions made in design work in progress

Design

Desktop:

Screenshot 2025-08-21 at 1.30.26 PM.png (146×1 px, 26 KB)

contributions_table (14).png (2×2 px, 218 KB)

Mobile:

Make the cards in the summary scrollable horizontally. The table should also be scrollable horizontally per the component's breakpoint for mobile.

mobile (5).png (568×320 px, 24 KB)

Event Timeline

ifried renamed this task from Placeholder: Summary at top for Contributions tab to Add "Contributions" tab to EventDetails special page (summary view).Aug 20 2025, 3:53 PM
ifried updated the task description. (Show Details)

Design notes for @JFernandez-WMF:

  • Let's remove characters from the summary view
  • Let's update links to be like bytes (added & removed)

Random question that just occurred to me: how would this work in mobile? One way to do it would be to have the cards wrap around, but I could easily see that taking up a lot of vertical space just with those cards (think if they are one per line). So, should it maybe not wrap, and be horizontally scrollable instead? Also considering that there's a table below, and tables are generally hard to optimize for mobile, so we probably would need to have horizontal scrolling for that anyway.

Question for @JFernandez-WMF to explore. We can also discuss this during our next 1:1.

Random question that just occurred to me: how would this work in mobile? One way to do it would be to have the cards wrap around, but I could easily see that taking up a lot of vertical space just with those cards (think if they are one per line). So, should it maybe not wrap, and be horizontally scrollable instead? Also considering that there's a table below, and tables are generally hard to optimize for mobile, so we probably would need to have horizontal scrolling for that anyway.

I updated the design task related to mobile behavior, see T401239#11124789, but basically yes the proposal is horizontal scrolling for both summary and table.

cmelo changed the task status from Open to In Progress.Sep 9 2025, 2:19 AM
cmelo claimed this task.

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

[mediawiki/extensions/CampaignEvents@master] Add contribution summary view

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

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

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

Test wiki on Patch demo by CMelo (WMF) using patch(es) linked to this task was deleted:

https://554fabc3ca.catalyst.wmcloud.org/w/

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

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

Test wiki on [[ | Patch demo ]] by CMelo (WMF) using patch(es) linked to this task was deleted:

https://2b7ac98b54.catalyst.wmcloud.org/w/

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

Test wiki on Patch demo by CMelo (WMF) using patch(es) linked to this task was deleted:

https://c55106d465.catalyst.wmcloud.org/w/

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

Test wiki on Patch demo by CMelo (WMF) using patch(es) linked to this task was deleted:

https://6533b93b1c.catalyst.wmcloud.org/w/

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

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

[mediawiki/extensions/CampaignEvents@master] Add summary view to contributions tab

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

Change #1186993 abandoned by Cmelo:

[mediawiki/extensions/CampaignEvents@master] Add contribution summary view

Reason:

There were too many complicated conflicts to solve, recreated it on https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CampaignEvents/+/1193427

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

Change #1193427 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add summary view to contributions tab

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

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

[mediawiki/extensions/CampaignEvents@master] Various tweaks for the summary view of the contributions tab

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

One thing that the AC do not clarify: should "articles edited" include articles that were created as part of the event (and are therefore already included in "articles created")?

(Apologies for the edit conflict, moving back to CR as I had some drafts from an unfinished review, and a couple things I found later, that I turned into a follow-up change)

One thing that the AC do not clarify: should "articles edited" include articles that were created as part of the event (and are therefore already included in "articles created")?

I think they shouldn't, what do you think @ifried ?

I agree with @cmelo. Articles edited should only be for articles that were already created. "Edited" and "created" should be separate stats, so they can stand on their own as something meaningful and understandable to the user.

Change #1193917 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Various tweaks for the summary view of the contributions tab

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

I agree with @cmelo. Articles edited should only be for articles that were already created. "Edited" and "created" should be separate stats, so they can stand on their own as something meaningful and understandable to the user.

Okay, makes sense to me. This is not what the current code is doing though -- it excludes page creations when counting pages, but if a page is created as part of an event and then it gets more edits, it will still be included in both counts.

ok, ticket created & thanks for flagging this: T406783

vaughnwalters subscribed.
Acceptance criteria (summary of contributions):
  • Given that any user (logged in or logged out) is viewing the “Contributions” tab for an event,
    • ✅ Then they should see 6 contribution summary cards displayed above the table:
      Screenshot 2025-10-22 at 2.44.19 PM.png (208×1 px, 40 KB)
      • ✅ Participants
      • ✅ Wikis edited
      • ✅ Articles created
      • ✅ Articles edited
      • ✅ Bytes changed
      • ✅ Links changed
    • And each card should use the Card component
  • Given that any user (logged in or logged out) is viewing the “Bytes changed” and “Links changed” cards,
    • ✅ Then values should be visually split into positive and negative numbers,
      Screenshot 2025-10-22 at 2.38.43 PM.png (202×634 px, 21 KB)
    • ✅ Use the same formatting as that found in page histories (ChangesList::showCharacterDifference)
  • And for contributions that are made by publicly registered participants,
    • ✅ Then their contribution data should be shown to all users who view the Contributions tab in both aggregate and per edit view
  • And for contributions that are made by privately registered participants,
    • ✅ Then their contribution data should only be shown to permitted viewers (i.e., event organizers, wiki admins or other user groups designed as permitted by the wikis, and the participant who made the edits) in the granular and aggregate view in the Contributions tab

✅ Make the cards in the summary scrollable horizontally. The table should also be scrollable horizontally per the component's breakpoint for mobile.

mobile (5).png (568×320 px, 24 KB)



All AC met and functioning as expected. There is less spacing between the cards in the build than in the comp, so sending this to @JFernandez-WMF for thoughts or design sign off. See below:

compbuildbuild (full view)
Screenshot 2025-08-21 at 1.30.26 PM.png (146×1 px, 26 KB)
Screenshot 2025-10-22 at 2.48.45 PM.png (240×1 px, 43 KB)
Screenshot 2025-10-22 at 2.49.15 PM.png (1×2 px, 520 KB)