|
@@ -1,9 +1,12 @@
|
|
|
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 {useLocation} from 'sentry/utils/useLocation';
|
|
@@ -12,11 +15,12 @@ import {normalizeUrl} from 'sentry/utils/withDomainRequired';
|
|
|
import type {ReplayRecord} from 'sentry/views/replays/types';
|
|
|
|
|
|
type Props = {
|
|
|
+ isVideoReplay: boolean | undefined;
|
|
|
orgSlug: string;
|
|
|
replayRecord: ReplayRecord | undefined;
|
|
|
};
|
|
|
|
|
|
-function DetailsPageBreadcrumbs({orgSlug, replayRecord}: Props) {
|
|
|
+function DetailsPageBreadcrumbs({orgSlug, replayRecord, isVideoReplay}: Props) {
|
|
|
const location = useLocation();
|
|
|
const eventView = EventView.fromLocation(location);
|
|
|
|
|
@@ -52,7 +56,19 @@ function DetailsPageBreadcrumbs({orgSlug, replayRecord}: Props) {
|
|
|
) : null,
|
|
|
},
|
|
|
{
|
|
|
- label: labelTitle,
|
|
|
+ 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
|
|
|
+ ),
|
|
|
},
|
|
|
]}
|
|
|
/>
|
|
@@ -60,3 +76,11 @@ function DetailsPageBreadcrumbs({orgSlug, replayRecord}: Props) {
|
|
|
}
|
|
|
|
|
|
export default DetailsPageBreadcrumbs;
|
|
|
+
|
|
|
+const CenteredFeatureBadge = styled(FeatureBadge)`
|
|
|
+ height: ${space(2)};
|
|
|
+`;
|
|
|
+
|
|
|
+const StyledSpan = styled('span')`
|
|
|
+ display: flex;
|
|
|
+`;
|