Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(replay): rm beta badges and add grace period banner for mobile replay #82467

Merged
merged 7 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions static/app/components/onboarding/gettingStartedDoc/utils/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Alert from 'sentry/components/alert';
import ExternalLink from 'sentry/components/links/externalLink';
import type {DocsParams} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {t, tct} from 'sentry/locale';
Expand Down Expand Up @@ -67,16 +66,3 @@ export function getUploadSourceMapsStep({
],
};
}

export function MobileBetaBanner({link}: {link: string}) {
return (
<Alert type="info" showIcon>
{tct(
`Currently, Mobile Replay is in beta. To learn more, you can [link:read our docs].`,
{
link: <ExternalLink href={link} />,
}
)}
</Alert>
);
}
28 changes: 2 additions & 26 deletions static/app/components/replays/header/detailsPageBreadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import {Fragment} from 'react';
import styled from '@emotion/styled';

import FeatureBadge from 'sentry/components/badge/featureBadge';
import {Breadcrumbs} from 'sentry/components/breadcrumbs';
import ProjectBadge from 'sentry/components/idBadge/projectBadge';
import Placeholder from 'sentry/components/placeholder';
import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import EventView from 'sentry/utils/discover/eventView';
import {getShortEventId} from 'sentry/utils/events';
import normalizeUrl from 'sentry/utils/url/normalizeUrl';
Expand All @@ -15,12 +12,11 @@ import useProjects from 'sentry/utils/useProjects';
import type {ReplayRecord} from 'sentry/views/replays/types';

type Props = {
isVideoReplay: boolean | undefined;
orgSlug: string;
replayRecord: ReplayRecord | undefined;
};

function DetailsPageBreadcrumbs({orgSlug, replayRecord, isVideoReplay}: Props) {
function DetailsPageBreadcrumbs({orgSlug, replayRecord}: Props) {
const location = useLocation();
const eventView = EventView.fromLocation(location);

Expand Down Expand Up @@ -56,31 +52,11 @@ function DetailsPageBreadcrumbs({orgSlug, replayRecord, isVideoReplay}: Props) {
) : null,
},
{
label: isVideoReplay ? (
<StyledSpan>
{labelTitle}
<CenteredFeatureBadge
type="beta"
title={t(
'Session Replay for mobile apps is currently in beta. Beta features are still in progress and may have bugs.'
)}
/>
</StyledSpan>
) : (
labelTitle
),
label: labelTitle,
},
]}
/>
);
}

export default DetailsPageBreadcrumbs;

const CenteredFeatureBadge = styled(FeatureBadge)`
height: ${space(2)};
`;

const StyledSpan = styled('span')`
display: flex;
`;
31 changes: 9 additions & 22 deletions static/app/components/replaysOnboarding/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {CompactSelect} from 'sentry/components/compactSelect';
import RadioGroup from 'sentry/components/forms/controls/radioGroup';
import IdBadge from 'sentry/components/idBadge';
import LoadingIndicator from 'sentry/components/loadingIndicator';
import {MobileBetaBanner} from 'sentry/components/onboarding/gettingStartedDoc/utils';
import useCurrentProjectState from 'sentry/components/onboarding/gettingStartedDoc/utils/useCurrentProjectState';
import {useLoadGettingStarted} from 'sentry/components/onboarding/gettingStartedDoc/utils/useLoadGettingStarted';
import {PlatformOptionDropdown} from 'sentry/components/replaysOnboarding/platformOptionDropdown';
Expand Down Expand Up @@ -326,8 +325,15 @@ function OnboardingContent({
);
}

// No platform, docs import failed, no DSN, or the platform doesn't have onboarding yet
if (!currentPlatform || !docs || !dsn || !hasDocs || !projectKeyId) {
// No platform, docs import failed, no DSN, ingestion is turned off, or the platform doesn't have onboarding yet
if (
!currentPlatform ||
!docs ||
!dsn ||
!hasDocs ||
!projectKeyId ||
organization.features.includes('session-replay-video-disabled')
) {
return (
<Fragment>
<div>
Expand All @@ -349,25 +355,6 @@ function OnboardingContent({
);
}

// if the org cannot ingest mobile replay events, don't show the onboarding
// TODO: remove once we GA mobile replay
if (organization.features.includes('session-replay-video-disabled')) {
if (['android', 'react-native'].includes(currentPlatform.language)) {
return (
<MobileBetaBanner
link={`https://docs.sentry.io/platforms/${currentPlatform.language}/session-replay/`}
/>
);
}
if (currentPlatform.language === 'apple') {
return (
<MobileBetaBanner
link={`https://docs.sentry.io/platforms/apple/guides/ios/session-replay/`}
/>
);
}
}

return (
<Fragment>
{radioButtons}
Expand Down
4 changes: 0 additions & 4 deletions static/app/gettingStartedDocs/android/android.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type {
DocsParams,
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {MobileBetaBanner} from 'sentry/components/onboarding/gettingStartedDoc/utils';
import {
getReplayMobileConfigureDescription,
getReplayVerifyStep,
Expand Down Expand Up @@ -304,9 +303,6 @@ const onboarding: OnboardingConfig<PlatformOptions> = {
};

const replayOnboarding: OnboardingConfig<PlatformOptions> = {
introduction: () => (
<MobileBetaBanner link="https://docs.sentry.io/platforms/android/session-replay/" />
),
install: (params: Params) => [
{
type: StepType.INSTALL,
Expand Down
4 changes: 0 additions & 4 deletions static/app/gettingStartedDocs/apple/ios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import type {
DocsParams,
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {MobileBetaBanner} from 'sentry/components/onboarding/gettingStartedDoc/utils';
import {metricTagsExplanation} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {
getReplayMobileConfigureDescription,
Expand Down Expand Up @@ -651,9 +650,6 @@ const metricsOnboarding: OnboardingConfig<PlatformOptions> = {
};

const replayOnboarding: OnboardingConfig<PlatformOptions> = {
introduction: () => (
<MobileBetaBanner link="https://docs.sentry.io/platforms/android/session-replay/" />
),
install: (params: Params) => [
{
type: StepType.INSTALL,
Expand Down
4 changes: 0 additions & 4 deletions static/app/gettingStartedDocs/flutter/flutter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type {
DocsParams,
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {MobileBetaBanner} from 'sentry/components/onboarding/gettingStartedDoc/utils';
import exampleSnippets from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsExampleSnippets';
import {metricTagsExplanation} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {
Expand Down Expand Up @@ -368,9 +367,6 @@ const onboarding: OnboardingConfig = {
};

const replayOnboarding: OnboardingConfig = {
introduction: () => (
<MobileBetaBanner link="https://docs.sentry.io/platforms/flutter/session-replay/" />
),
install: (params: Params) => [
{
type: StepType.INSTALL,
Expand Down
4 changes: 0 additions & 4 deletions static/app/gettingStartedDocs/react-native/react-native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import type {
DocsParams,
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {MobileBetaBanner} from 'sentry/components/onboarding/gettingStartedDoc/utils';
import {
getCrashReportApiIntroduction,
getCrashReportInstallDescription,
Expand Down Expand Up @@ -404,9 +403,6 @@ const getInstallConfig = () => [
];

const replayOnboarding: OnboardingConfig = {
introduction: () => (
<MobileBetaBanner link="https://docs.sentry.io/platforms/react-native/session-replay/" />
),
install: (params: Params) => [
{
type: StepType.INSTALL,
Expand Down
12 changes: 2 additions & 10 deletions static/app/views/replays/detail/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,11 @@ export default function Page({

const header = replayRecord?.is_archived ? (
<Header>
<DetailsPageBreadcrumbs
orgSlug={orgSlug}
replayRecord={replayRecord}
isVideoReplay={isVideoReplay}
/>
<DetailsPageBreadcrumbs orgSlug={orgSlug} replayRecord={replayRecord} />
</Header>
) : (
<Header>
<DetailsPageBreadcrumbs
orgSlug={orgSlug}
replayRecord={replayRecord}
isVideoReplay={isVideoReplay}
/>
<DetailsPageBreadcrumbs orgSlug={orgSlug} replayRecord={replayRecord} />

<ButtonActionsWrapper>
{isLoading ? (
Expand Down
11 changes: 0 additions & 11 deletions static/app/views/replays/list.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {Fragment} from 'react';
import styled from '@emotion/styled';

import FeatureBadge from 'sentry/components/badge/featureBadge';
import HookOrDefault from 'sentry/components/hookOrDefault';
import * as Layout from 'sentry/components/layouts/thirds';
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
Expand All @@ -11,7 +10,6 @@ import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import useReplayPageview from 'sentry/utils/replays/hooks/useReplayPageview';
import useOrganization from 'sentry/utils/useOrganization';
import useAllMobileProj from 'sentry/views/replays/detail/useAllMobileProj';
import ListContent from 'sentry/views/replays/list/listContent';
import ReplayTabs from 'sentry/views/replays/tabs';

Expand All @@ -23,7 +21,6 @@ const ReplayListPageHeaderHook = HookOrDefault({
function ReplaysListContainer() {
useReplayPageview('replay.list-time-spent');
const organization = useOrganization();
const {allMobileProj} = useAllMobileProj();

return (
<SentryDocumentTitle title={`Session Replay — ${organization.slug}`}>
Expand All @@ -37,14 +34,6 @@ function ReplaysListContainer() {
)}
docsUrl="https://docs.sentry.io/product/session-replay/"
/>
{allMobileProj ? (
<FeatureBadge
type="beta"
title={t(
'Session Replay for mobile apps is currently in beta. Beta features are still in progress and may have bugs.'
)}
/>
) : null}
</Layout.Title>
</Layout.HeaderContent>
<div /> {/* wraps the tabs below the page title */}
Expand Down
Loading