Acceptance Criteria:
- Make usernames in EventDetails be clickable link to user page
- Update API documentation of the "list participants" endpoint
| ifried | |
| Jul 19 2022, 3:48 PM |
| F35525925: Screen Shot 2022-09-20 at 10.11.10 AM.png | |
| Sep 20 2022, 2:12 PM |
| F35515275: Screen Recording 2022-09-09 at 2.43.09 PM.gif | |
| Sep 9 2022, 8:15 PM |
Acceptance Criteria:
This can potentially be solved in tandem with the datetime standardization question, pending engineering discussion.
FTR, the solution I had in mind here is to create an internal API endpoint that returns the HTML of the list entries. Since it'd be generated in PHP, we can easily add a link and format the date. I don't really like this solution, but I guess it could be an acceptable workaround/stopgap.
Change 822639 had a related patch set uploaded (by Mhorsey; author: Mhorsey):
[mediawiki/extensions/CampaignEvents@master] Make Usernames link to User Page in ParticipantsModule
Change 822640 had a related patch set uploaded (by Mhorsey; author: Mhorsey):
[mediawiki/extensions/CampaignEvents@master] Fix Error in last commit
Change 822640 abandoned by Mhorsey:
[mediawiki/extensions/CampaignEvents@master] Fix Error in last commit
Reason:
Change 822639 abandoned by Mhorsey:
[mediawiki/extensions/CampaignEvents@master] Make Usernames link to User Page in ParticipantsModule
Reason:
Change 822639 restored by Mhorsey:
[mediawiki/extensions/CampaignEvents@master] Make Usernames link to User Page in ParticipantsModule
Change 822639 merged by jenkins-bot:
[mediawiki/extensions/CampaignEvents@master] Make Usernames link to User Page in ParticipantsModule
โ Make usernames in EventDetails be clickable link to user page
Update API documentation of the "list participants" endpoint
@MHorsey-WMF the docs for list participants needs to be updated so the returns include user_page. Example below is from a GET request at https://en.wikipedia.beta.wmflabs.org/w/rest.php/campaignevents/v0/event_registration/118/participants :
{
"participant_id": 274,
"user_id": 193133,
"user_name": "VWalters",
"user_page": {
"path": "/w/index.php?title=User:VWalters&action=edit&redlink=1",
"title": "User:VWalters (page does not exist)",
"classes": "new mw-userlink"
},
"user_registered_at": "20220824203910",
"user_registered_at_formatted": "20:39, 24 August 2022"
},Once the API docs are updated to reflect the latest changes, this ticket will be complete.
I was able to test this and see clickable usernames (if there is a user page has been created) on the beta cluster (see attached screenshot). For this reason, I'm marking this as Done.