Page MenuHomePhabricator

[SPIKE] Investigate Extension:QuickSurveys for Wikimedia Commons [16H]
Closed, ResolvedPublicSpike

Description

Background information

One of the 5 wikis we would like the Safety Survey to be displayed on is Wikimedia Commons.

Questions

  • Can QuickSurveys be displayed on Wikimedia Commons pages?

Yes

  • On which pages? File pages?

Proposed user experience: According to Luca on Structured Data, we would most likely reach editors if we placed the survey on File pages. The ideal placement would be alongside the actions that are next to image (on desktop). This is doable with a config variable. We would also need to adjust the display so that the survey questions can be fully seen (the area for the survey is somewhat narrow).

Other options and technical considerations:

  • File pages: Editors come to these pages after upload and upon browsing. This would require changing the placement of the image. It currently falls after the image. We would probably want it near the available actions. There are screenshots below.
  • Main homepage: Editors likely land here unless they've bookmarked specific pages. There is a screenshot of my local instance below, but it's not the same as the commons mainpage, which has a number of widgets. There is likely more community work to place surveys here.
  • Media search: Editors do most likely visit this page in their workflow. This is what the structured data team initially explored. There are some proposed screenshots in the linked ticket below that would require quite a bit of styling changes. This requires larger code changes than the options above. I could see editors navigating off the page before completing the survey.
  • Upload page: Editors definitely come to these pages (unless they're more admin heavy), but it seems disruptive to survey editors on a page where they're taking an action, and they might complete the upload before realizing that they need to respond to the survey.

Any of these options require code changes. I've commented below on where the code lives. We'd need to add a config variable specifically for this so we could specify only to display on these pages on Commons.

The other option is to create a static main namespace page for the survey and find a way to point users there. I'm not sure if this is easier or better, but it's how the structured data team solved this problem when they wanted to conduct a survey.

Event Timeline

Madalina triaged this task as Medium priority.Nov 3 2021, 12:20 PM
Jhernandez raised the priority of this task from Medium to High.Nov 3 2021, 12:28 PM
Jhernandez updated the task description. (Show Details)
Restricted Application changed the subtype of this task from "Task" to "Spike". · View Herald TranscriptNov 3 2021, 3:05 PM
ARamirez_WMF renamed this task from [SPIKE] Investigate QS for Wikimedia Commons to [SPIKE] Investigate QS for Wikimedia Commons [16H].Nov 3 2021, 3:09 PM

@ARamirez_WMF The team that works closely with Commons is Structured Data Across Commons

👆 may be useful if we need to reach out to someone about Commons things.

Madalina lowered the priority of this task from High to Low.Nov 15 2021, 1:10 PM
Jhernandez renamed this task from [SPIKE] Investigate QS for Wikimedia Commons [16H] to [SPIKE] Investigate Extension:QuickSurveys for Wikimedia Commons [16H].Nov 15 2021, 4:27 PM

QuickSurveys documentation says it displays surveys in the main namespace, so personally to approach this spike I'd:

  1. Go understand how that happens in the QuickSurveys PHP and JS code, find out if it is using any hooks and how it is injecting the survey on the page
  2. Then figure out the types of namespaces that Commons uses for its pages, and see if what I found out from QuickSurveys will work in commons

If after those I don't have clear answers, then looking into installing and configuring Commons in my mediawiki-docker install would probably be the next step to test it locally.

I found where we filter for main namespace in includes/SurveyContextFilter.php:L35.

I'd guess to do this we'd want to add a config option to display on file pages because on other wikis we probably wouldn't want to display them outside the main namespace.

Apparently. you can also target pages outside the main namespace through the audience pageIds array.

I'm currently looking at https://commons.wikimedia.org/w/index.php?title=Special:Version to see which extensions Commons uses.

{F34932007}Well I got a survey to appear on a file page, but there would definitely be styling needed.

I'm looking at the file pages on Commons and I'm not sure where the survey could fit. Same with the main page.

Screen Shot 2022-01-26 at 4.50.58 PM.png (1×2 px, 2 MB)

Screen Shot 2022-01-26 at 4.51.44 PM.png (1×2 px, 1 MB)

mepps added a subscriber: Seddon.

I added the Structured Data tag because we might want some review from them. I also pinged @Seddon on slack to see the best way to reach out to the team because I couldn't find a specific channel.

Luca from Structured Data suggested placing the survey under the options on the right side. We would also need to think about mobile view.

Screen Shot 2022-01-27 at 10.54.23 AM.png (1×610 px, 190 KB)

Luca also pointed me to https://phabricator.wikimedia.org/T258419, where they used QuickSurveys before on commons!

So I've reviewed the ticket above. They originally wanted to put a survey on the page where people used media search but decided against it, and eventually used a static main namespace wiki page with info about media search.

It would required a deeper code re-write but we could also make the survey show up on mediasearch as in the screenshot that's part of the ticket above. I reached out to Luca to ask if we know what pages editors visit most often. Locally, this is how that appears now but we could probably improve it.

Screen Shot 2022-01-27 at 4.13.20 PM.png (1×2 px, 210 KB)

Based on our conversation in engineering yesterday, I think the information you are reporting here answers the the questions, but it would be useful to organize it as user stories (or something similar) to help make it easier to understand the user experience of these different options. Basically, can we organize these technical answers into something a little higher level?

@jsn.sherman Do my changes above address your feedback?

@Madalina This is ready for your review. Let me know if you have questions!

It looks like we got the information we needed, I'm marking this as resolved