Skip to content

Commit de8d41c

Browse files
author
Guy Sleigh
authored
MDN add browsers short survey (mdn#7336)
* Add browsers survey to 5% audience * remove unused * Add prod values for survey
1 parent 29366f9 commit de8d41c

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.github/workflows/prod-build.yml

+5
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@ jobs:
182182
REACT_APP_SURVEY_RATE_FROM_CSS_CASCADE_2022_B: 0.05
183183
REACT_APP_SURVEY_RATE_TILL_CSS_CASCADE_2022_B: 0.1
184184

185+
REACT_APP_SURVEY_START_BROWSER_SURVEY_OCT_2022: 1665655200000 # (new Date("2022-10-13 12:00:00")).getTime()
186+
REACT_APP_SURVEY_END_BROWSER_SURVEY_OCT_2022: 1666260000000 # (new Date("2022-10-20 12:00:00")).getTime()
187+
REACT_APP_SURVEY_RATE_FROM_BROWSER_SURVEY_OCT_2022: 0.0 # 5 %
188+
REACT_APP_SURVEY_RATE_TILL_BROWSER_SURVEY_OCT_2022: 0.05 # 5 %
189+
185190
REACT_APP_GLEAN_CHANNEL: prod
186191
REACT_APP_GLEAN_ENABLED: true
187192

.github/workflows/stage-build.yml

+5
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@ jobs:
179179
REACT_APP_SURVEY_RATE_FROM_CSS_CASCADE_2022_B: 0.25 # 25 %
180180
REACT_APP_SURVEY_RATE_TILL_CSS_CASCADE_2022_B: 0.5 # 25 %
181181

182+
REACT_APP_SURVEY_START_BROWSER_SURVEY_OCT_2022: 1665568800000 # (new Date("2022-10-12 12:00:00")).getTime()
183+
REACT_APP_SURVEY_END_BROWSER_SURVEY_OCT_2022: 1666173600000 # (new Date("2022-10-19 12:00:00")).getTime()
184+
REACT_APP_SURVEY_RATE_FROM_BROWSER_SURVEY_OCT_2022: 0.0 # 5 %
185+
REACT_APP_SURVEY_RATE_TILL_BROWSER_SURVEY_OCT_2022: 0.05 # 5 %
186+
182187
REACT_APP_GLEAN_CHANNEL: stage
183188
REACT_APP_GLEAN_ENABLED: true
184189

client/src/ui/molecules/document-survey/surveys.ts

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Doc } from "../../../../../libs/types/document";
2+
import { survey_duration, survey_rates } from "../../../env";
23

34
export interface Survey {
45
key: SurveyKey;
@@ -17,12 +18,28 @@ export interface Survey {
1718
}
1819

1920
enum SurveyBucket {
21+
BROWSER_SURVEY_OCT_2022 = "BROWSER_SURVEY_OCT_2022",
2022
CSS_CASCADE_2022 = "CSS_CASCADE_2022",
2123
}
2224

2325
enum SurveyKey {
26+
BROWSER_SURVEY_OCT_2022 = "BROWSER_SURVEY_OCT_2022",
2427
CSS_CASCADE_2022_A = "CSS_CASCADE_2022_A",
2528
CSS_CASCADE_2022_B = "CSS_CASCADE_2022_B",
2629
}
2730

28-
export const SURVEYS: Survey[] = [];
31+
export const SURVEYS: Survey[] = [
32+
{
33+
key: SurveyKey.BROWSER_SURVEY_OCT_2022,
34+
bucket: SurveyBucket.BROWSER_SURVEY_OCT_2022,
35+
show: (doc: Doc) =>
36+
doc?.body.some((section) => section.type === "browser_compatibility"),
37+
src: "https://survey.alchemer.com/s3/7049440/Short-survey-browsers",
38+
teaser:
39+
"What is important to you when deciding which browser features to use? Take our 1 minute survey:",
40+
question:
41+
"What's important to you when deciding which browser features to use?",
42+
...survey_duration(SurveyBucket.BROWSER_SURVEY_OCT_2022),
43+
...survey_rates(SurveyKey.BROWSER_SURVEY_OCT_2022),
44+
},
45+
];

0 commit comments

Comments
 (0)