Skip to content

Commit

Permalink
feat(survey): webdx editing survey (#12132)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo authored Nov 15, 2024
1 parent b3013f9 commit ecf6b9e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/prod-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ jobs:
REACT_APP_SURVEY_END_HOMEPAGE_FEEDBACK_2024: 1732665600000 # new Date("2024-11-27Z").getTime()
REACT_APP_SURVEY_RATE_FROM_HOMEPAGE_FEEDBACK_2024: 0.0
REACT_APP_SURVEY_RATE_TILL_HOMEPAGE_FEEDBACK_2024: 1 # 100%
REACT_APP_SURVEY_START_WEBDX_EDITING_2024: 1731628800000 # new Date("2024-11-15Z").getTime()
REACT_APP_SURVEY_END_WEBDX_EDITING_2024: 1732320000000 # new Date("2024-11-23Z").getTime()
REACT_APP_SURVEY_RATE_FROM_WEBDX_EDITING_2024: 0.0
REACT_APP_SURVEY_RATE_TILL_WEBDX_EDITING_2024: 0.1 # 10%

# Telemetry.
REACT_APP_GLEAN_CHANNEL: prod
Expand Down
16 changes: 15 additions & 1 deletion client/src/ui/molecules/document-survey/surveys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ enum SurveyBucket {
DISCOVERABILITY_AUG_2023 = "DISCOVERABILITY_AUG_2023",
WEB_APP_AUGUST_2024 = "WEB_APP_AUGUST_2024",
HOMEPAGE_FEEDBACK_2024 = "HOMEPAGE_FEEDBACK_2024",
WEBDX_EDITING_2024 = "WEBDX_EDITING_2024",
}

enum SurveyKey {
Expand All @@ -52,6 +53,7 @@ enum SurveyKey {
DISCOVERABILITY_AUG_2023 = "DISCOVERABILITY_AUG_2023",
WEB_APP_AUGUST_2024 = "WEB_APP_AUGUST_2024",
HOMEPAGE_FEEDBACK_2024 = "HOMEPAGE_FEEDBACK_2024",
WEBDX_EDITING_2024 = "WEBDX_EDITING_2024",
}

// When adding a survey, make sure it has this JavaScript action (in Alchemer)
Expand Down Expand Up @@ -93,11 +95,23 @@ export const SURVEYS: Survey[] = [
{
key: SurveyKey.HOMEPAGE_FEEDBACK_2024,
bucket: SurveyBucket.HOMEPAGE_FEEDBACK_2024,
show: (doc: Pick<Doc, "mdn_url">) => /[^/]+\/$/i.test(doc.mdn_url),
show: (doc: Pick<Doc, "mdn_url">) => /^\/[^/]+\/$/i.test(doc.mdn_url),
src: "https://survey.alchemer.com/s3/8075407/MDN-Homepage-Improvements",
teaser: "We are refreshing our homepage and would love",
question: "your input",
...survey_duration(SurveyBucket.HOMEPAGE_FEEDBACK_2024),
...survey_rates(SurveyKey.HOMEPAGE_FEEDBACK_2024),
},
{
key: SurveyKey.WEBDX_EDITING_2024,
bucket: SurveyBucket.WEBDX_EDITING_2024,
show: (doc: Pick<Doc, "mdn_url">) =>
/^\/[^/]+\/docs\/Web\/API($|\/.*$)/i.test(doc.mdn_url),
src: "https://survey.alchemer.com/s3/8045877/MDN-text-edit-survey",
teaser:
"Let us know your thoughts about the following text editing, formatting, selection, and clipboard APIs",
question: "Please share your feedback about the following features.",
...survey_duration(SurveyBucket.WEBDX_EDITING_2024),
...survey_rates(SurveyKey.WEBDX_EDITING_2024),
},
];

0 comments on commit ecf6b9e

Please sign in to comment.