Background
We'd like to run surveys inside special pages and inside workflows (e.g. within the editor) or after certain events (e.g. completing an edit). By providing an API along with configuration options T393436: Improve QuickSurveys placement algorithm for non-Wikipedia support and T360996: Enable QuickSurveys to target users on different namespaces we will empower developers to setup and embed surveys in their pages.
User story
As a product owner of a special page I want to target users with surveys relating to the feature.
Requirements
- There is an API that special pages can use to insert surveys
- It is possible to set up a survey that will not be automatically added to the page.
BDD
- For QA engineer to fill out
Test Steps
- For QA engineer to fill out
Design
- Add mockups and design requirements
Acceptance criteria
- The ext.quicksurveys.lib module should be undeprecated and annotated with the @stable keyword to ensure that developers are aware it is stable to use.
- The module ext.quicksurveys.lib exports a function showSurvey. showSurvey takes an additional parameter - the embed ID of the survey
- showSurvey will add no survey to page if the ID of the survey doesn’t exist.
- When force is set to false, and the ID matches an active survey, but the survey is not applicable to the page (e.g. the user does not match the current audience or platforms or coverage), showSurvey will not insert a survey into the page.
- When force is set to true, sampling does not run. If the Id matches a survey a DOMElement will be returned which relates to the rendered server.
- The showSurvey function is documented on wiki as stable.
Communication criteria - does this need an announcement or discussion?
- Add communication criteria
Rollback plan
- What is the rollback plan in production for this task if something goes wrong?
This task was created by Version 1.2.0 of the Web team task template using phabulous