You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* seven day feedback
* update feedback survey, account for seven day in heuristic, trackCli
* use seven instead of 7
* always save folks
* update survey URL
* update message
* ignore feedback for CI in all cases
* Update packages/gatsby/src/utils/feedback.ts
* ignore CI check for tests
* mock CI check
* missed some mocking
* add typing
* add typing
* add telemetry for current feedback survey
// This function is designed to be used by `gatsby feedback --disable`
10
13
// and `gatsby feedback --enable`. This key is used to determine
@@ -16,12 +19,28 @@ export function setFeedbackDisabledValue(enabled: boolean): void {
16
19
// Print the feedback request to the user
17
20
exportfunctionshowFeedbackRequest(): void{
18
21
getConfigStore().set(lastDateKey,Date.now())
22
+
trackCli(`SHOW_FEEDBACK_LINK`,{
23
+
name: `https://gatsby.dev/feedback`,
24
+
})
19
25
report.log(
20
26
`\n\nHello! Will you help Gatsby improve by taking a four question survey?\nIt takes less than five minutes and your ideas and feedback will be very helpful.`
21
27
)
22
28
report.log(`\nGive us your feedback here: https://gatsby.dev/feedback\n\n`)
`\n\nHi there! Will you tell us about how you're learning Gatsby? \nIt takes less than 5 minutes and your feedback will help us make installing and using Gatsby so much better.`
38
+
)
39
+
report.log(
40
+
`\nGive us your feedback here: https://gatsby.dev/feedback-survey\n\n`
41
+
)
42
+
}
43
+
25
44
constrandomChanceToBeTrue=(): boolean=>{
26
45
// This is spreading the request volume over the quarter.
27
46
// We are grabbing a randomNumber within the spread of a first day
@@ -59,13 +78,7 @@ export async function userPassesFeedbackRequestHeuristic(): Promise<boolean> {
59
78
returnfalse
60
79
}
61
80
62
-
// Heuristic 2
63
-
if(getConfigStore().get(feedbackKey)===true){
64
-
returnfalse
65
-
}
66
-
67
-
// Heuristic 3
68
-
if(process.env.GATSBY_FEEDBACK_DISABLED===`1`){
81
+
if(isFeedbackDisabled()){
69
82
returnfalse
70
83
}
71
84
@@ -84,6 +97,18 @@ export async function userPassesFeedbackRequestHeuristic(): Promise<boolean> {
84
97
}
85
98
}
86
99
100
+
// we don't want to give them this survey right after the seven day feedback survey
0 commit comments