Skip to content

Commit 43c01de

Browse files
authored
feat(platform): Default uncheck onboarding options (#12942)
* uncheck onboarding options * uncheck default option for php
1 parent 301205e commit 43c01de

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

docs/platforms/php/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ categories:
2626
},
2727
{
2828
id: 'performance',
29-
checked: true,
29+
checked: false,
3030
},
3131
{
3232
id: 'profiling',

src/components/onboarding/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,12 @@ export function OnboardingOptionButtons({
127127
}) {
128128
const normalizedOptions = initialOptions.map(option => {
129129
if (typeof option === 'string') {
130-
return {id: option, disabled: option === 'error-monitoring'};
130+
return {
131+
id: option,
132+
// error monitoring is always needs to be checked and disabled
133+
disabled: option === 'error-monitoring',
134+
checked: option === 'error-monitoring',
135+
};
131136
}
132137
return option;
133138
});
@@ -137,8 +142,8 @@ export function OnboardingOptionButtons({
137142
const [options, setSelectedOptions] = useState<OnboardingOptionType[]>(
138143
normalizedOptions.map(option => ({
139144
...option,
140-
// default to checked if not excplicitly set
141-
checked: option.checked ?? true,
145+
// default to unchecked if not excplicitly set
146+
checked: option.checked ?? false,
142147
}))
143148
);
144149
const [touchedOptions, touchOptions] = useReducer(() => true, false);

0 commit comments

Comments
 (0)