1
1
import { Fragment } from 'react' ;
2
2
import styled from '@emotion/styled' ;
3
+ import { AnimatePresence , motion } from 'framer-motion' ;
3
4
4
5
import addIntegrationProvider from 'sentry-images/spot/add-integration-provider.svg' ;
5
6
import feedbackOnboardingImg from 'sentry-images/spot/feedback-onboarding.svg' ;
@@ -88,10 +89,7 @@ export function SeerNotices({groupId, hasGithubIntegration, project}: SeerNotice
88
89
// Onboarding conditions
89
90
const needsGithubIntegration = ! hasGithubIntegration ;
90
91
const needsRepoSelection =
91
- repos . length === 0 &&
92
- ! preference ?. repositories ?. length &&
93
- ! codeMappingRepos ?. length &&
94
- ! isLoadingPreferences ;
92
+ repos . length === 0 && ! preference ?. repositories ?. length && ! codeMappingRepos ?. length ;
95
93
const needsAutomation =
96
94
detailedProject ?. data &&
97
95
( detailedProject ?. data ?. autofixAutomationTuning === 'off' ||
@@ -131,7 +129,7 @@ export function SeerNotices({groupId, hasGithubIntegration, project}: SeerNotice
131
129
return (
132
130
< NoticesContainer >
133
131
{ /* Collapsed summary */ }
134
- { anyStepIncomplete && stepsCollapsed && (
132
+ { ! isLoadingPreferences && anyStepIncomplete && stepsCollapsed && (
135
133
< CollapsedSummaryCard onClick = { ( ) => setStepsCollapsed ( false ) } >
136
134
< IconSeer variant = "waiting" size = "lg" style = { { marginRight : 8 } } />
137
135
< span >
@@ -145,184 +143,199 @@ export function SeerNotices({groupId, hasGithubIntegration, project}: SeerNotice
145
143
</ CollapsedSummaryCard >
146
144
) }
147
145
{ /* Full guided steps */ }
148
- { anyStepIncomplete && ! stepsCollapsed && (
149
- < Fragment >
150
- < StepsHeader >
151
- < IconSeer variant = "waiting" size = "xl" />
152
- Debug Faster with Seer
153
- </ StepsHeader >
154
- < GuidedSteps >
155
- { /* Step 1: GitHub Integration */ }
156
- < GuidedSteps . Step
157
- key = "github-setup"
158
- stepKey = "github-setup"
159
- title = { t ( 'Set Up the GitHub Integration' ) }
160
- isCompleted = { ! needsGithubIntegration }
161
- >
162
- < StepContentRow >
163
- < StepTextCol >
164
- < CardDescription >
165
- < span >
166
- { tct (
167
- 'Seer is [bold:a lot better] when it has your codebase as context.' ,
168
- {
169
- bold : < b /> ,
170
- }
171
- ) }
172
- </ span >
173
- < span >
174
- { tct (
175
- 'Set up the [integrationLink:GitHub Integration] to allow Seer to find the most accurate root causes, solutions, and code changes for your issues.' ,
176
- {
177
- integrationLink : (
178
- < ExternalLink
179
- href = { `/settings/${ organization . slug } /integrations/github/` }
180
- />
181
- ) ,
182
- }
183
- ) }
184
- </ span >
185
- </ CardDescription >
186
- </ StepTextCol >
187
- < StepImageCol >
188
- < CardIllustration src = { addIntegrationProvider } alt = "Add Integration" />
189
- </ StepImageCol >
190
- </ StepContentRow >
191
- < CustomStepButtons
192
- showBack = { false }
193
- showNext = { firstIncompleteIdx !== 0 }
194
- showSkip = { false }
195
- >
196
- < LinkButton
197
- href = { `/settings/${ organization . slug } /integrations/github/` }
198
- size = "sm"
199
- priority = "primary"
200
- >
201
- { t ( 'Set Up Integration' ) }
202
- </ LinkButton >
203
- </ CustomStepButtons >
204
- </ GuidedSteps . Step >
205
-
206
- { /* Step 2: Repo Selection */ }
207
- < GuidedSteps . Step
208
- key = "repo-selection"
209
- stepKey = "repo-selection"
210
- title = { t ( 'Pick Repositories to Work In' ) }
211
- isCompleted = { ! needsRepoSelection }
212
- >
213
- < StepContentRow >
214
- < StepTextCol >
215
- < CardDescription >
216
- < span > { t ( 'Select the repos Seer can explore in this project.' ) } </ span >
217
- < span >
218
- { t (
219
- 'You can also configure working branches and custom instructions so Seer fits your unique workflow.'
220
- ) }
221
- </ span >
222
- </ CardDescription >
223
- </ StepTextCol >
224
- < StepImageCol >
225
- < CardIllustration src = { onboardingCompass } alt = "Compass" />
226
- </ StepImageCol >
227
- </ StepContentRow >
228
- < CustomStepButtons
229
- showBack = { firstIncompleteIdx !== 1 && incompleteStepIndices . includes ( 1 ) }
230
- showNext = { lastIncompleteIdx !== 1 && incompleteStepIndices . includes ( 1 ) }
231
- showSkip = { lastIncompleteIdx === 1 }
232
- onSkip = { ( ) => setStepsCollapsed ( true ) }
233
- >
234
- < LinkButton
235
- to = { `/settings/${ organization . slug } /projects/${ project . slug } /seer/` }
236
- size = "sm"
237
- priority = "primary"
238
- >
239
- { t ( 'Configure Repos' ) }
240
- </ LinkButton >
241
- </ CustomStepButtons >
242
- </ GuidedSteps . Step >
243
-
244
- { /* Step 3: Unleash Automation */ }
245
- { isAutomationAllowed && (
146
+ { ! isLoadingPreferences && anyStepIncomplete && ! stepsCollapsed && (
147
+ < AnimatePresence >
148
+ < motion . div
149
+ initial = { { opacity : 0 , y : 10 , height : 0 } }
150
+ animate = { { opacity : 1 , y : 0 , height : 'auto' } }
151
+ exit = { { opacity : 0 , y : 10 , height : 0 } }
152
+ transition = { { duration : 0.2 } }
153
+ >
154
+ < StepsHeader >
155
+ < IconSeer variant = "waiting" size = "xl" />
156
+ Debug Faster with Seer
157
+ </ StepsHeader >
158
+ < GuidedSteps >
159
+ { /* Step 1: GitHub Integration */ }
246
160
< GuidedSteps . Step
247
- key = "unleash-automation "
248
- stepKey = "unleash-automation "
249
- title = { t ( 'Unleash Automation ' ) }
250
- isCompleted = { ! needsAutomation }
161
+ key = "github-setup "
162
+ stepKey = "github-setup "
163
+ title = { t ( 'Set Up the GitHub Integration ' ) }
164
+ isCompleted = { ! needsGithubIntegration }
251
165
>
252
166
< StepContentRow >
253
167
< StepTextCol >
254
168
< CardDescription >
255
169
< span >
256
- { t (
257
- 'Let Seer automatically deep dive into incoming issues, so you wake up to solutions, not headaches.'
170
+ { tct (
171
+ 'Seer is [bold:a lot better] when it has your codebase as context.' ,
172
+ {
173
+ bold : < b /> ,
174
+ }
175
+ ) }
176
+ </ span >
177
+ < span >
178
+ { tct (
179
+ 'Set up the [integrationLink:GitHub Integration] to allow Seer to find the most accurate root causes, solutions, and code changes for your issues.' ,
180
+ {
181
+ integrationLink : (
182
+ < ExternalLink
183
+ href = { `/settings/${ organization . slug } /integrations/github/` }
184
+ />
185
+ ) ,
186
+ }
258
187
) }
259
188
</ span >
260
189
</ CardDescription >
261
190
</ StepTextCol >
262
191
< StepImageCol >
263
- < CardIllustration src = { waitingForEventImg } alt = "Waiting for Event" />
192
+ < CardIllustration
193
+ src = { addIntegrationProvider }
194
+ alt = "Add Integration"
195
+ />
264
196
</ StepImageCol >
265
197
</ StepContentRow >
266
198
< CustomStepButtons
267
- showBack = { firstIncompleteIdx !== 2 && incompleteStepIndices . includes ( 2 ) }
268
- showNext = { lastIncompleteIdx !== 2 && incompleteStepIndices . includes ( 2 ) }
269
- showSkip = { lastIncompleteIdx === 2 }
270
- onSkip = { ( ) => setStepsCollapsed ( true ) }
199
+ showBack = { false }
200
+ showNext = { firstIncompleteIdx !== 0 }
201
+ showSkip = { false }
271
202
>
272
203
< LinkButton
273
- to = { `/settings/${ organization . slug } /projects/ ${ project . slug } /seer /` }
204
+ href = { `/settings/${ organization . slug } /integrations/github /` }
274
205
size = "sm"
275
206
priority = "primary"
276
207
>
277
- { t ( 'Enable Automation ' ) }
208
+ { t ( 'Set Up Integration ' ) }
278
209
</ LinkButton >
279
210
</ CustomStepButtons >
280
211
</ GuidedSteps . Step >
281
- ) }
282
212
283
- { /* Step 4: Fixability View */ }
284
- { isAutomationAllowed && isStarredViewAllowed && (
213
+ { /* Step 2: Repo Selection */ }
285
214
< GuidedSteps . Step
286
- key = "fixability-view "
287
- stepKey = "fixability-view "
288
- title = { t ( 'Get Some Quick Wins ' ) }
289
- isCompleted = { ! needsFixabilityView }
215
+ key = "repo-selection "
216
+ stepKey = "repo-selection "
217
+ title = { t ( 'Pick Repositories to Work In ' ) }
218
+ isCompleted = { ! needsRepoSelection }
290
219
>
291
220
< StepContentRow >
292
221
< StepTextCol >
293
222
< CardDescription >
294
223
< span >
295
- { t (
296
- 'Seer scans all your issues and highlights the ones that are likely quick to fix.'
297
- ) }
224
+ { t ( 'Select the repos Seer can explore in this project.' ) }
298
225
</ span >
299
226
< span >
300
227
{ t (
301
- 'Star the recommended issue view to keep an eye on quick debugging opportunities. You can customize the view later .'
228
+ 'You can also configure working branches and custom instructions so Seer fits your unique workflow .'
302
229
) }
303
230
</ span >
304
231
</ CardDescription >
305
232
</ StepTextCol >
306
233
< StepImageCol >
307
- < CardIllustration src = { feedbackOnboardingImg } alt = "Feedback " />
234
+ < CardIllustration src = { onboardingCompass } alt = "Compass " />
308
235
</ StepImageCol >
309
236
</ StepContentRow >
310
237
< CustomStepButtons
311
- showBack = { firstIncompleteIdx !== 3 && incompleteStepIndices . includes ( 3 ) }
312
- showNext = { lastIncompleteIdx !== 3 && incompleteStepIndices . includes ( 3 ) }
313
- showSkip = { lastIncompleteIdx === 3 }
238
+ showBack = { firstIncompleteIdx !== 1 }
239
+ showNext = { lastIncompleteIdx !== 1 }
240
+ showSkip = { lastIncompleteIdx === 1 }
314
241
onSkip = { ( ) => setStepsCollapsed ( true ) }
315
242
>
316
- < StarFixabilityViewButton
317
- isCompleted = { ! needsFixabilityView }
318
- project = { project }
319
- />
243
+ < LinkButton
244
+ to = { `/settings/${ organization . slug } /projects/${ project . slug } /seer/` }
245
+ size = "sm"
246
+ priority = "primary"
247
+ >
248
+ { t ( 'Configure Repos' ) }
249
+ </ LinkButton >
320
250
</ CustomStepButtons >
321
251
</ GuidedSteps . Step >
322
- ) }
323
- </ GuidedSteps >
324
- < StepsDivider />
325
- </ Fragment >
252
+
253
+ { /* Step 3: Unleash Automation */ }
254
+ { isAutomationAllowed && (
255
+ < GuidedSteps . Step
256
+ key = "unleash-automation"
257
+ stepKey = "unleash-automation"
258
+ title = { t ( 'Unleash Automation' ) }
259
+ isCompleted = { ! needsAutomation }
260
+ >
261
+ < StepContentRow >
262
+ < StepTextCol >
263
+ < CardDescription >
264
+ < span >
265
+ { t (
266
+ 'Let Seer automatically deep dive into incoming issues, so you wake up to solutions, not headaches.'
267
+ ) }
268
+ </ span >
269
+ </ CardDescription >
270
+ </ StepTextCol >
271
+ < StepImageCol >
272
+ < CardIllustration
273
+ src = { waitingForEventImg }
274
+ alt = "Waiting for Event"
275
+ />
276
+ </ StepImageCol >
277
+ </ StepContentRow >
278
+ < CustomStepButtons
279
+ showBack = { firstIncompleteIdx !== 2 }
280
+ showNext = { lastIncompleteIdx !== 2 }
281
+ showSkip = { lastIncompleteIdx === 2 }
282
+ onSkip = { ( ) => setStepsCollapsed ( true ) }
283
+ >
284
+ < LinkButton
285
+ to = { `/settings/${ organization . slug } /projects/${ project . slug } /seer/` }
286
+ size = "sm"
287
+ priority = "primary"
288
+ >
289
+ { t ( 'Enable Automation' ) }
290
+ </ LinkButton >
291
+ </ CustomStepButtons >
292
+ </ GuidedSteps . Step >
293
+ ) }
294
+
295
+ { /* Step 4: Fixability View */ }
296
+ { isAutomationAllowed && isStarredViewAllowed && (
297
+ < GuidedSteps . Step
298
+ key = "fixability-view"
299
+ stepKey = "fixability-view"
300
+ title = { t ( 'Get Some Quick Wins' ) }
301
+ isCompleted = { ! needsFixabilityView }
302
+ >
303
+ < StepContentRow >
304
+ < StepTextCol >
305
+ < CardDescription >
306
+ < span >
307
+ { t (
308
+ 'Seer scans all your issues and highlights the ones that are likely quick to fix.'
309
+ ) }
310
+ </ span >
311
+ < span >
312
+ { t (
313
+ 'Star the recommended issue view to keep an eye on quick debugging opportunities. You can customize the view later.'
314
+ ) }
315
+ </ span >
316
+ </ CardDescription >
317
+ </ StepTextCol >
318
+ < StepImageCol >
319
+ < CardIllustration src = { feedbackOnboardingImg } alt = "Feedback" />
320
+ </ StepImageCol >
321
+ </ StepContentRow >
322
+ < CustomStepButtons
323
+ showBack = { firstIncompleteIdx !== 3 }
324
+ showNext = { lastIncompleteIdx !== 3 }
325
+ showSkip = { lastIncompleteIdx === 3 }
326
+ onSkip = { ( ) => setStepsCollapsed ( true ) }
327
+ >
328
+ < StarFixabilityViewButton
329
+ isCompleted = { ! needsFixabilityView }
330
+ project = { project }
331
+ />
332
+ </ CustomStepButtons >
333
+ </ GuidedSteps . Step >
334
+ ) }
335
+ </ GuidedSteps >
336
+ < StepsDivider />
337
+ </ motion . div >
338
+ </ AnimatePresence >
326
339
) }
327
340
{ /* Banners for unreadable repos */ }
328
341
{ hasMultipleUnreadableRepos && (
@@ -430,6 +443,7 @@ const StepsHeader = styled('h3')`
430
443
gap: ${ space ( 1 ) } ;
431
444
font-size: ${ p => p . theme . fontSizeExtraLarge } ;
432
445
margin-bottom: ${ space ( 0.5 ) } ;
446
+ margin-left: 1px;
433
447
` ;
434
448
435
449
const StepsDivider = styled ( 'hr' ) `
0 commit comments