-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nextjs): Add feature selection #631
Conversation
|
947aa1e
to
c7ef8a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Whoops I actually forgot to press submit on these comments, sorry for the delay!)
test/nextjs/templates.test.ts
Outdated
@@ -82,6 +98,20 @@ describe('NextJS code templates', () => { | |||
// side errors will fail. | |||
tunnelRoute: "/monitoring", | |||
|
|||
async headers() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this has to be put in the actual Next.js config - not the SDK config :/ But that can get very complicated, we could leave profiling out for now.
src/utils/clack-utils.ts
Outdated
export async function askShouldUseDefaulFeatureSet(): Promise<boolean> { | ||
return traceStep('ask-use-default-feature-set', () => | ||
abortIfCancelled( | ||
clack.confirm({ | ||
message: 'Do you want to use the default feature set?', | ||
initialValue: true, | ||
}), | ||
), | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not give users this option! I think it is valuable for them to walk through what they are missing out on.
src/nextjs/nextjs-wizard.ts
Outdated
export const NEXTJS_FEATURE_SET: Feature[] = [ | ||
{ | ||
id: 'performance', | ||
name: 'Performance Monitoring', | ||
}, | ||
{ | ||
id: 'replay', | ||
name: 'Session Replay', | ||
}, | ||
{ | ||
id: 'profiling', | ||
name: 'Profiling', | ||
}, | ||
{ | ||
id: 'spotlight', | ||
name: 'Spotlight', | ||
}, | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One big part of giving users the option to select and deselct features is that we get to briefly explain these concepts to them, so ideally we give them short but valuable descriptions on all of these!
2e7b17f
to
37eb3a2
Compare
src/nextjs/nextjs-wizard.ts
Outdated
{ | ||
id: 'performance', | ||
name: 'Performance Monitoring', | ||
description: 'Monitor your app performance and find bottlenecks.', | ||
recommended: true, | ||
}, | ||
{ | ||
id: 'replay', | ||
name: 'Session Replay', | ||
description: 'Replay user sessions to reproduce and fix bugs.', | ||
}, | ||
{ | ||
id: 'spotlight', | ||
name: 'Spotlight', | ||
description: `Use Sentry's Spotlight debug tool (https://spotlightjs.com/) for your development workflow.`, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lforst - Please feel free to update the descriptions I added here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a quick pass, sorry to be so annoying about things. The wizard is a really really hot path in the onboarding and it needs to be bulletproof.
src/utils/clack-utils.ts
Outdated
|
||
export async function featureSelectionPrompt(features: Feature[]) { | ||
return traceStep('feature-selection', async () => { | ||
return clack.multiselect({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to give every option its own yes/no step. 🤔 We can keep the features logic though, I like that!
src/nextjs/nextjs-wizard.ts
Outdated
id: 'performance', | ||
name: 'Performance Monitoring', | ||
description: 'Monitor your app performance and find bottlenecks.', | ||
recommended: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if recommendations make to much sense 😄 technically all of the features are always recommended.
863a13d
to
bdb6aa0
Compare
bdb6aa0
to
85794d2
Compare
Part of: #622
This PR introduces:
Spotlight (optionally generates config for it but it's still commented out like before)(Spotlight needs more setup and we'll do in a follow-up)