Page MenuHomePhabricator

Quick Survey config for feedback on AX

Authored By
abi_
Mar 3 2025, 2:11 PM
Size
2 KB
Referenced Files
None
Subscribers
None

Quick Survey config for feedback on AX

See: https://phabricator.wikimedia.org/T381886
To be used to test the patch: 1123618: AX: Show card to submit feedback on view translation page | https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/1123618
```
lang=php
<?php
$wgQuickSurveysConfig = [
// Example of an internal survey with multiple questions
[
'name' => 'ax-translation-view-feedback-survey',
'type' => 'internal',
'embedElementId' => 'ax-translation-viewer-section-container',
'confirmMsg' => 'ax-translation-view-feedback-confirm-title',
'confirmDescription' => 'ax-translation-view-feedback-confirm-description',
// Who is the survey for? All fields are optional.
'audience' => [
'anons' => true,
],
// The i18n key of the privacy policy text
'privacyPolicy' => 'ax-translation-view-feedback-privacy-statement',
// Whether the survey is enabled
'enabled' => true,
// Percentage of users that will see the survey
'coverage' => 1,
// For each platform (desktop, mobile), which version of it is targeted
'platforms' => [
'desktop' => [ 'stable' ],
'mobile' => [ 'stable' ]
],
'questions' => [
[
'name' => 'ax-translation-view-feedback-useful',
'layout' => 'single-answer',
'question' => 'ax-translation-view-feedback-title',
'answers' => [
// These below only have label message keys
[ 'label' => 'ax-translation-view-feedback-positive' ],
[ 'label' => 'ax-translation-view-feedback-negative' ]
]
],
// Question 2 - Depends on question 1 and the answer needs to be 'yes'
[
'name' => 'ax-feedback-positive-question',
'dependsOn' => [
[
'question' => 'ax-translation-view-feedback-useful',
'answerIsOneOf' => [ 'ax-translation-view-feedback-positive' ]
]
],
'layout' => 'multiple-answer',
'question' => 'ax-translation-view-feedback-details-question',
'answers' => [
[ 'label' => 'ax-translation-view-feedback-positive-missing-information' ],
[ 'label' => 'ax-translation-view-feedback-positive-translation-quality' ],
[ 'label' => 'ax-translation-view-feedback-positive-quick-overview' ],
[ 'label' => 'ax-translation-view-feedback-positive-technical-aspect' ],
],
],
// Question 3 - Depends on question 1 and the answer needs to be 'no'
[
'name' => 'ax-feedback-negative-question',
'dependsOn' => [
[
'question' => 'ax-translation-view-feedback-useful',
'answerIsOneOf' => [ 'ax-translation-view-feedback-negative' ]
]
],
'layout' => 'multiple-answer',
'question' => 'ax-translation-view-feedback-details-question',
'answers' => [
[ 'label' => 'ax-translation-view-feedback-negative-missing-information' ],
[ 'label' => 'ax-translation-view-feedback-negative-translation-quality' ],
[ 'label' => 'ax-translation-view-feedback-negative-quick-overview' ],
[ 'label' => 'ax-translation-view-feedback-negative-technical-aspect' ]
],
],
]
]
];
```

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
19378689
Default Alt Text
Quick Survey config for feedback on AX (2 KB)

Event Timeline