Page MenuHomePhabricator

Implement a way for test comments to be posted automatically
Closed, ResolvedPublic

Description

This task is about implementing a way for test comments to be posted to patchdemo wiki talk pages, automatically.

We think doing the above will make it easier for Junior and Senior Contributors to experience the new topic subscription functionality without having to: A) post comments with a secondary account or B) depend on another person to post comments.

Requirements

The table below describes how the automatic posting should behave. Note, the table below can be finalized once the usability test script is written in T273912.

Test participant's actionSoftware's responsePurpose
When a test participant subscribes to a section on a patchdemo article talk page and posts a comment in that section......the software should post a comment in the section they just subscribed to...so the test participant can experience what it's like to receive a new comment notification via Echo
When a test participant posts a comment in an existing section on their patchdemo user talk page......the software should post a comment in the section they just commented in...so the test participant can experience what it's like to receive a new comment notification via Echo

Open questions

  • 1. What is the "final" set of interactions that should be automated (once this question is answered, the table in the ===Requirements section should be complete.
    • Done. Table is up to date.
Done
  • All ===Open questions are answered
  • The behavior described in the ===Requirements table is implemented

Related Objects

Event Timeline

What about adding an internal api module that accepts as parameters the title and section (and token) and posts a comment along the lines of "Hey @User, here is an example comment" from a system user account?

Based on the protocol that I've drafted over in T273912, I believe we have 2 triggers:

  1. Trigger: Reply to convo on USER talk Action: Notification in notifications "inbox"
  1. Condition: Tester subscribes to convo on ARTICLE talk Trigger: Reply to convo on ARTICLE talk Action: Notification in notifications "inbox"

Note: I don't believe that we need a ACTION/TRIGGER for sending a message after the tester unsubscribes from a thread, other than the typical unsubscribing affordances.

@ppelberg @Esanders @matmarex - please let me know if this seems logical.

Based on the protocol that I've drafted over in T273912, I believe we have 2 triggers...

@iamjessklein: noted. I've updated the task description to reflect the triggers you described.

I think this is ready for engineering to start working on.

Change 683448 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] [DO NOT MERGE] Post test comments automatically

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

When it posts a reply comment, what does it say?

We discussed the patch with @iamjessklein, I need to make a new demo wiki with the following added changes:

  • unsubscribe action T279150
  • new button design T279149
  • highlight after following a notification T281471
  • Remove the automatic comment when "a test participant subscribes to a section", we decided we only need comments after replying

When it posts a reply comment, what does it say?

Jess is still deciding on the wording, it's somewhere in the "protocol doc" on T273912, right now it's just a placeholder text: "Hello! This is an automatic reply posted as a test, after you commented in a topic."

This is looking great @matmarex

✔️The highlight works
✔️ Unsubscribe from notification window works
✔️ The correct unsubscribe button is there

The bot

  • I tried to make the bot display more like a regular account but it is a brown link now. Do I need to do something else to make it display like a typical user?
  • The comment should say:

Great. Go back to the Article talk page and share the source here so that we can publicly work on it.

Setting up the Nellie Bly page
I tried doing the export/import, but once again it failed. The page is there but all the links are broken, can you take a look?

Test accounts
I need to create a minimum of 1 test account (but ideally a few). How should I go about doing that?

Actually, the highlight does not work. I just tested it on by:

  1. Go the User Talk Page and reply
  2. Navigate away
  3. See the notifications (bell and yellow banner)
  4. Click on bell and notification
  5. Go to reply but there's no highlight here.

(Copying my replies from Slack for future reference)

I tried to make the bot display more like a regular account but it is a brown link now. Do I need to do something else to make it display like a typical user?

I was going to say we should just create its user page, but I see you've already done that, and I see it as a normal blue link on https://patchdemo.wmflabs.org/wikis/510f14d928/wiki/Talk:Nellie_Bly. So I think this works now? Maybe you just had to refresh the page

The comment should say:
Great. Go back to the Article talk page and share the source here so that we can publicly work on it.

If I remember it right, you mentioned something about having a different message for the article talk page and the user talk page, is that still on the table?

I tried doing the export/import, but once again it failed. The page is there but all the links are broken, can you take a look?

Actually a different thing happened! It looks like you exported only the article and the talk page, without templates. Make sure you check the "Include templates" option when doing the export.

I need to create a minimum of 1 test account (but ideally a few). How should I go about doing that?

Go to "Create account" and create them, I'm afraid we don't have a way to automate it :/

Actually, the highlight does not work. I just tested it on by: (…)

Arrrgh it doesn't work for user talk pages, because that's the "old" kind of notification, and not the one we added :/ This is annoying, I'm not sure how to fix it

Actually, the highlight does not work. I just tested it on by: (…)

Arrrgh it doesn't work for user talk pages, because that's the "old" kind of notification, and not the one we added :/ This is annoying, I'm not sure how to fix it

Okay, I figured out a nice way. (And also filed a separate task for this: T281590.)

great, I'll test against the protocol now.

ppelberg updated the task description. (Show Details)