Browse Source

chore(insights): Move mobile modules into insights folder (#73025)

Last ones! These ones needed a little more work and file moving, but
overall it's mostly just moving files around and no major changes. I
gave a lot of "index" files specific names, though.
George Gritsouk 8 months ago
parent
commit
c354628915

+ 17 - 6
static/app/routes.tsx

@@ -1553,34 +1553,45 @@ function buildRoutes() {
       </Route>
       <Route path={`${MODULE_BASE_URLS[ModuleName.SCREEN_LOAD]}/`}>
         <IndexRoute
-          component={make(() => import('sentry/views/performance/mobile/screenload'))}
+          component={make(
+            () =>
+              import(
+                'sentry/views/insights/mobile/screenload/views/screenloadLandingPage'
+              )
+          )}
         />
         <Route
           path="spans/"
           component={make(
-            () => import('sentry/views/performance/mobile/screenload/screenLoadSpans')
+            () =>
+              import('sentry/views/insights/mobile/screenload/views/screenLoadSpansPage')
           )}
         />
       </Route>
       <Route path={`${MODULE_BASE_URLS[ModuleName.APP_START]}/`}>
         <IndexRoute
-          component={make(() => import('sentry/views/performance/mobile/appStarts'))}
+          component={make(
+            () =>
+              import('sentry/views/insights/mobile/appStarts/views/appStartsLandingPage')
+          )}
         />
         <Route
           path="spans/"
           component={make(
-            () => import('sentry/views/performance/mobile/appStarts/screenSummary')
+            () => import('sentry/views/insights/mobile/appStarts/views/screenSummaryPage')
           )}
         />
       </Route>
       <Route path={`${MODULE_BASE_URLS[ModuleName.MOBILE_UI]}/`}>
         <IndexRoute
-          component={make(() => import('sentry/views/performance/mobile/ui'))}
+          component={make(
+            () => import('sentry/views/insights/mobile/ui/views/uiLandingPage')
+          )}
         />
         <Route
           path="spans/"
           component={make(
-            () => import('sentry/views/performance/mobile/ui/screenSummary')
+            () => import('sentry/views/insights/mobile/ui/views/screenSummaryPage')
           )}
         />
       </Route>

+ 1 - 1
static/app/views/insights/common/queries/useHasTtfdConfigured.tsx

@@ -6,7 +6,7 @@ import {useLocation} from 'sentry/utils/useLocation';
 import usePageFilters from 'sentry/utils/usePageFilters';
 import {useReleaseSelection} from 'sentry/views/insights/common/queries/useReleases';
 import {appendReleaseFilters} from 'sentry/views/insights/common/utils/releaseComparison';
-import {useTableQuery} from 'sentry/views/performance/mobile/screenload/screens/screensTable';
+import {useTableQuery} from 'sentry/views/insights/mobile/screenload/components/tables/screensTable';
 
 export function useTTFDConfigured(additionalFilters?: string[]) {
   const location = useLocation();

+ 12 - 15
static/app/views/performance/mobile/appStarts/screens/index.tsx → static/app/views/insights/mobile/appStarts/components/appStartup.tsx

@@ -18,23 +18,20 @@ import usePageFilters from 'sentry/utils/usePageFilters';
 import useRouter from 'sentry/utils/useRouter';
 import {useReleaseSelection} from 'sentry/views/insights/common/queries/useReleases';
 import {appendReleaseFilters} from 'sentry/views/insights/common/utils/releaseComparison';
+import {AverageComparisonChart} from 'sentry/views/insights/mobile/appStarts/components/charts/averageComparisonChart';
+import {CountChart} from 'sentry/views/insights/mobile/appStarts/components/charts/countChart';
+import {COLD_START_TYPE} from 'sentry/views/insights/mobile/appStarts/components/startTypeSelector';
+import {AppStartScreens} from 'sentry/views/insights/mobile/appStarts/components/tables/screensTable';
+import useCrossPlatformProject from 'sentry/views/insights/mobile/common/queries/useCrossPlatformProject';
+import useTruncatedReleaseNames from 'sentry/views/insights/mobile/common/queries/useTruncatedRelease';
+import {TOP_SCREENS} from 'sentry/views/insights/mobile/constants';
+import {ScreensBarChart} from 'sentry/views/insights/mobile/screenload/components/charts/screenBarChart';
+import {getFreeTextFromQuery} from 'sentry/views/insights/mobile/screenload/components/screensView';
+import {useTableQuery} from 'sentry/views/insights/mobile/screenload/components/tables/screensTable';
+import {YAxis, YAXIS_COLUMNS} from 'sentry/views/insights/mobile/screenload/constants';
+import {transformReleaseEvents} from 'sentry/views/insights/mobile/screenload/utils';
 import {ModuleName, SpanMetricsField} from 'sentry/views/insights/types';
 import {prepareQueryForLandingPage} from 'sentry/views/performance/data';
-import {AverageComparisonChart} from 'sentry/views/performance/mobile/appStarts/screens/averageComparisonChart';
-import {CountChart} from 'sentry/views/performance/mobile/appStarts/screens/countChart';
-import {AppStartScreens} from 'sentry/views/performance/mobile/appStarts/screens/screensTable';
-import {COLD_START_TYPE} from 'sentry/views/performance/mobile/appStarts/screenSummary/startTypeSelector';
-import {TOP_SCREENS} from 'sentry/views/performance/mobile/constants';
-import {
-  getFreeTextFromQuery,
-  YAxis,
-  YAXIS_COLUMNS,
-} from 'sentry/views/performance/mobile/screenload/screens';
-import {ScreensBarChart} from 'sentry/views/performance/mobile/screenload/screens/screenBarChart';
-import {useTableQuery} from 'sentry/views/performance/mobile/screenload/screens/screensTable';
-import {transformReleaseEvents} from 'sentry/views/performance/mobile/screenload/screens/utils';
-import useCrossPlatformProject from 'sentry/views/performance/mobile/useCrossPlatformProject';
-import useTruncatedReleaseNames from 'sentry/views/performance/mobile/useTruncatedRelease';
 import {getTransactionSearchQuery} from 'sentry/views/performance/utils';
 import {useHasDataTrackAnalytics} from 'sentry/views/performance/utils/analytics/useHasDataTrackAnalytics';
 

+ 0 - 0
static/app/views/performance/mobile/appStarts/screens/breakdown.tsx → static/app/views/insights/mobile/appStarts/components/breakdown.tsx


+ 6 - 6
static/app/views/performance/mobile/appStarts/screens/averageComparisonChart.tsx → static/app/views/insights/mobile/appStarts/components/charts/averageComparisonChart.tsx

@@ -14,13 +14,13 @@ import {formatVersion} from 'sentry/utils/versions/formatVersion';
 import {PRIMARY_RELEASE_COLOR} from 'sentry/views/insights/colors';
 import {useReleaseSelection} from 'sentry/views/insights/common/queries/useReleases';
 import {appendReleaseFilters} from 'sentry/views/insights/common/utils/releaseComparison';
+import {COLD_START_TYPE} from 'sentry/views/insights/mobile/appStarts/components/startTypeSelector';
+import useCrossPlatformProject from 'sentry/views/insights/mobile/common/queries/useCrossPlatformProject';
+import useTruncatedReleaseNames from 'sentry/views/insights/mobile/common/queries/useTruncatedRelease';
+import {ScreensBarChart} from 'sentry/views/insights/mobile/screenload/components/charts/screenBarChart';
+import {useTableQuery} from 'sentry/views/insights/mobile/screenload/components/tables/screensTable';
+import {YAxis, YAXIS_COLUMNS} from 'sentry/views/insights/mobile/screenload/constants';
 import {SpanMetricsField} from 'sentry/views/insights/types';
-import {COLD_START_TYPE} from 'sentry/views/performance/mobile/appStarts/screenSummary/startTypeSelector';
-import {YAxis, YAXIS_COLUMNS} from 'sentry/views/performance/mobile/screenload/screens';
-import {ScreensBarChart} from 'sentry/views/performance/mobile/screenload/screens/screenBarChart';
-import {useTableQuery} from 'sentry/views/performance/mobile/screenload/screens/screensTable';
-import useCrossPlatformProject from 'sentry/views/performance/mobile/useCrossPlatformProject';
-import useTruncatedReleaseNames from 'sentry/views/performance/mobile/useTruncatedRelease';
 
 interface Props {
   chartHeight?: number;

+ 4 - 4
static/app/views/performance/mobile/appStarts/screens/countChart.tsx → static/app/views/insights/mobile/appStarts/components/charts/countChart.tsx

@@ -22,11 +22,11 @@ import {useReleaseSelection} from 'sentry/views/insights/common/queries/useRelea
 import {STARFISH_CHART_INTERVAL_FIDELITY} from 'sentry/views/insights/common/utils/constants';
 import {appendReleaseFilters} from 'sentry/views/insights/common/utils/releaseComparison';
 import {useEventsStatsQuery} from 'sentry/views/insights/common/utils/useEventsStatsQuery';
+import {COLD_START_TYPE} from 'sentry/views/insights/mobile/appStarts/components/startTypeSelector';
+import useCrossPlatformProject from 'sentry/views/insights/mobile/common/queries/useCrossPlatformProject';
+import useTruncatedReleaseNames from 'sentry/views/insights/mobile/common/queries/useTruncatedRelease';
+import {OUTPUT_TYPE, YAxis} from 'sentry/views/insights/mobile/screenload/constants';
 import {SpanMetricsField} from 'sentry/views/insights/types';
-import {COLD_START_TYPE} from 'sentry/views/performance/mobile/appStarts/screenSummary/startTypeSelector';
-import {OUTPUT_TYPE, YAxis} from 'sentry/views/performance/mobile/screenload/screens';
-import useCrossPlatformProject from 'sentry/views/performance/mobile/useCrossPlatformProject';
-import useTruncatedReleaseNames from 'sentry/views/performance/mobile/useTruncatedRelease';
 
 function transformData(data?: MultiSeriesEventsStats, primaryRelease?: string) {
   const transformedSeries: {[release: string]: Series} = {};

+ 5 - 5
static/app/views/performance/mobile/appStarts/screenSummary/deviceClassBreakdownBarChart.tsx → static/app/views/insights/mobile/appStarts/components/charts/deviceClassBreakdownBarChart.tsx

@@ -28,13 +28,13 @@ import {useReleaseSelection} from 'sentry/views/insights/common/queries/useRelea
 import {formatVersionAndCenterTruncate} from 'sentry/views/insights/common/utils/centerTruncate';
 import {STARFISH_CHART_INTERVAL_FIDELITY} from 'sentry/views/insights/common/utils/constants';
 import {appendReleaseFilters} from 'sentry/views/insights/common/utils/releaseComparison';
+import {COLD_START_TYPE} from 'sentry/views/insights/mobile/appStarts/components/startTypeSelector';
+import useCrossPlatformProject from 'sentry/views/insights/mobile/common/queries/useCrossPlatformProject';
+import {useTableQuery} from 'sentry/views/insights/mobile/screenload/components/tables/screensTable';
+import {YAxis, YAXIS_COLUMNS} from 'sentry/views/insights/mobile/screenload/constants';
+import {transformDeviceClassEvents} from 'sentry/views/insights/mobile/screenload/utils';
 import {SpanMetricsField} from 'sentry/views/insights/types';
 import {prepareQueryForLandingPage} from 'sentry/views/performance/data';
-import {COLD_START_TYPE} from 'sentry/views/performance/mobile/appStarts/screenSummary/startTypeSelector';
-import {YAxis, YAXIS_COLUMNS} from 'sentry/views/performance/mobile/screenload/screens';
-import {useTableQuery} from 'sentry/views/performance/mobile/screenload/screens/screensTable';
-import {transformDeviceClassEvents} from 'sentry/views/performance/mobile/screenload/screens/utils';
-import useCrossPlatformProject from 'sentry/views/performance/mobile/useCrossPlatformProject';
 
 const YAXES = [YAxis.COLD_START, YAxis.WARM_START];
 const XAXIS_CATEGORIES = ['high', 'medium', 'low', 'Unknown'];

+ 2 - 2
static/app/views/performance/mobile/appStarts/screenSummary/eventSamples.spec.tsx → static/app/views/insights/mobile/appStarts/components/eventSamples.spec.tsx

@@ -5,11 +5,11 @@ import {render, screen} from 'sentry-test/reactTestingLibrary';
 
 import usePageFilters from 'sentry/utils/usePageFilters';
 import {useReleaseSelection} from 'sentry/views/insights/common/queries/useReleases';
-import {EventSamples} from 'sentry/views/performance/mobile/appStarts/screenSummary/eventSamples';
+import {EventSamples} from 'sentry/views/insights/mobile/appStarts/components/eventSamples';
 import {
   MobileCursors,
   MobileSortKeys,
-} from 'sentry/views/performance/mobile/screenload/screens/constants';
+} from 'sentry/views/insights/mobile/screenload/constants';
 
 jest.mock('sentry/utils/usePageFilters');
 jest.mock('sentry/views/insights/common/queries/useReleases');

+ 4 - 4
static/app/views/performance/mobile/appStarts/screenSummary/eventSamples.tsx → static/app/views/insights/mobile/appStarts/components/eventSamples.tsx

@@ -13,11 +13,11 @@ import {
   SECONDARY_RELEASE_ALIAS,
 } from 'sentry/views/insights/common/components/releaseSelector';
 import {useReleaseSelection} from 'sentry/views/insights/common/queries/useReleases';
+import {COLD_START_TYPE} from 'sentry/views/insights/mobile/appStarts/components/startTypeSelector';
+import useCrossPlatformProject from 'sentry/views/insights/mobile/common/queries/useCrossPlatformProject';
+import {EventSamplesTable} from 'sentry/views/insights/mobile/screenload/components/tables/eventSamplesTable';
+import {useTableQuery} from 'sentry/views/insights/mobile/screenload/components/tables/screensTable';
 import {SpanMetricsField} from 'sentry/views/insights/types';
-import {COLD_START_TYPE} from 'sentry/views/performance/mobile/appStarts/screenSummary/startTypeSelector';
-import {EventSamplesTable} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/eventSamplesTable';
-import {useTableQuery} from 'sentry/views/performance/mobile/screenload/screens/screensTable';
-import useCrossPlatformProject from 'sentry/views/performance/mobile/useCrossPlatformProject';
 
 const DEFAULT_SORT: Sort = {
   kind: 'desc',

+ 6 - 6
static/app/views/performance/mobile/appStarts/screenSummary/samples.tsx → static/app/views/insights/mobile/appStarts/components/samples.tsx

@@ -8,15 +8,15 @@ import {space} from 'sentry/styles/space';
 import {trackAnalytics} from 'sentry/utils/analytics';
 import useOrganization from 'sentry/utils/useOrganization';
 import {useReleaseSelection} from 'sentry/views/insights/common/queries/useReleases';
-import {ModuleName} from 'sentry/views/insights/types';
-import {EventSamples} from 'sentry/views/performance/mobile/appStarts/screenSummary/eventSamples';
-import {SpanOperationTable} from 'sentry/views/performance/mobile/appStarts/screenSummary/spanOperationTable';
-import {SpanOpSelector} from 'sentry/views/performance/mobile/appStarts/screenSummary/spanOpSelector';
-import {DeviceClassSelector} from 'sentry/views/performance/mobile/components/deviceClassSelector';
+import {EventSamples} from 'sentry/views/insights/mobile/appStarts/components/eventSamples';
+import {SpanOpSelector} from 'sentry/views/insights/mobile/appStarts/components/spanOpSelector';
+import {SpanOperationTable} from 'sentry/views/insights/mobile/appStarts/components/tables/spanOperationTable';
+import {DeviceClassSelector} from 'sentry/views/insights/mobile/common/components/deviceClassSelector';
 import {
   MobileCursors,
   MobileSortKeys,
-} from 'sentry/views/performance/mobile/screenload/screens/constants';
+} from 'sentry/views/insights/mobile/screenload/constants';
+import {ModuleName} from 'sentry/views/insights/types';
 
 const EVENT = 'event';
 const SPANS = 'spans';

Some files were not shown because too many files changed in this diff