Page MenuHomePhabricator

Homepage and help panel: identify when a question has been responded to
Open, Needs TriagePublic

Description

In the newcomer homepage, there are two features through which a user can ask a question to other editors: the help module and the mentorship module. The questions tend to be answered within a couple hours, but data from the help panel tells us that many users never return to view their responses. The only ways they can find out about responses is (a) they get pinged and see their notifications on wiki (b) they get pinged and have a confirmed email and receive an email (c) they repeatedly return to the help desk to look for a response.

This task is to explore how to know when a question has been responded to, either on the help desk or a mentor's talk page. By knowing this, we might do things like:

  • Add an indicator to the homepage's help and mentorship modules showing that there is a reply.
  • Send a notification if the user wasn't pinged.
  • Make the help panel's call to action button show that they have been replied to (and link to the reply).

Such a feature might work in with T218841's list of recent questions.

  • Mentorship Module Desktop
  • Help Module Desktop
  • Mentorship Module Mobile
  • Help Module Mobile
  • Help Panel Desktop
  • Help Panel Mobile

Event Timeline

This task is ready for engineering investigation. If we figure out feasible ways to do this, we will move it back to the "Needs Design" column.

It is technically possible to know that an edit to a page contains an update to a specific section and to know that a section looks like it was created by a question from the homepage or the help panel.

We have no way to know if the update is a response, fixing a typo, vandalism, refactoring, or anything else.

We cannot be 100% sure that the section was created by the homepage or help panel since anybody can create a new section with a similar format. Also, we cannot prevent a section from being re-titled for any reason, which would make us lose track of it.

The GrowthExperiments extension could run a simplified version of the EchoDiscussionParser in a PageContentSaveComplete hook to figure this out but for the reasons above that would be only a guess.

  • Send a notification if the user wasn't pinged.

We could do something there. Maybe suppress the mention notification and send a specialized notification (JohnDoe replied to your question on HelpDesk).

  • Add an indicator to the homepage's help and mentorship modules showing that there is a reply.
  • Make the help panel's call to action button show that they have been replied to (and link to the reply).

I think productizing any of those options (or even T218841) would require specific storage for the questions and their metadata (link, snippet, timestamp, etc). Hidden user preferences would not allow us to see a section title and figure out which user asked the question in a reliable way, even if the username is part of the section title.

Keeping track of discussions and replies is the foundation of a structured discussions system. It's a giant rabbit hole of needed features and challenges and I don't know if it makes sense for us to start building it now.

My recommendation would be to focus on the notifications to help users keep track of those conversations. We could improve the mention notification, write the abuse filter to make sure responses include a ping, and help newcomers discover where they are and how they work. We could even use notification data directly in the home page. For instance, show a visual cue if the current user has unread notifications associated with their mentor's user talk page or the help desk.

@Catrope will add thoughts then move this ticket to @MMiller_WMF column to determine what to do from there.

For T218841, Kosta suggested using a hidden preference to store a JSON blob with data about most recently asked questions (including revid and section name), which would be updated each time the user posts a question using the help panel/module. This is pretty much what Stephane said about "specific storage", except we'd abuse a hidden preference for this, and get limited storage as a result.

I suggested we could expand on this by hooking into the code that sends mention notifications, and checking if the recipient of the notification has asked a question whose section title is the same as the section title for the notification. If so, we'd update the JSON blob to mark that question as responded to. This would mean that the "responded to" feature would only work if the responder pings the questioner in their response, and if nobody modifies the section title. Despite those limitations, it'd probably be a pretty good approximation. Kosta sounded like he was on board with this idea.

Thanks for investigating this, @SBisson and @Catrope. I think we should consider this work alongside the rest of our conversation about the future of the help panel. We'll list out the various options and decide how deep to go in here. I'll bookmark it for that conversation, likely next week.

MMiller_WMF renamed this task from Homepage: identify when a question has been responded to to Homepage and help panel: identify when a question has been responded to.May 14 2019, 12:48 AM
MMiller_WMF reassigned this task from MMiller_WMF to Cntlsn.

We've decided that helping newcomers notice when they have a reply is an important part of both the homepage and help panel. Although we still need to discuss whether we are comfortable with the technical approach we would use here, I am assigning this to @Cntlsn so he can think about some design concepts here while much of the team is at Hackathon.

I placed this on another ticket but:

I recommend adding checkboxes in the description of tasks like these where two modules and platforms will need this implementation

Ex

Mentorshp Module Desktop
Help Module Desktop
Help Module Desktop
Mentorship Module Mobile

If multiple Engineers would like to merge patches Agile instead of waterfall they can break these into subtasks.

After some discussion and various iterations, here are the designs for showing the user a question has been responded to, by their mentor or the help desk (help panel will be coming soon).

The feature makes use of the little toast message in personal tools, already in use on some wikis, to display a message have been posted to the user's talk page (there are a couple of differences and a new mobile version that will be detailed below in the specifications section). It will also feature icon badges for the mentorship/help module icons, and a dot right next to the question that received an answer, listed under "Your recent questions". The answered question info text will also change from "Posted X [time] ago" to "Answered X [time] ago".

Desktop mockup

Screenshot 2019-07-09 18.43.49.png (1×2 px, 590 KB)

Mobile mockups
Screenshot 2019-07-09 18.45.21.png (1×1 px, 446 KB)

Specifications

  • Desktop
    • The little toast message will appear in personal tools when a question posted by the user receives an answer (simultaneously with the number on the echo notifications icon's badge being updated and highlighted):
      • the toast message will be positioned between the username and the echo notifications "bell" icon
      • the copy of the toast message will be "Your question got answered" -- TBD
      • the toast message will feature the icon of an arrow pointing to the right (to the echo notifications icon) -- the icon is the same as arrowNext-ltr.svg but resized at 50% (the original size is too big for the toast message)
      • the toast will also serve as a link to the page where the question has been answered to (preferably anchored to the question)
      • the toast will be dismissed when the user clicks on it, or when the user visits the page where the question has been answered to (only opening the echo notifications tray won't dismiss the toast)
      • background color is @colorLowSevere or #fc3
      • font color is #0B0081
      • font size 12px
    • The mentorship/help module will be highlighted when a user whose question has been answered to gets back to the homepage (prior to checking the answer) or is on the homepage:
      • the highlight treatments described below will disappear after the user visits the page where the question has been answered to
      • the module's icon will feature an icon badge, in the form of a dot
        • the diameter of the dot is 10px
        • background color is @colorLowSevere or #fc3
      • a dot icon will also be added right next to the title of the question listed under "Your recent questions"
        • the diameter of the dot is 14px
        • background color is @colorLowSevere or #fc3
      • the info text below the question title listed under "Your recent questions" will change to "Answered X [time] ago"
  • Mobile
    • The toast message will appear below the mobile banner when a question posted by the user receives an answer (simultaneously with the number on the echo notifications icon being updated and highlighted):
      • the toast message will be placed between the header and the #content meaning it will push down the content of the page
      • the toast message will feature a new icon of an arrow pointing to the echo notifications icon (it's important to position the icon so that it always have the same right margin as the echo notifications icon) -- I will share the new icon once we have agreed on the specs
      • the toast will be dismissed when the user taps on it, or when the user visits the page where the question has been answered to (only opening the echo notifications screen won't dismiss the toast)
      • min height is 30px
      • background color is @colorLowSevere or #fc3
      • font color is #0B0081
      • font size 14px
    • The mentorship/help module will be highlighted when a user whose question has been answered to gets back to the homepage (prior to checking the answer) or is on the homepage:
      • the highlights described below will disappear after the user visits the page where the question has been answered to
      • the module's icon in the module's preview will feature an icon badge in the form of a dot
        • the diameter of the dot is 10px
        • background color is @colorLowSevere or #fc3
      • in the module details screen, a dot icon will also be added right next to the title of the question listed under "Your recent questions"
        • the diameter of the dot is 14px
        • background color is @colorLowSevere or #fc3
      • the info text below the question title listed under "Your recent questions" will change to "Answered X [time] ago"

@MMiller_WMF copy needs review. We could decide to be more specific with toast copy, saying something like "Your question to the Help desk has been responded to", but we need to take into considerations sizing constraints for the Desktop version.

@Catrope @kostajh @SBisson
Questions:

  • I propose to also display more context specific echo notifications for the answers, instead of mention or message notifications; would it possible to have custom notifications?
    • the echo notification would feature a "mentorship module", "help module" or "help panel" icon
    • copy would be context specific (eg. "Your question “How can I revert an edit?” was answered by a volunteer on the Help desk.")
    • the echo notification would feature a more explicit link to the answer (eg. "Read answer on Help desk"), and the link would be same color as all other links on wiki
  • Do you think it would be possible to display the treatments described above on screen when the questions gets answered? Or do we need the user to reload the page (or load a new page) to display them?
  • Would you prefer to add the icon badge via CSS or shall I send you new svgs of the icons with icon badge added?

Change 521874 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Set help panel question storage preference

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

Change 521874 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Set help panel question storage preference

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

  • Do you think it would be possible to display the treatments described above on screen when the questions gets answered? Or do we need the user to reload the page (or load a new page) to display them?

I would suggest starting simple and not doing live updates at first. Then as an enhancement, we could "live" update the question area by refreshing it every ~60 seconds.

  • Would you prefer to add the icon badge via CSS or shall I send you new svgs of the icons with icon badge added?

Since all but one (askQuestion) of the icons we're using are in OOUI, I think it'll be more convenient to draw a yellow circle on them with pure CSS than to use new SVGs. From your mockups it looks like there's only one icon (userTalk) that gets a badge added to it; if that's true I'm not worried about the consistency of where on the icon the yellow circle should be positioned (if it's different for different icons, that would be a bit annoying).

I should also point out that your mockups pre-suppose a design change that has not yet been implemented (maybe there's a task for it somewhere?): on desktop, the module headers don't currently have icons.

  • I propose to also display more context specific echo notifications for the answers, instead of mention or message notifications; would it possible to have custom notifications?

We may be able to do this, but it's tricky. Here's two implementation strategies I thought of:

Strategy A:

  • Hook into the BeforeEchoEventInsert hook
  • Inspect each to-be-inserted event to see if it's a mention event that looks like an answer to a question we know about (page name and section name match a question from the question store)
  • If yes, prevent the event from being inserted (by returning false) and insert our own event (using EchoEvent::create()) with the same/similar data but a different type
    • (Note that this results in a re-entrant call to the same hook handler, unless we use a DeferredUpdate)
  • Create a presentation model for that notification type that displays the icons and text we want

Strategy B:

  • Like A, but instead of inserting an event of a new type, insert a modified mention event with some extra data tacked on (whether it's an answer to a question, what type (mentorship, help module, help panel), and whatever other data we need)
  • Override $wgEchoNotifications['mention']['presentation-model'] and point it to our own custom presentation model, which delegates to EchoMentionPresentationModel except for mentions related to questions (where we'd put in our own icon and text)

Both of these have advantages and disadvantages. Strategy A is in some ways less ugly, but strategy B would allow the hijacked notifications to gracefully fall back to regular mention notifications if the GrowthExperiments extension is uninstalled (rather than disappearing because they're of an unknown type). Graceful degradation would be less easy for strategy A but still doable: we could make our events' data format compatible with what regular mention events look like, and then put a shim definition of our event type in the config that points to EchoMentionPresentationModel.

We'd also have to consider what Flow support looks like for both of these. Flow notifications are also more fine-grained than wikitext notifications. All in all, it may be easier to start with tracking first and consider custom notifications after that.

cc @SBisson for thoughts on the above.

  • Do you think it would be possible to display the treatments described above on screen when the questions gets answered? Or do we need the user to reload the page (or load a new page) to display them?

I would suggest starting simple and not doing live updates at first. Then as an enhancement, we could "live" update the question area by refreshing it every ~60 seconds.

Sounds good. That's also how echo notifications icon's badge gets updated, correct?

  • Would you prefer to add the icon badge via CSS or shall I send you new svgs of the icons with icon badge added?

Since all but one (askQuestion) of the icons we're using are in OOUI, I think it'll be more convenient to draw a yellow circle on them with pure CSS than to use new SVGs. From your mockups it looks like there's only one icon (userTalk) that gets a badge added to it; if that's true I'm not worried about the consistency of where on the icon the yellow circle should be positioned (if it's different for different icons, that would be a bit annoying).

The icons that get a badge are the icons of the mentorship and help modules, userTalk and helpNotice respectively. (While we're here, what is the askQuestion icon you are referring to?)
Adding the dot via CSS sounds good to me too, please note if possible that the dot features a 1px border

Screenshot 2019-07-11 13.43.32.png (664×790 px, 57 KB)

I should also point out that your mockups pre-suppose a design change that has not yet been implemented (maybe there's a task for it somewhere?): on desktop, the module headers don't currently have icons.

You are right, we forgot to create a task for it, I will do it right now!

Thanks, @Cntlsn, for this thorough design work and to @Catrope for weighing in. I think we're on a good track here -- but I think we should wait on advancing this for a week or two given what else is in the pipeline right now. We will revisit soon.

  • Do you think it would be possible to display the treatments described above on screen when the questions gets answered? Or do we need the user to reload the page (or load a new page) to display them?

I would suggest starting simple and not doing live updates at first. Then as an enhancement, we could "live" update the question area by refreshing it every ~60 seconds.

Sounds good. That's also how echo notifications icon's badge gets updated, correct?

That's how it's proposed to work, yes. This live-update feature has been developed as part of a GSoC project, but is behind a feature flag and not yet enabled in production. See T219222.

The icons that get a badge are the icons of the mentorship and help modules, userTalk and helpNotice respectively. (While we're here, what is the askQuestion icon you are referring to?)

askQuestion is the speech bubble with the question mark, used in the help panel button. I don't think it's used on the homepage.

Adding the dot via CSS sounds good to me too, please note if possible that the dot features a 1px border

Screenshot 2019-07-11 13.43.32.png (664×790 px, 57 KB)

Yes, that should be doable with something like background-color: yellow; border: 1px solid white; border-radius: 50%; width: Npx; height: Npx;

More design iterations have been collected at https://wikimedia.invisionapp.com/freehand/document/BwfazrCjE
The feature is currently on hold as lower priority.

Hello! I'm confused, have notifications appeared anywhere? :) I ask this because I am not receiving any notifications, and I have strange wording when I ask a question :)

image.png (416×507 px, 22 KB)

@Iniquity - I posted a reply on https://test.wikipedia.org/wiki/User_talk:MMiller_(WMF)#Question_from_Iniquity_%2819%3A48%2C_13_January_2021%29 - please check if you got a notification.
Re "strange wording" - can you add more details? :)

Hi :) Yes, we have already found out with @Trizek-WMF that only ordinary pings come through notifications. There are no additional pings.

Re "strange wording" - can you add more details? :)

The problem is described in T272146, The form says that the newscomer will receive a notification, but if the mentor forgets to ping, then there will be no notification.

Another problem, I just noticed that the message about email notification is shown even when this function is disabled in the settings.

Thanks!

Hi :) Yes, we have already found out with @Trizek-WMF that only ordinary pings come through notifications. There are no additional pings.

Yes, that's how it currently works.

The problem is described in T272146, The form says that the newscomer will receive a notification, but if the mentor forgets to ping, then there will be no notification.

Another problem, I just noticed that the message about email notification is shown even when this function is disabled in the settings.

I agree that the text in the confirmation popup is, well, overy promising.

Hi :) Yes, we have already found out with @Trizek-WMF that only ordinary pings come through notifications. There are no additional pings.

Re "strange wording" - can you add more details? :)

The problem is described in T272146, The form says that the newscomer will receive a notification, but if the mentor forgets to ping, then there will be no notification.

hi @OTichonova - I just came across this task whilst prioritising tasks in and out of the current sprint and think it could be beneficial to include a reminder on the Unanswered Questions module in the GrowthExperiments-MentorDashboard for the mentor to remember to ping the newcomer's username so that they actually receive a notification.

Removing task assignee due to inactivity, as this open task has been assigned for more than two years. See the email sent to the task assignee on February 06th 2022 (and T295729).

Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.

If this task has been resolved in the meantime, or should not be worked on ("declined"), please update its task status via "Add Action… 🡒 Change Status".

Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.