Page MenuHomePhabricator

Make usernames in EventDetails be clickable link to user page
Closed, ResolvedPublic

Description

NOTE: This can potentially be solved in tandem with the datetime standardization question, pending engineering discussion.

Acceptance Criteria:

  • Make usernames in EventDetails be clickable link to user page
  • Update API documentation of the "list participants" endpoint

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptJul 19 2022, 3:48 PM

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

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

Change 822640 had a related patch set uploaded (by Mhorsey; author: Mhorsey):

[mediawiki/extensions/CampaignEvents@master] Fix Error in last commit

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

Change 822640 abandoned by Mhorsey:

[mediawiki/extensions/CampaignEvents@master] Fix Error in last commit

Reason:

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

Change 822639 abandoned by Mhorsey:

[mediawiki/extensions/CampaignEvents@master] Make Usernames link to User Page in ParticipantsModule

Reason:

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

Change 822639 restored by Mhorsey:

[mediawiki/extensions/CampaignEvents@master] Make Usernames link to User Page in ParticipantsModule

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

โ€ข vyuen changed the task status from Open to In Progress.Aug 24 2022, 5:42 PM
โ€ข vyuen moved this task from Backlog to Darkship on the Campaign-Registration board.

Change 822639 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Make Usernames link to User Page in ParticipantsModule

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

vaughnwalters subscribed.

โœ… Make usernames in EventDetails be clickable link to user page

Screen Recording 2022-09-09 at 2.43.09 PM.gif (601ร—960 px, 1015 KB)


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.

Screen Shot 2022-09-20 at 10.11.10 AM.png (1ร—1 px, 227 KB)