Skip to content

Commit 4906718

Browse files
roagaandrewshie-sentry
authored andcommitted
chore(autofix): Change onboarding copy (#97701)
Change the "next" button to "skip" to make it more clear that you can skip the steps
1 parent a34d416 commit 4906718

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ import {ExternalLink} from 'sentry/components/core/link';
1414
import {useProjectSeerPreferences} from 'sentry/components/events/autofix/preferences/hooks/useProjectSeerPreferences';
1515
import StarFixabilityViewButton from 'sentry/components/events/autofix/seerCreateViewButton';
1616
import {useAutofixRepos} from 'sentry/components/events/autofix/useAutofix';
17-
import {GuidedSteps} from 'sentry/components/guidedSteps/guidedSteps';
17+
import {
18+
GuidedSteps,
19+
useGuidedStepsContext,
20+
} from 'sentry/components/guidedSteps/guidedSteps';
1821
import {IconChevron, IconSeer} from 'sentry/icons';
1922
import {t, tct} from 'sentry/locale';
2023
import {space} from 'sentry/styles/space';
@@ -33,6 +36,24 @@ interface SeerNoticesProps {
3336
hasGithubIntegration?: boolean;
3437
}
3538

39+
function CustomSkipButton({...props}: Partial<React.ComponentProps<typeof Button>>) {
40+
const {currentStep, setCurrentStep, totalSteps} = useGuidedStepsContext();
41+
42+
if (currentStep >= totalSteps) {
43+
return null;
44+
}
45+
46+
const handleSkip = () => {
47+
setCurrentStep(currentStep + 1);
48+
};
49+
50+
return (
51+
<Button size="sm" onClick={handleSkip} {...props}>
52+
{t('Skip')}
53+
</Button>
54+
);
55+
}
56+
3657
function CustomStepButtons({
3758
showBack,
3859
showNext,
@@ -49,7 +70,7 @@ function CustomStepButtons({
4970
return (
5071
<GuidedSteps.ButtonWrapper>
5172
{showBack && <GuidedSteps.BackButton />}
52-
{showNext && <GuidedSteps.NextButton />}
73+
{showNext && <CustomSkipButton />}
5374
{showSkip && (
5475
<Button onClick={onSkip} size="sm">
5576
{t('Skip for Now')}

0 commit comments

Comments
 (0)