Page MenuHomePhabricator

Update QuickSurveys to support ReadingLists beta survey
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

The ReadingLists beta survey has a modern design to capture user satisfaction. The desired UI is not currently supported in the QuickSurveys extension.

Design requirements

Link to figma

Desktop

New Vector (17).png (1,440×773 px, 193 KB)
New Vector (16).png (1,440×773 px, 341 KB)

Mobile

Saved pages (3).png (384×773 px, 146 KB)
Saved pages (4).png (384×773 px, 145 KB)
Saved pages (5).png (384×773 px, 45 KB)

Technical requirements

We explored adding a new question type or other config property to QuickSurveys that would enable anyone to create a survey following the design spec for the ReadingLists beta survey. However, it wasn't worth refactoring QuickSurveys' UI code or styles, nor complicating its configuration.

Instead, we will:

  • Add a simple API to QuickSurveys that allows you to log a survey response from an extension
  • Build the survey UI in ReadingLists
  • Use the new API to log survey responses in ReadingLists

Prior art:


Requirements

Acceptance criteria

  • Reader Experience team agrees on how to implement this.
  • QuickSurveys exports an API to log survey responses
  • The survey in ReadingLists meets the design spec
  • When the ReadingLists survey is submitted, a survey response is logged

BDD

  • For QA engineer to fill out.

Test Steps

  • For QA engineer to fill out.

Rollback plan

Since we're just adding a simple API to QuickSurveys, there should be no risk of disrupting currently running surveys.

This task was created by Version 1.0.0 of the Reader Experience team task template using phabulous.

Event Timeline

AnneT set the point value for this task to 3.
aude renamed this task from Update QuickSurveys to support ReadingListts beta survey to Update QuickSurveys to support ReadingLists beta survey.Mar 10 2026, 3:17 PM

Sample config for local dev and testing:

$wgQuickSurveysConfig = [
	[
		'name' => 'ReadingLists beta feature survey',
		'type' => 'internal',
		'questions' => [
			[
				'name' => 'enjoyment',
				'question' => 'readinglists-betafeature-quicksurvey-question',
				'layout' => 'simple-feedback',
				'answers' => [
					[ 'label' => 'readinglists-betafeature-quicksurvey-answer-positive' ],
					[ 'label' => 'readinglists-betafeature-quicksurvey-answer-negative' ]
				],
				'shuffleAnswersDisplay' => false,
			],
		],
		// TODO: set embedElementId to ~ and display survey via showSurvey API.
		// This is all configured to make the survey show up for everyone.
		// TODO: Show survey for the right users.
		'audience' => [
			'minEdits' => 0,
			'registrationStart' => '2018-01-01',
			'registrationEnd' => '2080-01-31'
		],
		'privacyPolicy' => 'ext-quicksurveys-example-external-survey-privacy-policy',
		'enabled' => true,
		'coverage' => 100,
		'platforms' => [
			'desktop' => [ 'stable' ],
			'mobile' => [ 'stable' ]
		],
	]
]

Then add the following to your i18n files in ReadingLists:

// in en.json
	"readinglists-betafeature-quicksurvey-question": "Are you enjoying this feature?",
	"readinglists-betafeature-quicksurvey-answer-positive": "👍 Yes",
	"readinglists-betafeature-quicksurvey-answer-negative": "👎 No"

// in qqq.json
	"readinglists-betafeature-quicksurvey-question": "QuickSurvey question asking for feedback on the ReadingLists beta feature.",
	"readinglists-betafeature-quicksurvey-answer-positive": "Positive response to survey question",
	"readinglists-betafeature-quicksurvey-answer-negative": "Negative response to survey question"

hey @SToyofuku-WMF, @Jdlrobson has some feedback on how we might handle this that differs from what I've suggested, so let's discuss before you get too far on this task (sorry if you already have!)

Change #1251163 had a related patch set uploaded (by Stoyofuku-wmf; author: Stoyofuku-wmf):

[mediawiki/extensions/ReadingLists@master] Proof of concept: Configure quicksurvey to show layout

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

Test wiki created on Patch demo by SToyofuku-WMF using patch(es) linked to this task:
https://ca06638f4e.catalyst.wmcloud.org/w/

Patchdemo was just down and is back up, but I'm getting database errors that don't seem to have anything to do with what I changed - while I'm debugging that, here are screenshots as promised:

image.png (1,970×910 px, 142 KB)

image.png (1,960×980 px, 155 KB)

image.png (1,980×1,020 px, 159 KB)

Some clear limitations with quicksurveys out of the box 🙃

Thanks @SToyofuku-WMF! Yeahhhh not being able to label the text input is a big problem :/ The radio buttons also look pretty silly IMO. Curious what @Sneha thinks!

This comment was removed by AnneT.

Thanks Steph... Yeah I agree the radio buttons don't have the same effect. But we could change the copy/options that may be more suitable for this UI. Also I wonder if that input box can be made any bigger its so small. Also curious if this box would overlap the reading list items?

We can discuss this in our mid sprint review on Monday.

Change #1251163 abandoned by Stoyofuku-wmf:

[mediawiki/extensions/ReadingLists@master] Proof of concept: Configure quicksurvey to show layout

Reason:

Not doing this approach anymore

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

Change #1255811 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/QuickSurveys@master] POC: Add new API for logging answers from custom survey UIs

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

Change #1255812 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/ReadingLists@master] POC: A custom UI survey that uses QuickSurveys API

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

@SToyofuku-WMF @AnneT I went ahead and created a proof of concept to suggest a lightweight change we can make to QuickSurveys to unblock this. Let me know what you think.

Test wiki created on Patch demo by Jon (WMF) using patch(es) linked to this task:
https://4afcc7ad05.catalyst.wmcloud.org/w/

Change #1256387 had a related patch set uploaded (by Stoyofuku-wmf; author: Stoyofuku-wmf):

[mediawiki/extensions/QuickSurveys@master] Proof of concept: Simple Feedback component

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

SToyofuku-WMF changed the task status from Open to Stalled.Mar 20 2026, 1:48 PM

Gonna be bold and move this to stalled as there is ongoing discussion around the approach in slack

hey @Jdlrobson, I'm writing a testing strategy and am looking into how we can discover currently running surveys. So far, I'm looking at $wgQuickSurveysConfig in mediawiki-config and other codebases, plus searching for uses of showSurvey(). Is there anything I'm missing?

AnneT changed the task status from Stalled to In Progress.Mar 25 2026, 5:29 PM
AnneT claimed this task.
AnneT added a subscriber: SToyofuku-WMF.

Change #1261437 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/extensions/QuickSurveys@master] [PoC] Build user sentiment survey style

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

Change #1261441 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/extensions/ReadingLists@master] Add beta feature survey

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

Test wiki created on Patch demo by ATomasevich (WMF) using patch(es) linked to this task:
https://ae000ede16.catalyst.wmcloud.org/w/

hey @Jdlrobson, I'm writing a testing strategy and am looking into how we can discover currently running surveys. So far, I'm looking at $wgQuickSurveysConfig in mediawiki-config and other codebases, plus searching for uses of showSurvey(). Is there anything I'm missing?

https://codesearch.wmcloud.org/search/?q=%28QuickSurveysConfig%7ConQuickSurveysEnabled%29&files=&excludeFiles=&repos= is sufficient. Note the hook onQuickSurveysEnabled now allows registering surveys outside of configuration.

AnneT removed AnneT as the assignee of this task.Mar 30 2026, 6:00 PM

Change #1255811 merged by jenkins-bot:

[mediawiki/extensions/QuickSurveys@master] Add new API for logging answers from custom survey UIs

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

Change #1261441 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Add beta feature survey

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

Change #1255812 abandoned by Anne Tomasevich:

[mediawiki/extensions/ReadingLists@master] POC: A custom UI survey that uses QuickSurveys API

Reason:

In favor of I7cd187eb374f728593f43b80d81cb9ce52694978

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

Change #1256387 abandoned by Stoyofuku-wmf:

[mediawiki/extensions/QuickSurveys@master] Proof of concept: Simple Feedback component

Reason:

We're no longer going with this approach

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

Test wiki on Patch demo by ATomasevich (WMF) using patch(es) linked to this task was deleted:

https://ae000ede16.catalyst.wmcloud.org/w/

Test wiki on Patch demo by Jon (WMF) using patch(es) linked to this task was deleted:

https://4afcc7ad05.catalyst.wmcloud.org/w/

Test wiki on Patch demo by SToyofuku-WMF using patch(es) linked to this task was deleted:

https://ca06638f4e.catalyst.wmcloud.org/w/