== Background
We'd like to run surveys inside special pages. By providing an API along with configuration options {T393436} and {T360996} 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. A new method makeSurvey will be added that allows you to request the creation of the survey.
makeSurvey takes two parameters - the ID of the survey and an optional boolean “force” which defaults to false
[] makeSurvey will return null 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), makeSurvey will return null.
[] 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 refactored to make use of `makeSurvey` for common logic.
== 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 [[ https://mediawiki.org/w/index.php?title=Reading/Web/Request_process | Web team task template ]] using [[ https://phabulous.toolforge.org/ | phabulous ]] //