Browse Source

ref(replays): Cleanup the old session-replay-slim-table feature flag (FE) (#48409)

Followed by: https://github.com/getsentry/sentry/pull/48410

Relates to https://github.com/getsentry/sentry/issues/47756
Ryan Albrecht 1 year ago
parent
commit
b288c0f567

+ 0 - 9
static/app/utils/replays/fetchReplayList.tsx

@@ -40,15 +40,6 @@ async function fetchReplayList({
     // ask the server for compound fields like `os.name`.
     payload.field = payload.field.map(field => field.split('.')[0]);
 
-    const hasFullTable = !organization.features.includes('session-replay-slim-table');
-    if (!hasFullTable) {
-      const fieldsToRemove = ['browser', 'os', 'urls'];
-      payload.field = payload.field.filter(field => !fieldsToRemove.includes(field));
-      payload.field.push('count_urls');
-    } else {
-      payload.field = payload.field.filter(field => field !== 'count_urls');
-    }
-
     // unique list
     payload.field = Array.from(new Set(payload.field));
 

+ 0 - 5
static/app/views/replays/replayTable/index.tsx

@@ -37,11 +37,6 @@ function ReplayTable({fetchError, isFetching, replays, sort, visibleColumns}: Pr
   const location = useLocation();
   const organization = useOrganization();
 
-  const hasFullTable = !organization.features.includes('session-replay-slim-table');
-  visibleColumns = visibleColumns.filter(
-    column => hasFullTable || !['browser', 'os'].includes(column)
-  );
-
   const tableHeaders = visibleColumns
     .filter(Boolean)
     .map(column => <HeaderCell key={column} column={column} sort={sort} />);

+ 5 - 22
static/app/views/replays/replayTable/tableCell.tsx

@@ -11,8 +11,8 @@ import {StringWalker} from 'sentry/components/replays/walker/urlWalker';
 import ScoreBar from 'sentry/components/scoreBar';
 import TimeSince from 'sentry/components/timeSince';
 import {CHART_PALETTE} from 'sentry/constants/chartPalette';
-import {IconCalendar, IconDelete, IconLocation} from 'sentry/icons';
-import {t, tn} from 'sentry/locale';
+import {IconCalendar, IconDelete} from 'sentry/icons';
+import {t} from 'sentry/locale';
 import {space, ValidSize} from 'sentry/styles/space';
 import type {Organization} from 'sentry/types';
 import EventView from 'sentry/utils/discover/eventView';
@@ -80,7 +80,7 @@ export function ReplayCell({
     );
   }
 
-  const subText = replay.urls ? (
+  const subText = (
     <Cols>
       <StringWalker urls={replay.urls} />
       <Row gap={1}>
@@ -94,23 +94,6 @@ export function ReplayCell({
         </Row>
       </Row>
     </Cols>
-  ) : (
-    <Cols>
-      <Row gap={1}>
-        <Row gap={0.5} minWidth={80}>
-          {project ? <Avatar size={12} project={project} /> : null}
-          <Link to={replayDetails}>{getShortEventId(replay.id)}</Link>
-        </Row>
-        <Row gap={0.5} minWidth={80}>
-          <IconLocation color="green400" size="sm" />
-          {tn('%s Page', '%s Pages', replay.count_urls)}
-        </Row>
-        <Row gap={0.5}>
-          <IconCalendar color="gray300" size="xs" />
-          <TimeSince date={replay.started_at} />
-        </Row>
-      </Row>
-    </Cols>
   );
 
   return (
@@ -119,10 +102,10 @@ export function ReplayCell({
         avatarSize={24}
         displayName={
           replay.is_archived ? (
-            replay.user?.display_name || t('Unknown User')
+            replay.user.display_name || t('Unknown User')
           ) : (
             <MainLink to={replayDetails}>
-              {replay.user?.display_name || t('Unknown User')}
+              {replay.user.display_name || t('Unknown User')}
             </MainLink>
           )
         }

+ 4 - 3
static/app/views/replays/types.tsx

@@ -107,16 +107,18 @@ export type ReplayListLocationQuery = {
 export type ReplayListRecord = Pick<
   ReplayRecord,
   | 'activity'
+  | 'browser'
   | 'count_errors'
   | 'duration'
   | 'finished_at'
   | 'id'
   | 'is_archived'
+  | 'os'
   | 'project_id'
   | 'started_at'
+  | 'urls'
   | 'user'
-> &
-  Partial<Pick<ReplayRecord, 'browser' | 'count_urls' | 'os' | 'urls'>>;
+>;
 
 // Sync with ReplayListRecord above
 export const REPLAY_LIST_FIELDS: ReplayRecordNestedFieldName[] = [
@@ -124,7 +126,6 @@ export const REPLAY_LIST_FIELDS: ReplayRecordNestedFieldName[] = [
   'browser.name',
   'browser.version',
   'count_errors',
-  'count_urls',
   'duration',
   'finished_at',
   'id',