Page MenuHomePhabricator

QuickSurveys: Allow custom answers on external surveys
Closed, ResolvedPublic

Description

Issue

External surveys (those that direct the user to an external link) from Extension:QuickSurveys are hard-coded to use the messages ext-quicksurveys-external-survey-yes-button (en: Visit survey!) and ext-quicksurveys-external-survey-no-button (en: No thanks). So it's not possible to use custom messages for the visit/ignore actions in contexts where a different phrasing would be better suited.

Example/Use Case

e.g.

Screenshot from 2022-09-01 18-51-50.png (354×319 px, 28 KB)

The surveys from (T316464) have the purpose of collecting contact information from willing users for participation in a Design Research program. The word survey can be associated with a long & tedious task which in this case misleads and might negatively affect the response rate.

Expectation

Support custom messages for those actions on external surveys so those deploying then have more control over the UI and can tailor the messages to fit their context.

Event Timeline

DDeSouza changed the task status from Open to Stalled.Mar 7 2023, 8:57 PM
DDeSouza triaged this task as Lowest priority.

@phuedx Can I do the following changes instead?

  • ext-quicksurveys-external-survey-yes-button from Visit survey to Yes
  • ext-quicksurveys-external-survey-no-button from No thanks to No

That's what we are trying to achieve.

Change 916690 had a related patch set uploaded (by DDesouza; author: DDesouza):

[mediawiki/extensions/QuickSurveys@master] Extend external survey to support custom answers

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

DDeSouza raised the priority of this task from Lowest to High.May 23 2023, 9:49 PM

@phuedx Can I do the following changes instead?

  • ext-quicksurveys-external-survey-yes-button from Visit survey to Yes
  • ext-quicksurveys-external-survey-no-button from No thanks to No

That's what we are trying to achieve.

That would change the message for all external surveys across all languages on all wikis. I'd run that change by @ovasileva, Product Owner for Readers Web, the team that owns QuickSurveys.

The above said, the approach you're taking in your patch looks good. I'd be happy to take the time to review it, given the increase in priority of the task.

@DDeSouza - would it be possible to explore the approach from the task description on allowing custom answers. That feels a bit more flexible for the future.

Hi @ovasileva. Sorry about the delay.

would it be possible to explore the approach from the task description on allowing custom answers. That feels a bit more flexible for the future.

I think so though I'm new to the code base. I drafted it in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/QuickSurveys/+/916690/.

Change 942630 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/QuickSurveys@master] Allow custom yes/no button i18n messages on extenal surveys

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

@DDeSouza, all: I hope you don't mind but I had a go at implementing this myself in order to refamiliarise myself with the QuickSurveys codebase. There were a few more steps that needed to be taken in order to get this to work but it wasn't overly complicated.

Here's a screenshot of an example external survey with custom i18n message keys set on my local wiki:

Screenshot 2023-07-28 at 11.45.47.png (2×3 px, 1 MB)

Don't mind at all. Thank you! @phuedx This is exactly what was intended.

Change 942630 merged by jenkins-bot:

[mediawiki/extensions/QuickSurveys@master] Allow custom yes/no button i18n messages on extenal surveys

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

DDeSouza assigned this task to phuedx.

Thanks @phuedx!

Change 916690 abandoned by DDesouza:

[mediawiki/extensions/QuickSurveys@master] Extend external survey to support custom answers

Reason:

Replaced by Iefb45ab49653ed855c9bd51887b90881dfcfe1ff

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