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h2DL^
zT1`w{b30x~v9Y(~#zHps^y;16c)9*50P8y2z%{?lb+q}_G~0UF+xR+m0ltpcYx4s9
VUKGCT>#lFT{tuq1;N<7#{x6qEAT|I1
diff --git a/static/app/views/replays/list/replaysErroneousDeadRageCards.tsx b/static/app/views/replays/list/replaysErroneousDeadRageCards.tsx
index aac6cdaf8cd708..7ee34fcc16d723 100644
--- a/static/app/views/replays/list/replaysErroneousDeadRageCards.tsx
+++ b/static/app/views/replays/list/replaysErroneousDeadRageCards.tsx
@@ -1,8 +1,7 @@
-import {Fragment, ReactNode, useMemo} from 'react';
+import {ReactNode, useMemo} from 'react';
import styled from '@emotion/styled';
import {Location} from 'history';
-import {t, tct} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import type {Organization} from 'sentry/types';
import EventView from 'sentry/utils/discover/eventView';
@@ -10,9 +9,6 @@ import useReplayList from 'sentry/utils/replays/hooks/useReplayList';
import {useHaveSelectedProjectsSentAnyReplayEvents} from 'sentry/utils/replays/hooks/useReplayOnboarding';
import {useLocation} from 'sentry/utils/useLocation';
import useOrganization from 'sentry/utils/useOrganization';
-import usePageFilters from 'sentry/utils/usePageFilters';
-import useProjectSdkNeedsUpdate from 'sentry/utils/useProjectSdkNeedsUpdate';
-import {EmptyStateSubheading} from 'sentry/views/replays/list/replaysList';
import ReplayTable from 'sentry/views/replays/replayTable';
import {ReplayColumn} from 'sentry/views/replays/replayTable/types';
import {ReplayListLocationQuery} from 'sentry/views/replays/types';
@@ -115,18 +111,6 @@ function ReplaysErroneousDeadRageCards() {
ReplayColumn.ACTIVITY,
];
- const {
- selection: {projects},
- } = usePageFilters();
-
- const MIN_DEAD_RAGE_CLICK_SDK = '7.60.1';
-
- const needSDKUpgrade = useProjectSdkNeedsUpdate({
- minVersion: MIN_DEAD_RAGE_CLICK_SDK,
- organization,
- projectId: projects.map(p => String(p)),
- });
-
return hasSessionReplay && !fetching && hasSentOneReplay ? (
hasDeadRageCards ? (
@@ -141,19 +125,6 @@ function ReplaysErroneousDeadRageCards() {
location={newLocation}
organization={organization}
visibleColumns={deadRageCols}
- emptyMessage={
- needSDKUpgrade.needsUpdate ? (
-
- {t('There are no items to display')}
-
- {tct('[data] require an [sdkPrompt]', {
- data: Rage and dead clicks,
- sdkPrompt: {t('SDK version >= 7.60.1')},
- })}
-
-
- ) : undefined
- }
/>
) : null
diff --git a/static/app/views/replays/list/replaysList.tsx b/static/app/views/replays/list/replaysList.tsx
index 5c06a50cecb3d1..5b3e381766391d 100644
--- a/static/app/views/replays/list/replaysList.tsx
+++ b/static/app/views/replays/list/replaysList.tsx
@@ -83,7 +83,7 @@ function ReplaysListTable({
const {needsUpdate: allSelectedProjectsNeedUpdates} = useProjectSdkNeedsUpdate({
minVersion: MIN_REPLAY_CLICK_SDK,
organization,
- projectId: projects.map(p => String(p)),
+ projectId: projects.map(String),
});
const conditions = useMemo(() => {
diff --git a/static/app/views/replays/replayTable/index.tsx b/static/app/views/replays/replayTable/index.tsx
index 4e55719f4ea3dd..c1b78f26c82da6 100644
--- a/static/app/views/replays/replayTable/index.tsx
+++ b/static/app/views/replays/replayTable/index.tsx
@@ -3,14 +3,17 @@ import styled from '@emotion/styled';
import {Location} from 'history';
import {Alert} from 'sentry/components/alert';
+import ExternalLink from 'sentry/components/links/externalLink';
import LoadingIndicator from 'sentry/components/loadingIndicator';
import PanelTable from 'sentry/components/panels/panelTable';
-import {t} from 'sentry/locale';
+import {t, tct} from 'sentry/locale';
import EventView from 'sentry/utils/discover/eventView';
import type {Sort} from 'sentry/utils/discover/fields';
import getRouteStringFromRoutes from 'sentry/utils/getRouteStringFromRoutes';
import {useLocation} from 'sentry/utils/useLocation';
import useOrganization from 'sentry/utils/useOrganization';
+import usePageFilters from 'sentry/utils/usePageFilters';
+import useProjectSdkNeedsUpdate from 'sentry/utils/useProjectSdkNeedsUpdate';
import {useRoutes} from 'sentry/utils/useRoutes';
import type {ReplayListRecordWithTx} from 'sentry/views/performance/transactionSummary/transactionReplays/useReplaysWithTxData';
import HeaderCell from 'sentry/views/replays/replayTable/headerCell';
@@ -69,6 +72,40 @@ function ReplayTable({
.filter(Boolean)
.map(column => );
+ const {
+ selection: {projects},
+ } = usePageFilters();
+
+ const MIN_DEAD_RAGE_CLICK_SDK = '7.60.1';
+
+ const needSDKUpgrade = useProjectSdkNeedsUpdate({
+ minVersion: MIN_DEAD_RAGE_CLICK_SDK,
+ organization,
+ projectId: projects.map(String),
+ });
+
+ if (needSDKUpgrade.needsUpdate) {
+ return (
+
+
+ {tct('[data] require an [sdkPrompt]. [link:Learn how to upgrade.]', {
+ data: Rage and dead clicks,
+ sdkPrompt: {t('SDK version >= 7.60.1')},
+ link: (
+
+ ),
+ })}
+
+
+ );
+ }
+
if (fetchError && !isFetching) {
return (
(props.gridRows ? `grid-template-rows: ${props.gridRows};` : '')}
+ ${props =>
+ props.gridRows
+ ? `grid-template-rows: ${props.gridRows};`
+ : 'grid-template-rows: 44px max-content'}
`;
const StyledAlert = styled(Alert)`
- border-radius: 0;
- border-width: 1px 0 0 0;
+ border-radius: 0px;
+ border-width: 1px 0 1px 0;
grid-column: 1/-1;
margin-bottom: 0;
`;
From 0486d56eaeb33b00fabd2a63a0e324855914f714 Mon Sep 17 00:00:00 2001
From: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com>
Date: Thu, 27 Jul 2023 14:00:06 -0700
Subject: [PATCH 3/3] more updates to sdk alert and update tests
---
.../groupReplays/groupReplays.spec.tsx | 5 ++
.../transactionReplays/index.spec.tsx | 5 ++
.../list/replaysErroneousDeadRageCards.tsx | 5 +-
static/app/views/replays/list/replaysList.tsx | 2 +-
.../app/views/replays/replayTable/index.tsx | 73 ++++++++++---------
5 files changed, 52 insertions(+), 38 deletions(-)
diff --git a/static/app/views/issueDetails/groupReplays/groupReplays.spec.tsx b/static/app/views/issueDetails/groupReplays/groupReplays.spec.tsx
index 9fa0e54ff103d7..ca9318fd63d12e 100644
--- a/static/app/views/issueDetails/groupReplays/groupReplays.spec.tsx
+++ b/static/app/views/issueDetails/groupReplays/groupReplays.spec.tsx
@@ -51,6 +51,11 @@ function init({organizationProps = {features: ['session-replay']}}: InitializeOr
describe('GroupReplays', () => {
beforeEach(() => {
MockApiClient.clearMockResponses();
+ MockApiClient.addMockResponse({
+ method: 'GET',
+ url: `/organizations/org-slug/sdk-updates/`,
+ body: [],
+ });
});
describe('Replay Feature Disabled', () => {
diff --git a/static/app/views/performance/transactionSummary/transactionReplays/index.spec.tsx b/static/app/views/performance/transactionSummary/transactionReplays/index.spec.tsx
index b3b5b592a418c9..9bc188ab43aba8 100644
--- a/static/app/views/performance/transactionSummary/transactionReplays/index.spec.tsx
+++ b/static/app/views/performance/transactionSummary/transactionReplays/index.spec.tsx
@@ -89,6 +89,11 @@ describe('TransactionReplays', () => {
let eventsMockApi: jest.Mock;
let replaysMockApi: jest.Mock;
beforeEach(() => {
+ MockApiClient.addMockResponse({
+ method: 'GET',
+ url: `/organizations/org-slug/sdk-updates/`,
+ body: [],
+ });
MockApiClient.addMockResponse({
url: '/organizations/org-slug/events-has-measurements/',
body: {measurements: false},
diff --git a/static/app/views/replays/list/replaysErroneousDeadRageCards.tsx b/static/app/views/replays/list/replaysErroneousDeadRageCards.tsx
index 7ee34fcc16d723..349311a14ab585 100644
--- a/static/app/views/replays/list/replaysErroneousDeadRageCards.tsx
+++ b/static/app/views/replays/list/replaysErroneousDeadRageCards.tsx
@@ -1,4 +1,4 @@
-import {ReactNode, useMemo} from 'react';
+import {useMemo} from 'react';
import styled from '@emotion/styled';
import {Location} from 'history';
@@ -136,13 +136,11 @@ function CardTable({
location,
organization,
visibleColumns,
- emptyMessage,
}: {
eventView: EventView;
location: Location;
organization: Organization;
visibleColumns: ReplayColumn[];
- emptyMessage?: ReactNode;
}) {
const {replays, isFetching, fetchError} = useReplayList({
eventView,
@@ -165,7 +163,6 @@ function CardTable({
visibleColumns={visibleColumns}
saveLocation
gridRows={'auto ' + gridRows}
- emptyMessage={emptyMessage}
/>
);
}
diff --git a/static/app/views/replays/list/replaysList.tsx b/static/app/views/replays/list/replaysList.tsx
index 5b3e381766391d..c01a86a361ff41 100644
--- a/static/app/views/replays/list/replaysList.tsx
+++ b/static/app/views/replays/list/replaysList.tsx
@@ -154,7 +154,7 @@ function ReplaysListTable({
);
}
-export const EmptyStateSubheading = styled('div')`
+const EmptyStateSubheading = styled('div')`
color: ${p => p.theme.subText};
font-size: ${p => p.theme.fontSizeMedium};
`;
diff --git a/static/app/views/replays/replayTable/index.tsx b/static/app/views/replays/replayTable/index.tsx
index c1b78f26c82da6..a38b43bd12f233 100644
--- a/static/app/views/replays/replayTable/index.tsx
+++ b/static/app/views/replays/replayTable/index.tsx
@@ -31,6 +31,8 @@ import {
import {ReplayColumn} from 'sentry/views/replays/replayTable/types';
import type {ReplayListRecord} from 'sentry/views/replays/types';
+const MIN_DEAD_RAGE_CLICK_SDK = '7.60.1';
+
type Props = {
fetchError: undefined | Error;
isFetching: boolean;
@@ -56,6 +58,18 @@ function ReplayTable({
const newLocation = useLocation();
const organization = useOrganization();
+ const {
+ selection: {projects},
+ } = usePageFilters();
+
+ const needSDKUpgrade = useProjectSdkNeedsUpdate({
+ minVersion: MIN_DEAD_RAGE_CLICK_SDK,
+ organization,
+ projectId: projects.map(String),
+ });
+
+ const showBottomBorder = visibleColumns.includes(ReplayColumn.MOST_RAGE_CLICKS);
+
const location: Location = saveLocation
? {
pathname: '',
@@ -72,19 +86,7 @@ function ReplayTable({
.filter(Boolean)
.map(column => );
- const {
- selection: {projects},
- } = usePageFilters();
-
- const MIN_DEAD_RAGE_CLICK_SDK = '7.60.1';
-
- const needSDKUpgrade = useProjectSdkNeedsUpdate({
- minVersion: MIN_DEAD_RAGE_CLICK_SDK,
- organization,
- projectId: projects.map(String),
- });
-
- if (needSDKUpgrade.needsUpdate) {
+ if (fetchError && !isFetching) {
return (
-
- {tct('[data] require an [sdkPrompt]. [link:Learn how to upgrade.]', {
- data: Rage and dead clicks,
- sdkPrompt: {t('SDK version >= 7.60.1')},
- link: (
-
- ),
- })}
+
+ {typeof fetchError === 'string'
+ ? fetchError
+ : t(
+ 'Sorry, the list of replays could not be loaded. This could be due to invalid search parameters or an internal systems error.'
+ )}
);
}
- if (fetchError && !isFetching) {
+ if (
+ needSDKUpgrade.needsUpdate &&
+ visibleColumns.includes(ReplayColumn.COUNT_DEAD_CLICKS)
+ ) {
return (
}
+ disablePadding
>
-
- {typeof fetchError === 'string'
- ? fetchError
- : t(
- 'Sorry, the list of replays could not be loaded. This could be due to invalid search parameters or an internal systems error.'
- )}
+
+ {tct('[data] requires [sdkPrompt]. [link:Upgrade now.]', {
+ data: Rage and dead clicks,
+ sdkPrompt: {t('SDK version >= 7.60.1')},
+ link: (
+
+ ),
+ })}
);
@@ -247,14 +253,15 @@ const StyledPanelTable = styled(PanelTable)<{
${props =>
props.gridRows
? `grid-template-rows: ${props.gridRows};`
- : 'grid-template-rows: 44px max-content'}
+ : `grid-template-rows: 44px max-content;`}
`;
-const StyledAlert = styled(Alert)`
- border-radius: 0px;
- border-width: 1px 0 1px 0;
+const StyledAlert = styled(Alert)<{showBottomBorder?: boolean}>`
+ border-radius: 0;
grid-column: 1/-1;
margin-bottom: 0;
+ ${props =>
+ props.showBottomBorder ? `border-width: 1px 0 1px 0;` : `border-width: 1px 0 0 0;`}
`;
export default ReplayTable;