From 4155cd8e826183c537b555ab7ca0395c8e8d2b75 Mon Sep 17 00:00:00 2001 From: KevinL10 Date: Tue, 14 May 2024 17:04:58 -0400 Subject: [PATCH] ref(insights): abstract ScreenLoadSpans side panel for mobile modules --- .../mobile/appStarts/screenSummary/index.tsx | 10 +++++++--- .../index.tsx => components/spanSamplesPanel.tsx} | 13 +++++++++---- .../spanSamplesPanelContainer.tsx} | 13 +++++++++---- .../mobile/screenload/screenLoadSpans/index.tsx | 7 ++++--- .../performance/mobile/ui/screenSummary/index.tsx | 7 ++++--- 5 files changed, 33 insertions(+), 17 deletions(-) rename static/app/views/performance/mobile/{screenload/screenLoadSpans/samples/index.tsx => components/spanSamplesPanel.tsx} (93%) rename static/app/views/performance/mobile/{screenload/screenLoadSpans/samples/samplesContainer.tsx => components/spanSamplesPanelContainer.tsx} (96%) diff --git a/static/app/views/performance/mobile/appStarts/screenSummary/index.tsx b/static/app/views/performance/mobile/appStarts/screenSummary/index.tsx index 130386aa43871..c177302b8b7a5 100644 --- a/static/app/views/performance/mobile/appStarts/screenSummary/index.tsx +++ b/static/app/views/performance/mobile/appStarts/screenSummary/index.tsx @@ -24,16 +24,19 @@ import { COLD_START_TYPE, StartTypeSelector, } from 'sentry/views/performance/mobile/appStarts/screenSummary/startTypeSelector'; +<<<<<<< HEAD import {BASE_URL} from 'sentry/views/performance/mobile/appStarts/settings'; +======= +import {SpanSamplesPanel} from 'sentry/views/performance/mobile/components/spanSamplesPanel'; +>>>>>>> 16c919f580 (ref(insights): abstract ScreenLoadSpans side panel for mobile modules) import {MetricsRibbon} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/metricsRibbon'; -import {ScreenLoadSpanSamples} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/samples'; import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders'; import { PRIMARY_RELEASE_ALIAS, ReleaseComparisonSelector, SECONDARY_RELEASE_ALIAS, } from 'sentry/views/starfish/components/releaseSelector'; -import {SpanMetricsField} from 'sentry/views/starfish/types'; +import {ModuleName, SpanMetricsField} from 'sentry/views/starfish/types'; import {ROUTE_NAMES} from 'sentry/views/starfish/utils/routeNames'; import {QueryParameterNames} from 'sentry/views/starfish/views/queryParameters'; @@ -187,12 +190,13 @@ export function ScreenSummary() { {spanGroup && spanOp && appStartType && ( - ; onClose?: () => void; @@ -29,8 +31,9 @@ type Props = { transactionRoute?: string; }; -export function ScreenLoadSpanSamples({ +export function SpanSamplesPanel({ groupId, + moduleName, transactionName, transactionMethod, spanDescription, @@ -112,8 +115,9 @@ export function ScreenLoadSpanSamples({ - - ; project?: Project | null; @@ -44,8 +48,9 @@ type Props = { transactionMethod?: string; }; -export function ScreenLoadSampleContainer({ +export function SpanSamplesContainer({ groupId, + moduleName, transactionName, transactionMethod, release, @@ -182,7 +187,7 @@ export function ScreenLoadSampleContainer({ onMouseOverSample={sample => setHighlightedSpanId(sample.span_id)} groupId={groupId} transactionName={transactionName} - moduleName={ModuleName.SCREEN} + moduleName={moduleName} release={release} columnOrder={[ { diff --git a/static/app/views/performance/mobile/screenload/screenLoadSpans/index.tsx b/static/app/views/performance/mobile/screenload/screenLoadSpans/index.tsx index 80c7f4c0ff1ed..cb18a005fbc26 100644 --- a/static/app/views/performance/mobile/screenload/screenLoadSpans/index.tsx +++ b/static/app/views/performance/mobile/screenload/screenLoadSpans/index.tsx @@ -21,13 +21,13 @@ import useOrganization from 'sentry/utils/useOrganization'; import useProjects from 'sentry/utils/useProjects'; import useRouter from 'sentry/utils/useRouter'; import {normalizeUrl} from 'sentry/utils/withDomainRequired'; +import {SpanSamplesPanel} from 'sentry/views/performance/mobile/components/spanSamplesPanel'; import { ScreenCharts, YAxis, } from 'sentry/views/performance/mobile/screenload/screenLoadSpans/charts'; import {ScreenLoadEventSamples} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/eventSamples'; import {MetricsRibbon} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/metricsRibbon'; -import {ScreenLoadSpanSamples} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/samples'; import {ScreenLoadSpansTable} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/table'; import { MobileCursors, @@ -42,7 +42,7 @@ import { ReleaseComparisonSelector, SECONDARY_RELEASE_ALIAS, } from 'sentry/views/starfish/components/releaseSelector'; -import {SpanMetricsField} from 'sentry/views/starfish/types'; +import {ModuleName, SpanMetricsField} from 'sentry/views/starfish/types'; import {QueryParameterNames} from 'sentry/views/starfish/views/queryParameters'; type Query = { @@ -209,8 +209,9 @@ function ScreenLoadSpans() { project={project} /> {spanGroup && ( - { diff --git a/static/app/views/performance/mobile/ui/screenSummary/index.tsx b/static/app/views/performance/mobile/ui/screenSummary/index.tsx index 7b3e3cc7246e9..f7c3bb994221f 100644 --- a/static/app/views/performance/mobile/ui/screenSummary/index.tsx +++ b/static/app/views/performance/mobile/ui/screenSummary/index.tsx @@ -14,12 +14,12 @@ import useOrganization from 'sentry/utils/useOrganization'; import useRouter from 'sentry/utils/useRouter'; import {normalizeUrl} from 'sentry/utils/withDomainRequired'; import {SamplesTables} from 'sentry/views/performance/mobile/components/samplesTables'; -import {ScreenLoadSpanSamples} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/samples'; +import {SpanSamplesPanel} from 'sentry/views/performance/mobile/components/spanSamplesPanel'; import {SpanOperationTable} from 'sentry/views/performance/mobile/ui/screenSummary/spanOperationTable'; import {BASE_URL} from 'sentry/views/performance/mobile/ui/settings'; import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders'; import {ReleaseComparisonSelector} from 'sentry/views/starfish/components/releaseSelector'; -import {SpanMetricsField} from 'sentry/views/starfish/types'; +import {ModuleName, SpanMetricsField} from 'sentry/views/starfish/types'; import {QueryParameterNames} from 'sentry/views/starfish/views/queryParameters'; type Query = { @@ -102,11 +102,12 @@ function ScreenSummary() { {spanGroup && spanOp && ( -