Browse Source

fix(replay/issues): check `issueTypeConfig` before showing onboarding panel (#76005)

<img width="388" alt="SCR-20240812-mcaj"
src="https://github.com/user-attachments/assets/6280368e-fa04-48ce-bdb7-49596a0a2590">

over slack, we decided to hide the entire `EventReplay` section if
`issueTypeConfig.replays.enabled` is false.
Michelle Zhang 7 months ago
parent
commit
d5b6cba20c

+ 9 - 2
static/app/views/issueDetails/groupEventDetails/groupEventDetailsContent.tsx

@@ -54,7 +54,10 @@ import {EntryType, EventOrGroupType} from 'sentry/types/event';
 import type {Group} from 'sentry/types/group';
 import {IssueCategory, IssueType} from 'sentry/types/group';
 import type {Project} from 'sentry/types/project';
-import {shouldShowCustomErrorResourceConfig} from 'sentry/utils/issueTypeConfig';
+import {
+  getConfigForIssueType,
+  shouldShowCustomErrorResourceConfig,
+} from 'sentry/utils/issueTypeConfig';
 import {QuickTraceContext} from 'sentry/utils/performance/quickTrace/quickTraceContext';
 import QuickTraceQuery from 'sentry/utils/performance/quickTrace/quickTraceQuery';
 import {getReplayIdFromEvent} from 'sentry/utils/replays/getReplayIdFromEvent';
@@ -150,6 +153,8 @@ export function DefaultGroupEventDetailsContent({
   // default to show on error or isPromptDismissed === undefined
   const showFeedback = !isPromptDismissed || promptError || hasStreamlinedUI;
 
+  const issueTypeConfig = getConfigForIssueType(group, group.project);
+
   return (
     <Fragment>
       {hasStreamlinedUI && <HighlightsIconSummary event={event} />}
@@ -291,7 +296,9 @@ export function DefaultGroupEventDetailsContent({
         />
       )}
       <EventHydrationDiff event={event} group={group} />
-      <EventReplay event={event} group={group} projectSlug={project.slug} />
+      {issueTypeConfig.replays.enabled && (
+        <EventReplay event={event} group={group} projectSlug={project.slug} />
+      )}
       <GroupEventEntry
         sectionKey={FoldSectionKey.HPKP}
         entryType={EntryType.HPKP}

+ 1 - 1
static/app/views/performance/transactionDetails/index.spec.tsx

@@ -70,7 +70,7 @@ describe('EventDetails', () => {
     await act(tick);
   });
 
-  it('does not reender alert if already received transaction', async () => {
+  it('does not render alert if already received transaction', async () => {
     const event = EventFixture();
 
     MockApiClient.addMockResponse({