Skip to content

Commit 83c6afc

Browse files
Abdkhan14Abdullah Khan
authored andcommitted
fix(trace-waterfall): Updating banner rendering logic (#97699)
This PR: - pushes the errors only banners above the waterfall tabs - removes redundant component: TraceTypeWarnings - prevents displaying tracing setup banner when we don't support the enhanced checklist - prevents showing the banners in issue details - trace preview --------- Co-authored-by: Abdullah Khan <[email protected]>
1 parent 157fe3c commit 83c6afc

File tree

6 files changed

+9
-67
lines changed

6 files changed

+9
-67
lines changed

static/app/views/performance/newTraceDetails/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
getInitialTracePreferences,
3636
} from './traceState/tracePreferences';
3737
import {TraceStateProvider} from './traceState/traceStateProvider';
38+
import {ErrorsOnlyWarnings} from './traceTypeWarnings/errorsOnlyWarnings';
3839
import {TraceMetaDataHeader} from './traceHeader';
3940
import {useTraceEventView} from './useTraceEventView';
4041
import {useTraceQueryParams} from './useTraceQueryParams';
@@ -142,6 +143,11 @@ function TraceViewImpl({traceSlug}: {traceSlug: string}) {
142143
logs={logsData}
143144
/>
144145
<TraceInnerLayout ref={traceInnerLayoutRef}>
146+
<ErrorsOnlyWarnings
147+
tree={tree}
148+
traceSlug={traceSlug}
149+
organization={organization}
150+
/>
145151
<TraceTabsAndVitals
146152
tabsConfig={{
147153
tabOptions,

static/app/views/performance/newTraceDetails/issuesTraceWaterfall.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import {
4242
traceNodeAdjacentAnalyticsProperties,
4343
traceNodeAnalyticsName,
4444
} from './traceTreeAnalytics';
45-
import TraceTypeWarnings from './traceTypeWarnings';
4645
import type {TraceWaterfallProps} from './traceWaterfall';
4746
import {TraceGrid} from './traceWaterfall';
4847
import {TraceWaterfallState} from './traceWaterfallState';
@@ -353,11 +352,6 @@ export function IssuesTraceWaterfall(props: IssuesTraceWaterfallProps) {
353352

354353
return (
355354
<Fragment>
356-
<TraceTypeWarnings
357-
tree={props.tree}
358-
traceSlug={props.traceSlug}
359-
organization={organization}
360-
/>
361355
<IssuesTraceGrid
362356
layout={traceState.preferences.layout}
363357
rowCount={

static/app/views/performance/newTraceDetails/traceTypeWarnings/errorsOnlyWarnings.tsx

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import {useEffect, useMemo} from 'react';
22

33
import emptyTraceImg from 'sentry-images/spot/performance-empty-trace.svg';
44

5-
import {Alert} from 'sentry/components/core/alert';
6-
import {ExternalLink} from 'sentry/components/core/link';
75
import {SidebarPanelKey} from 'sentry/components/sidebar/types';
86
import {withPerformanceOnboarding} from 'sentry/data/platformCategories';
97
import {t, tct} from 'sentry/locale';
@@ -61,7 +59,9 @@ function PerformanceSetupBanner({
6159
}: PerformanceSetupBannerProps) {
6260
const location = useLocation();
6361
const LOCAL_STORAGE_KEY = `${traceSlug}:performance-orphan-error-onboarding-banner-hide`;
64-
const hideBanner = projectsWithNoPerformance.length === 0;
62+
const hideBanner =
63+
projectsWithNoPerformance.length === 0 ||
64+
projectsWithOnboardingChecklist.length === 0;
6565

6666
useEffect(() => {
6767
if (hideBanner) {
@@ -79,25 +79,6 @@ function PerformanceSetupBanner({
7979
return null;
8080
}
8181

82-
if (projectsWithOnboardingChecklist.length === 0) {
83-
return (
84-
<Alert.Container>
85-
<Alert type="info">
86-
{tct(
87-
"Some of the projects associated with this trace aren't sending spans, so you're only getting a partial trace view. To learn how to enable tracing for all your projects, visit our [documentationLink].",
88-
{
89-
documentationLink: (
90-
<ExternalLink href="https://docs.sentry.io/product/performance/getting-started/">
91-
{t('documentation')}
92-
</ExternalLink>
93-
),
94-
}
95-
)}
96-
</Alert>
97-
</Alert.Container>
98-
);
99-
}
100-
10182
return (
10283
<TraceWarningComponents.Banner
10384
title={t('Your setup is incomplete')}

static/app/views/performance/newTraceDetails/traceTypeWarnings/index.tsx

Lines changed: 0 additions & 32 deletions
This file was deleted.

static/app/views/performance/newTraceDetails/traceTypeWarnings/styles.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ const BannerWrapper = styled('div')`
9595
border: 1px solid ${p => p.theme.border};
9696
border-radius: ${p => p.theme.borderRadius};
9797
padding: ${space(2)} ${space(3)};
98-
margin-bottom: ${space(2)};
9998
background: linear-gradient(
10099
90deg,
101100
${p => p.theme.backgroundSecondary}00 0%,

static/app/views/performance/newTraceDetails/traceWaterfall.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ import {
8686
traceNodeAdjacentAnalyticsProperties,
8787
traceNodeAnalyticsName,
8888
} from './traceTreeAnalytics';
89-
import TraceTypeWarnings from './traceTypeWarnings';
9089
import {TraceWaterfallState} from './traceWaterfallState';
9190
import {useTraceOnLoad} from './useTraceOnLoad';
9291
import {useTraceQueryParamStateSync} from './useTraceQueryParamStateSync';
@@ -756,11 +755,6 @@ export function TraceWaterfall(props: TraceWaterfallProps) {
756755

757756
return (
758757
<Flex direction="column" flex={1}>
759-
<TraceTypeWarnings
760-
tree={props.tree}
761-
traceSlug={props.traceSlug}
762-
organization={organization}
763-
/>
764758
<TraceToolbar>
765759
<TraceSearchInput onTraceSearch={onTraceSearch} organization={organization} />
766760
<TraceOpenInExploreButton

0 commit comments

Comments
 (0)