Skip to content

Commit 28a681b

Browse files
committed
try some fixes
1 parent 59b3ca4 commit 28a681b

File tree

3 files changed

+31
-17
lines changed

3 files changed

+31
-17
lines changed

docs/platforms/javascript/guides/react/index.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,6 @@ To capture Redux state data, use `Sentry.createReduxEnhancer` when initializing
201201

202202
Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
203203

204-
</OnboardingOption>
205-
206-
</OnboardingSteps>
207-
208204
### Issues
209205

210206
To verify that Sentry captures errors and creates issues in your Sentry project, add the following test button to one of your pages, which will trigger an error that Sentry will capture when you click it:
@@ -227,6 +223,8 @@ To verify that Sentry captures errors and creates issues in your Sentry project,
227223

228224
<PlatformContent includePath="getting-started-browser-sandbox-warning" />
229225

226+
</OnboardingOption>
227+
230228
<OnboardingOption optionId="performance">
231229
### Tracing
232230

@@ -251,6 +249,8 @@ Open the page in a browser (for most React applications, this will be at localho
251249

252250
</OnboardingOption>
253251

252+
<OnboardingOption>
253+
254254
### View Captured Data in Sentry
255255

256256
Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
@@ -274,3 +274,7 @@ Now's a good time to customize your setup and look into more advanced topics. Ou
274274
- [Get support](https://sentry.zendesk.com/hc/en-us/)
275275

276276
</Expandable>
277+
278+
</OnboardingOption>
279+
280+
</OnboardingSteps>

docs/platforms/javascript/guides/svelte/index.mdx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ categories:
99

1010
<PlatformContent includePath="getting-started-prerequisites" />
1111

12-
## Step 1: Install
12+
<OnboardingSteps>
13+
14+
<OnboardingOption isStep>
15+
16+
## Install
1317

1418
Choose the features you want to configure, and this guide will show you how:
1519

@@ -34,8 +38,11 @@ yarn add @sentry/svelte
3438
```bash {tabTitle:pnpm}
3539
pnpm add @sentry/svelte
3640
```
41+
</OnboardingOption>
3742

38-
## Step 2: Configure
43+
<OnboardingOption isStep>
44+
45+
## Configure
3946

4047
To use the SDK, initialize it in your Svelte entry point before bootstrapping your app. In a typical Svelte project, that is your `main.js` or `main.ts` file.
4148

@@ -160,10 +167,10 @@ const app = new App({
160167

161168
export default app;
162169
```
163-
164-
<OnboardingSteps>
170+
</OnboardingOption>
165171

166172
<OnboardingOption isStep>
173+
167174
## Add Readable Stack Traces With Source Maps (Optional)
168175

169176
<PlatformContent includePath="getting-started-sourcemaps-short-version" />
@@ -180,10 +187,6 @@ export default app;
180187
<OnboardingOption isStep>
181188
## Verify Your Setup
182189

183-
</OnboardingOption>
184-
185-
</OnboardingSteps>
186-
187190
Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
188191

189192
### Issues
@@ -218,6 +221,8 @@ To verify that Sentry captures errors and creates issues in your Sentry project,
218221

219222
<PlatformContent includePath="getting-started-browser-sandbox-warning" />
220223

224+
</OnboardingOption>
225+
221226
<OnboardingOption optionId="performance">
222227
### Tracing
223228

@@ -257,6 +262,7 @@ Open the page in a browser and click the button to trigger a frontend error and
257262

258263
</OnboardingOption>
259264

265+
<OnboardingOption>
260266
### View Captured Data in Sentry
261267

262268
Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
@@ -280,3 +286,7 @@ Now's a good time to customize your setup and look into more advanced topics. Ou
280286
- [Get support](https://sentry.zendesk.com/hc/en-us/)
281287

282288
</Expandable>
289+
290+
</OnboardingOption>
291+
292+
</OnboardingSteps>

src/components/onboarding/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,18 +142,18 @@ const validateOptionIds = (options: Pick<OnboardingOptionType, 'id'>[]) => {
142142

143143
export function OnboardingOption({
144144
children,
145-
optionId,
145+
optionId = 'all',
146146
hideForThisOption,
147147
isStep = false,
148148
}: {
149149
children: ReactNode;
150-
optionId: OptionId;
150+
optionId: OptionId | 'all';
151151
hideForThisOption?: boolean;
152152
isStep?: boolean;
153153
}) {
154-
// Allow not passing an optionId when isStep is true
155-
if (!isStep || optionId) {
156-
validateOptionIds([{id: optionId}]);
154+
if (!isStep || optionId !== 'all') {
155+
// Allow not passing an optionId when isStep is true
156+
validateOptionIds([{id: optionId as OptionId}]);
157157
}
158158
const className = [hideForThisOption ? 'hidden' : '', isStep ? 'onboarding-step' : '']
159159
.filter(Boolean)

0 commit comments

Comments
 (0)