Skip to content

Commit 93ced24

Browse files
authored
fix(demo-mode): performance tour not starting (#101069)
1 parent 816ba79 commit 93ced24

File tree

2 files changed

+86
-87
lines changed

2 files changed

+86
-87
lines changed

static/app/views/insights/pages/frontend/frontendOverviewTable.tsx

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import GridEditable, {COL_WIDTH_UNDEFINED} from 'sentry/components/tables/gridEd
88
import useQueryBasedColumnResize from 'sentry/components/tables/gridEditable/useQueryBasedColumnResize';
99
import {t} from 'sentry/locale';
1010
import type {Organization} from 'sentry/types/organization';
11+
import {DemoTourElement, DemoTourStep} from 'sentry/utils/demoMode/demoTours';
1112
import type {EventsMetaType} from 'sentry/utils/discover/eventView';
1213
import {getFieldRenderer} from 'sentry/utils/discover/fieldRenderers';
1314
import type {Sort} from 'sentry/utils/discover/fields';
@@ -174,33 +175,42 @@ export function FrontendOverviewTable({displayPerfScore, response, sort}: Props)
174175
hasData={data.length > 0}
175176
isLoading={isLoading}
176177
>
177-
<GridEditable
178-
aria-label={t('Domains')}
179-
isLoading={isLoading}
180-
error={response.error}
181-
data={data}
182-
columnOrder={filteredColumns}
183-
columnSortBy={[
184-
{
185-
key: sort.field,
186-
order: sort.kind,
187-
},
188-
]}
189-
grid={{
190-
prependColumnWidths: ['max-content'],
191-
renderPrependColumns,
192-
renderHeadCell: column =>
193-
renderHeadCell({
194-
column,
195-
sort,
196-
location,
197-
}),
198-
renderBodyCell: (column, row) =>
199-
renderBodyCell(column, row, meta, location, organization, theme),
200-
onResizeColumn: handleResizeColumn,
201-
}}
202-
/>
203-
<Pagination pageLinks={pageLinks} onCursor={handleCursor} />
178+
<DemoTourElement
179+
id={DemoTourStep.PERFORMANCE_TABLE}
180+
title={t('See slow transactions')}
181+
description={t(
182+
`Trace slow-loading pages back to their API calls, as well as, related errors and users impacted across projects.
183+
Select a transaction to see more details.`
184+
)}
185+
>
186+
<GridEditable
187+
aria-label={t('Domains')}
188+
isLoading={isLoading}
189+
error={response.error}
190+
data={data}
191+
columnOrder={filteredColumns}
192+
columnSortBy={[
193+
{
194+
key: sort.field,
195+
order: sort.kind,
196+
},
197+
]}
198+
grid={{
199+
prependColumnWidths: ['max-content'],
200+
renderPrependColumns,
201+
renderHeadCell: column =>
202+
renderHeadCell({
203+
column,
204+
sort,
205+
location,
206+
}),
207+
renderBodyCell: (column, row) =>
208+
renderBodyCell(column, row, meta, location, organization, theme),
209+
onResizeColumn: handleResizeColumn,
210+
}}
211+
/>
212+
<Pagination pageLinks={pageLinks} onCursor={handleCursor} />
213+
</DemoTourElement>
204214
</VisuallyCompleteWithData>
205215
);
206216
}

static/app/views/performance/table.tsx

Lines changed: 49 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import type {Organization} from 'sentry/types/organization';
1919
import type {Project} from 'sentry/types/project';
2020
import {trackAnalytics} from 'sentry/utils/analytics';
2121
import {browserHistory} from 'sentry/utils/browserHistory';
22-
import {DemoTourElement, DemoTourStep} from 'sentry/utils/demoMode/demoTours';
2322
import type {TableData, TableDataRow} from 'sentry/utils/discover/discoverQuery';
2423
import DiscoverQuery from 'sentry/utils/discover/discoverQuery';
2524
import type EventView from 'sentry/utils/discover/eventView';
@@ -600,69 +599,59 @@ class _Table extends Component<Props, State> {
600599
const columnSortBy = sortedEventView.getSorts();
601600

602601
const prependColumnWidths = ['max-content'];
603-
604602
return (
605603
<div data-test-id="performance-table">
606-
<DemoTourElement
607-
id={DemoTourStep.PERFORMANCE_TABLE}
608-
title={t('See slow transactions')}
609-
description={t(
610-
`Trace slow-loading pages back to their API calls, as well as, related errors and users impacted across projects.
611-
Select a transaction to see more details.`
612-
)}
613-
>
614-
<MEPConsumer>
615-
{value => {
616-
return (
617-
<DiscoverQuery
618-
eventView={sortedEventView}
619-
orgSlug={organization.slug}
620-
location={location}
621-
setError={error => setError(error?.message)}
622-
referrer="api.insights.landing-table"
623-
transactionName={transaction}
624-
transactionThreshold={transactionThreshold}
625-
queryExtras={getMEPQueryParams(value)}
626-
>
627-
{({pageLinks, isLoading, tableData}) => (
628-
<TrackHasDataAnalytics isLoading={isLoading} tableData={tableData}>
629-
<VisuallyCompleteWithData
630-
id="PerformanceTable"
631-
hasData={
632-
!isLoading && !!tableData?.data && tableData.data.length > 0
633-
}
604+
<MEPConsumer>
605+
{value => {
606+
return (
607+
<DiscoverQuery
608+
eventView={sortedEventView}
609+
orgSlug={organization.slug}
610+
location={location}
611+
setError={error => setError(error?.message)}
612+
referrer="api.insights.landing-table"
613+
transactionName={transaction}
614+
transactionThreshold={transactionThreshold}
615+
queryExtras={getMEPQueryParams(value)}
616+
>
617+
{({pageLinks, isLoading, tableData}) => (
618+
<TrackHasDataAnalytics isLoading={isLoading} tableData={tableData}>
619+
<VisuallyCompleteWithData
620+
id="PerformanceTable"
621+
hasData={
622+
!isLoading && !!tableData?.data && tableData.data.length > 0
623+
}
624+
isLoading={isLoading}
625+
>
626+
<GridEditable
634627
isLoading={isLoading}
635-
>
636-
<GridEditable
637-
isLoading={isLoading}
638-
data={tableData ? tableData.data : []}
639-
columnOrder={columnOrder}
640-
columnSortBy={columnSortBy}
641-
bodyStyle={{overflow: 'visible'}}
642-
grid={{
643-
onResizeColumn: this.handleResizeColumn,
644-
renderHeadCell: this.renderHeadCellWithMeta(
645-
tableData?.meta
646-
) as any,
647-
renderBodyCell: this.renderBodyCellWithData(tableData) as any,
648-
renderPrependColumns: this.renderPrependCellWithData(
649-
tableData
650-
) as any,
651-
prependColumnWidths,
652-
}}
653-
/>
654-
</VisuallyCompleteWithData>
655-
<Pagination
656-
pageLinks={pageLinks}
657-
paginationAnalyticsEvent={this.paginationAnalyticsEvent}
628+
data={tableData ? tableData.data : []}
629+
columnOrder={columnOrder}
630+
columnSortBy={columnSortBy}
631+
bodyStyle={{overflow: 'visible'}}
632+
grid={{
633+
onResizeColumn: this.handleResizeColumn,
634+
renderHeadCell: this.renderHeadCellWithMeta(
635+
tableData?.meta
636+
) as any,
637+
renderBodyCell: this.renderBodyCellWithData(tableData) as any,
638+
renderPrependColumns: this.renderPrependCellWithData(
639+
tableData
640+
) as any,
641+
prependColumnWidths,
642+
}}
658643
/>
659-
</TrackHasDataAnalytics>
660-
)}
661-
</DiscoverQuery>
662-
);
663-
}}
664-
</MEPConsumer>
665-
</DemoTourElement>
644+
</VisuallyCompleteWithData>
645+
<Pagination
646+
pageLinks={pageLinks}
647+
paginationAnalyticsEvent={this.paginationAnalyticsEvent}
648+
/>
649+
</TrackHasDataAnalytics>
650+
)}
651+
</DiscoverQuery>
652+
);
653+
}}
654+
</MEPConsumer>
666655
</div>
667656
);
668657
}

0 commit comments

Comments
 (0)