Skip to content

Commit 6187f3f

Browse files
ref(replays): make unsupported banner wording more general (#67174)
Making changes based on the Figma: https://www.figma.com/file/bbTpXNRRu7NY4MDaAAFiJe/Specs%3A-Session-Replay-Mobile-Alpha-1?type=design&node-id=1-2768&mode=design&t=sjABiU8hIhkZdf2t-0 The banner is more general, and links to our product page that explains what SDKs we support, rather than the javascript page. <img width="1202" alt="SCR-20240318-lodr" src="https://github.com/getsentry/sentry/assets/56095982/dfccd713-fd2d-47e0-8d07-2a8c2d2feaf2">
1 parent f359d63 commit 6187f3f

File tree

3 files changed

+16
-27
lines changed

3 files changed

+16
-27
lines changed
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1+
import {Fragment} from 'react';
2+
13
import ReplayUnsupportedAlert from 'sentry/components/replays/alerts/replayUnsupportedAlert';
2-
import Matrix from 'sentry/components/stories/matrix';
34
import storyBook from 'sentry/stories/storyBook';
45

56
export default storyBook(ReplayUnsupportedAlert, story => {
6-
story('All', () => (
7-
<Matrix
8-
propMatrix={{
9-
primaryAction: ['create', 'setup'],
10-
projectSlug: ['MY-PROJECT'],
11-
}}
12-
render={ReplayUnsupportedAlert}
13-
selectedProps={['primaryAction', 'projectSlug']}
14-
/>
15-
));
7+
story('All', () => {
8+
return (
9+
<Fragment>
10+
<p>Requires a project slug to be passed in:</p>
11+
<ReplayUnsupportedAlert projectSlug="MY-PROJECT" />
12+
</Fragment>
13+
);
14+
});
1615
});

static/app/components/replays/alerts/replayUnsupportedAlert.tsx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,19 @@ import {IconInfo} from 'sentry/icons';
44
import {t, tct} from 'sentry/locale';
55

66
interface Props {
7-
primaryAction: 'create' | 'setup';
87
projectSlug: string;
98
}
109

11-
export default function ReplayUnsupportedAlert({primaryAction, projectSlug}: Props) {
10+
export default function ReplayUnsupportedAlert({projectSlug}: Props) {
1211
const link = (
13-
<ExternalLink href="https://docs.sentry.io/platforms/javascript/session-replay/" />
12+
<ExternalLink href="https://docs.sentry.io/product/session-replay/getting-started/" />
1413
);
1514
return (
1615
<Alert icon={<IconInfo />}>
1716
<strong>{t(`Session Replay isn't available for %s.`, projectSlug)}</strong>{' '}
18-
{primaryAction === 'create'
19-
? tct(
20-
`Create a project using our [link:Sentry browser SDK package], or equivalent framework SDK.`,
21-
{link}
22-
)
23-
: tct(
24-
`Select a project using our [link:Sentry browser SDK package], or equivalent framework SDK.`,
25-
{link}
26-
)}
17+
{tct(`To learn more about which SDKs we support, please visit our [link:docs].`, {
18+
link,
19+
})}
2720
</Alert>
2821
);
2922
}

static/app/views/replays/list/replayOnboardingPanel.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,7 @@ export default function ReplayOnboardingPanel() {
9494
<Fragment>
9595
<OnboardingAlertHook>
9696
{hasSelectedProjects && allSelectedProjectsUnsupported && (
97-
<ReplayUnsupportedAlert
98-
primaryAction={primaryAction}
99-
projectSlug={selectedProjects[0].slug}
100-
/>
97+
<ReplayUnsupportedAlert projectSlug={selectedProjects[0].slug} />
10198
)}
10299
</OnboardingAlertHook>
103100
<ReplayPanel image={<HeroImage src={emptyStateImg} breakpoints={breakpoints} />}>

0 commit comments

Comments
 (0)