Skip to content

Commit 18abe96

Browse files
ref(replay): rm beta badges and add grace period banner for mobile replay (#82467)
- closes #77646 - closes #82651 to be merged closer to GA date (jan 6) added the grace period banner to this PR: <img width="1269" alt="SCR-20241230-ksjo" src="https://github.com/user-attachments/assets/e4877671-a4fe-4aa4-9deb-00238e86cb75" /> --------- Co-authored-by: Bruno Garcia <[email protected]>
1 parent 108bb13 commit 18abe96

File tree

9 files changed

+35
-98
lines changed

9 files changed

+35
-98
lines changed

static/app/components/onboarding/gettingStartedDoc/utils/index.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Alert from 'sentry/components/alert';
21
import ExternalLink from 'sentry/components/links/externalLink';
32
import type {DocsParams} from 'sentry/components/onboarding/gettingStartedDoc/types';
43
import {t, tct} from 'sentry/locale';
@@ -67,16 +66,3 @@ export function getUploadSourceMapsStep({
6766
],
6867
};
6968
}
70-
71-
export function MobileBetaBanner({link}: {link: string}) {
72-
return (
73-
<Alert type="info" showIcon>
74-
{tct(
75-
`Currently, Mobile Replay is in beta. To learn more, you can [link:read our docs].`,
76-
{
77-
link: <ExternalLink href={link} />,
78-
}
79-
)}
80-
</Alert>
81-
);
82-
}

static/app/components/replays/header/detailsPageBreadcrumbs.tsx

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import {Fragment} from 'react';
2-
import styled from '@emotion/styled';
32

4-
import FeatureBadge from 'sentry/components/badge/featureBadge';
53
import {Breadcrumbs} from 'sentry/components/breadcrumbs';
64
import ProjectBadge from 'sentry/components/idBadge/projectBadge';
75
import Placeholder from 'sentry/components/placeholder';
86
import {t} from 'sentry/locale';
9-
import {space} from 'sentry/styles/space';
107
import EventView from 'sentry/utils/discover/eventView';
118
import {getShortEventId} from 'sentry/utils/events';
129
import normalizeUrl from 'sentry/utils/url/normalizeUrl';
@@ -15,12 +12,11 @@ import useProjects from 'sentry/utils/useProjects';
1512
import type {ReplayRecord} from 'sentry/views/replays/types';
1613

1714
type Props = {
18-
isVideoReplay: boolean | undefined;
1915
orgSlug: string;
2016
replayRecord: ReplayRecord | undefined;
2117
};
2218

23-
function DetailsPageBreadcrumbs({orgSlug, replayRecord, isVideoReplay}: Props) {
19+
function DetailsPageBreadcrumbs({orgSlug, replayRecord}: Props) {
2420
const location = useLocation();
2521
const eventView = EventView.fromLocation(location);
2622

@@ -56,31 +52,11 @@ function DetailsPageBreadcrumbs({orgSlug, replayRecord, isVideoReplay}: Props) {
5652
) : null,
5753
},
5854
{
59-
label: isVideoReplay ? (
60-
<StyledSpan>
61-
{labelTitle}
62-
<CenteredFeatureBadge
63-
type="beta"
64-
title={t(
65-
'Session Replay for mobile apps is currently in beta. Beta features are still in progress and may have bugs.'
66-
)}
67-
/>
68-
</StyledSpan>
69-
) : (
70-
labelTitle
71-
),
55+
label: labelTitle,
7256
},
7357
]}
7458
/>
7559
);
7660
}
7761

7862
export default DetailsPageBreadcrumbs;
79-
80-
const CenteredFeatureBadge = styled(FeatureBadge)`
81-
height: ${space(2)};
82-
`;
83-
84-
const StyledSpan = styled('span')`
85-
display: flex;
86-
`;

static/app/components/replaysOnboarding/sidebar.tsx

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {CompactSelect} from 'sentry/components/compactSelect';
1010
import RadioGroup from 'sentry/components/forms/controls/radioGroup';
1111
import IdBadge from 'sentry/components/idBadge';
1212
import LoadingIndicator from 'sentry/components/loadingIndicator';
13-
import {MobileBetaBanner} from 'sentry/components/onboarding/gettingStartedDoc/utils';
1413
import useCurrentProjectState from 'sentry/components/onboarding/gettingStartedDoc/utils/useCurrentProjectState';
1514
import {useLoadGettingStarted} from 'sentry/components/onboarding/gettingStartedDoc/utils/useLoadGettingStarted';
1615
import {PlatformOptionDropdown} from 'sentry/components/replaysOnboarding/platformOptionDropdown';
@@ -326,8 +325,15 @@ function OnboardingContent({
326325
);
327326
}
328327

329-
// No platform, docs import failed, no DSN, or the platform doesn't have onboarding yet
330-
if (!currentPlatform || !docs || !dsn || !hasDocs || !projectKeyId) {
328+
// No platform, docs import failed, no DSN, ingestion is turned off, or the platform doesn't have onboarding yet
329+
if (
330+
!currentPlatform ||
331+
!docs ||
332+
!dsn ||
333+
!hasDocs ||
334+
!projectKeyId ||
335+
organization.features.includes('session-replay-video-disabled')
336+
) {
331337
return (
332338
<Fragment>
333339
<div>
@@ -349,25 +355,6 @@ function OnboardingContent({
349355
);
350356
}
351357

352-
// if the org cannot ingest mobile replay events, don't show the onboarding
353-
// TODO: remove once we GA mobile replay
354-
if (organization.features.includes('session-replay-video-disabled')) {
355-
if (['android', 'react-native'].includes(currentPlatform.language)) {
356-
return (
357-
<MobileBetaBanner
358-
link={`https://docs.sentry.io/platforms/${currentPlatform.language}/session-replay/`}
359-
/>
360-
);
361-
}
362-
if (currentPlatform.language === 'apple') {
363-
return (
364-
<MobileBetaBanner
365-
link={`https://docs.sentry.io/platforms/apple/guides/ios/session-replay/`}
366-
/>
367-
);
368-
}
369-
}
370-
371358
return (
372359
<Fragment>
373360
{radioButtons}

static/app/gettingStartedDocs/android/android.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import type {
1010
DocsParams,
1111
OnboardingConfig,
1212
} from 'sentry/components/onboarding/gettingStartedDoc/types';
13-
import {MobileBetaBanner} from 'sentry/components/onboarding/gettingStartedDoc/utils';
1413
import {
1514
getReplayMobileConfigureDescription,
1615
getReplayVerifyStep,
@@ -303,9 +302,6 @@ const onboarding: OnboardingConfig<PlatformOptions> = {
303302
};
304303

305304
const replayOnboarding: OnboardingConfig<PlatformOptions> = {
306-
introduction: () => (
307-
<MobileBetaBanner link="https://docs.sentry.io/platforms/android/session-replay/" />
308-
),
309305
install: (params: Params) => [
310306
{
311307
type: StepType.INSTALL,

static/app/gettingStartedDocs/apple/ios.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import type {
99
DocsParams,
1010
OnboardingConfig,
1111
} from 'sentry/components/onboarding/gettingStartedDoc/types';
12-
import {MobileBetaBanner} from 'sentry/components/onboarding/gettingStartedDoc/utils';
1312
import {metricTagsExplanation} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
1413
import {
1514
getReplayMobileConfigureDescription,
@@ -650,9 +649,6 @@ const metricsOnboarding: OnboardingConfig<PlatformOptions> = {
650649
};
651650

652651
const replayOnboarding: OnboardingConfig<PlatformOptions> = {
653-
introduction: () => (
654-
<MobileBetaBanner link="https://docs.sentry.io/platforms/android/session-replay/" />
655-
),
656652
install: (params: Params) => [
657653
{
658654
type: StepType.INSTALL,

static/app/gettingStartedDocs/flutter/flutter.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import type {
1010
DocsParams,
1111
OnboardingConfig,
1212
} from 'sentry/components/onboarding/gettingStartedDoc/types';
13-
import {MobileBetaBanner} from 'sentry/components/onboarding/gettingStartedDoc/utils';
1413
import exampleSnippets from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsExampleSnippets';
1514
import {metricTagsExplanation} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
1615
import {
@@ -368,9 +367,6 @@ const onboarding: OnboardingConfig = {
368367
};
369368

370369
const replayOnboarding: OnboardingConfig = {
371-
introduction: () => (
372-
<MobileBetaBanner link="https://docs.sentry.io/platforms/flutter/session-replay/" />
373-
),
374370
install: (params: Params) => [
375371
{
376372
type: StepType.INSTALL,

static/app/gettingStartedDocs/react-native/react-native.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import type {
99
DocsParams,
1010
OnboardingConfig,
1111
} from 'sentry/components/onboarding/gettingStartedDoc/types';
12-
import {MobileBetaBanner} from 'sentry/components/onboarding/gettingStartedDoc/utils';
1312
import {
1413
getCrashReportApiIntroduction,
1514
getCrashReportInstallDescription,
@@ -402,9 +401,6 @@ const getInstallConfig = () => [
402401
];
403402

404403
const replayOnboarding: OnboardingConfig = {
405-
introduction: () => (
406-
<MobileBetaBanner link="https://docs.sentry.io/platforms/react-native/session-replay/" />
407-
),
408404
install: (params: Params) => [
409405
{
410406
type: StepType.INSTALL,

static/app/views/replays/detail/page.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,11 @@ export default function Page({
7676

7777
const header = replayRecord?.is_archived ? (
7878
<Header>
79-
<DetailsPageBreadcrumbs
80-
orgSlug={orgSlug}
81-
replayRecord={replayRecord}
82-
isVideoReplay={isVideoReplay}
83-
/>
79+
<DetailsPageBreadcrumbs orgSlug={orgSlug} replayRecord={replayRecord} />
8480
</Header>
8581
) : (
8682
<Header>
87-
<DetailsPageBreadcrumbs
88-
orgSlug={orgSlug}
89-
replayRecord={replayRecord}
90-
isVideoReplay={isVideoReplay}
91-
/>
83+
<DetailsPageBreadcrumbs orgSlug={orgSlug} replayRecord={replayRecord} />
9284

9385
<ButtonActionsWrapper>
9486
{isLoading ? (

static/app/views/replays/list.tsx

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import {Fragment} from 'react';
22
import styled from '@emotion/styled';
33

4-
import FeatureBadge from 'sentry/components/badge/featureBadge';
4+
import Alert from 'sentry/components/alert';
55
import HookOrDefault from 'sentry/components/hookOrDefault';
66
import * as Layout from 'sentry/components/layouts/thirds';
7+
import ExternalLink from 'sentry/components/links/externalLink';
78
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
89
import {PageHeadingQuestionTooltip} from 'sentry/components/pageHeadingQuestionTooltip';
910
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
10-
import {t} from 'sentry/locale';
11+
import {IconInfo} from 'sentry/icons';
12+
import {t, tct} from 'sentry/locale';
1113
import {space} from 'sentry/styles/space';
1214
import useReplayPageview from 'sentry/utils/replays/hooks/useReplayPageview';
1315
import useOrganization from 'sentry/utils/useOrganization';
@@ -24,6 +26,7 @@ function ReplaysListContainer() {
2426
useReplayPageview('replay.list-time-spent');
2527
const organization = useOrganization();
2628
const {allMobileProj} = useAllMobileProj();
29+
const mobileBetaOrg = organization.features.includes('mobile-replay-beta-orgs');
2730

2831
return (
2932
<SentryDocumentTitle title={`Session Replay — ${organization.slug}`}>
@@ -37,14 +40,6 @@ function ReplaysListContainer() {
3740
)}
3841
docsUrl="https://docs.sentry.io/product/session-replay/"
3942
/>
40-
{allMobileProj ? (
41-
<FeatureBadge
42-
type="beta"
43-
title={t(
44-
'Session Replay for mobile apps is currently in beta. Beta features are still in progress and may have bugs.'
45-
)}
46-
/>
47-
) : null}
4843
</Layout.Title>
4944
</Layout.HeaderContent>
5045
<div /> {/* wraps the tabs below the page title */}
@@ -55,6 +50,19 @@ function ReplaysListContainer() {
5550
<Layout.Main fullWidth>
5651
<LayoutGap>
5752
<ReplayListPageHeaderHook />
53+
{allMobileProj && mobileBetaOrg ? (
54+
<StyledAlert icon={<IconInfo />} showIcon>
55+
{tct(
56+
`[strong:Mobile Replay is now generally available.] Since you participated in the beta, will have a two month grace period of free usage, until March 6. After that, you will be billed for [link:additional replays not included in your plan].`,
57+
{
58+
strong: <strong />,
59+
link: (
60+
<ExternalLink href="https://docs.sentry.io/pricing/#replays-pricing" />
61+
),
62+
}
63+
)}
64+
</StyledAlert>
65+
) : null}
5866
<ListContent />
5967
</LayoutGap>
6068
</Layout.Main>
@@ -69,4 +77,8 @@ const LayoutGap = styled('div')`
6977
gap: ${space(2)};
7078
`;
7179

80+
const StyledAlert = styled(Alert)`
81+
margin: 0;
82+
`;
83+
7284
export default ReplaysListContainer;

0 commit comments

Comments
 (0)