Browse Source

chore(insights): Move Web Vitals into Insights (#73008)

Move moves. This one also straight-forward, just moving some files
around. The only other change is moving `useOnboardingProject` into
`common` since it's shared by a lot of modules.
George Gritsouk 8 months ago
parent
commit
c662a4bc1b

+ 2 - 2
static/app/routes.tsx

@@ -1509,13 +1509,13 @@ function buildRoutes() {
         <IndexRoute
           component={make(
             () =>
-              import('sentry/views/performance/browser/webVitals/webVitalsLandingPage')
+              import('sentry/views/insights/browser/webVitals/views/webVitalsLandingPage')
           )}
         />
         <Route
           path="overview/"
           component={make(
-            () => import('sentry/views/performance/browser/webVitals/pageOverview')
+            () => import('sentry/views/insights/browser/webVitals/views/pageOverview')
           )}
         />
       </Route>

+ 1 - 1
static/app/views/performance/browser/webVitals/components/performanceScoreBreakdownChart.spec.tsx → static/app/views/insights/browser/webVitals/components/charts/performanceScoreBreakdownChart.spec.tsx

@@ -7,7 +7,7 @@ import usePageFilters from 'sentry/utils/usePageFilters';
 import {
   formatTimeSeriesResultsToChartData,
   PerformanceScoreBreakdownChart,
-} from 'sentry/views/performance/browser/webVitals/components/performanceScoreBreakdownChart';
+} from 'sentry/views/insights/browser/webVitals/components/charts/performanceScoreBreakdownChart';
 
 jest.mock('sentry/utils/useLocation');
 jest.mock('sentry/utils/usePageFilters');

+ 9 - 9
static/app/views/performance/browser/webVitals/components/performanceScoreBreakdownChart.tsx → static/app/views/insights/browser/webVitals/components/charts/performanceScoreBreakdownChart.tsx

@@ -9,19 +9,19 @@ import {t} from 'sentry/locale';
 import {space} from 'sentry/styles/space';
 import type {Series} from 'sentry/types/echarts';
 import usePageFilters from 'sentry/utils/usePageFilters';
-import Chart, {ChartType} from 'sentry/views/insights/common/components/chart';
 import {
   ORDER,
   ORDER_WITH_INP,
   ORDER_WITH_INP_WITHOUT_FID,
-} from 'sentry/views/performance/browser/webVitals/performanceScoreChart';
-import {PERFORMANCE_SCORE_WEIGHTS} from 'sentry/views/performance/browser/webVitals/utils/queries/rawWebVitalsQueries/calculatePerformanceScore';
-import type {WebVitalsScoreBreakdown} from 'sentry/views/performance/browser/webVitals/utils/queries/rawWebVitalsQueries/useProjectRawWebVitalsTimeseriesQuery';
-import {useProjectRawWebVitalsTimeseriesQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/rawWebVitalsQueries/useProjectRawWebVitalsTimeseriesQuery';
-import {calculatePerformanceScoreFromStoredTableDataRow} from 'sentry/views/performance/browser/webVitals/utils/queries/storedScoreQueries/calculatePerformanceScoreFromStored';
-import {useProjectWebVitalsScoresQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/storedScoreQueries/useProjectWebVitalsScoresQuery';
-import type {UnweightedWebVitalsScoreBreakdown} from 'sentry/views/performance/browser/webVitals/utils/queries/storedScoreQueries/useProjectWebVitalsScoresTimeseriesQuery';
-import {useProjectWebVitalsTimeseriesQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/useProjectWebVitalsTimeseriesQuery';
+} from 'sentry/views/insights/browser/webVitals/components/charts/performanceScoreChart';
+import {PERFORMANCE_SCORE_WEIGHTS} from 'sentry/views/insights/browser/webVitals/queries/rawWebVitalsQueries/calculatePerformanceScore';
+import type {WebVitalsScoreBreakdown} from 'sentry/views/insights/browser/webVitals/queries/rawWebVitalsQueries/useProjectRawWebVitalsTimeseriesQuery';
+import {useProjectRawWebVitalsTimeseriesQuery} from 'sentry/views/insights/browser/webVitals/queries/rawWebVitalsQueries/useProjectRawWebVitalsTimeseriesQuery';
+import {calculatePerformanceScoreFromStoredTableDataRow} from 'sentry/views/insights/browser/webVitals/queries/storedScoreQueries/calculatePerformanceScoreFromStored';
+import {useProjectWebVitalsScoresQuery} from 'sentry/views/insights/browser/webVitals/queries/storedScoreQueries/useProjectWebVitalsScoresQuery';
+import type {UnweightedWebVitalsScoreBreakdown} from 'sentry/views/insights/browser/webVitals/queries/storedScoreQueries/useProjectWebVitalsScoresTimeseriesQuery';
+import {useProjectWebVitalsTimeseriesQuery} from 'sentry/views/insights/browser/webVitals/queries/useProjectWebVitalsTimeseriesQuery';
+import Chart, {ChartType} from 'sentry/views/insights/common/components/chart';
 
 export const SCORE_MIGRATION_TIMESTAMP = 1702771200000;
 export const FID_DEPRECATION_DATE = 1710259200000;

+ 4 - 5
static/app/views/performance/browser/webVitals/performanceScoreChart.tsx → static/app/views/insights/browser/webVitals/components/charts/performanceScoreChart.tsx

@@ -8,14 +8,13 @@ import {DEFAULT_RELATIVE_PERIODS} from 'sentry/constants';
 import {t} from 'sentry/locale';
 import {space} from 'sentry/styles/space';
 import usePageFilters from 'sentry/utils/usePageFilters';
-import {PerformanceScoreBreakdownChart} from 'sentry/views/performance/browser/webVitals/components/performanceScoreBreakdownChart';
-import {MODULE_DOC_LINK} from 'sentry/views/performance/browser/webVitals/settings';
+import {PerformanceScoreBreakdownChart} from 'sentry/views/insights/browser/webVitals/components/charts/performanceScoreBreakdownChart';
+import PerformanceScoreRingWithTooltips from 'sentry/views/insights/browser/webVitals/components/performanceScoreRingWithTooltips';
+import {MODULE_DOC_LINK} from 'sentry/views/insights/browser/webVitals/settings';
 import type {
   ProjectScore,
   WebVitals,
-} from 'sentry/views/performance/browser/webVitals/utils/types';
-
-import PerformanceScoreRingWithTooltips from './components/performanceScoreRingWithTooltips';
+} from 'sentry/views/insights/browser/webVitals/types';
 
 type Props = {
   isProjectScoreLoading?: boolean;

+ 1 - 1
static/app/views/performance/browser/webVitals/components/webVitalStatusLineChart.tsx → static/app/views/insights/browser/webVitals/components/charts/webVitalStatusLineChart.tsx

@@ -12,7 +12,7 @@ import useRouter from 'sentry/utils/useRouter';
 import {
   PERFORMANCE_SCORE_MEDIANS,
   PERFORMANCE_SCORE_P90S,
-} from 'sentry/views/performance/browser/webVitals/utils/queries/rawWebVitalsQueries/calculatePerformanceScore';
+} from 'sentry/views/insights/browser/webVitals/queries/rawWebVitalsQueries/calculatePerformanceScore';
 
 interface Props {
   webVitalSeries: LineChartSeries;

+ 1 - 1
static/app/views/performance/browser/webVitals/components/miniAggregateWaterfall.tsx → static/app/views/insights/browser/webVitals/components/miniAggregateWaterfall.tsx

@@ -12,7 +12,7 @@ import {space} from 'sentry/styles/space';
 import {trackAnalytics} from 'sentry/utils/analytics';
 import {useLocation} from 'sentry/utils/useLocation';
 import useOrganization from 'sentry/utils/useOrganization';
-import {LandingDisplayField} from 'sentry/views/performance/browser/webVitals/pageOverview';
+import {LandingDisplayField} from 'sentry/views/insights/browser/webVitals/views/pageOverview';
 
 type Props = {
   transaction: string;

+ 5 - 5
static/app/views/performance/browser/webVitals/components/pageOverviewSidebar.tsx → static/app/views/insights/browser/webVitals/components/pageOverviewSidebar.tsx

@@ -16,11 +16,11 @@ import {getPeriod} from 'sentry/utils/duration/getPeriod';
 import {formatAbbreviatedNumber} from 'sentry/utils/formatters';
 import usePageFilters from 'sentry/utils/usePageFilters';
 import useRouter from 'sentry/utils/useRouter';
-import {MiniAggregateWaterfall} from 'sentry/views/performance/browser/webVitals/components/miniAggregateWaterfall';
-import PerformanceScoreRingWithTooltips from 'sentry/views/performance/browser/webVitals/components/performanceScoreRingWithTooltips';
-import {MODULE_DOC_LINK} from 'sentry/views/performance/browser/webVitals/settings';
-import {useProjectRawWebVitalsValuesTimeseriesQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/rawWebVitalsQueries/useProjectRawWebVitalsValuesTimeseriesQuery';
-import type {ProjectScore} from 'sentry/views/performance/browser/webVitals/utils/types';
+import {MiniAggregateWaterfall} from 'sentry/views/insights/browser/webVitals/components/miniAggregateWaterfall';
+import PerformanceScoreRingWithTooltips from 'sentry/views/insights/browser/webVitals/components/performanceScoreRingWithTooltips';
+import {useProjectRawWebVitalsValuesTimeseriesQuery} from 'sentry/views/insights/browser/webVitals/queries/rawWebVitalsQueries/useProjectRawWebVitalsValuesTimeseriesQuery';
+import {MODULE_DOC_LINK} from 'sentry/views/insights/browser/webVitals/settings';
+import type {ProjectScore} from 'sentry/views/insights/browser/webVitals/types';
 import {SidebarSpacer} from 'sentry/views/performance/transactionSummary/utils';
 
 const CHART_HEIGHTS = 100;

+ 14 - 15
static/app/views/performance/browser/webVitals/pageOverviewWebVitalsDetailPanel.tsx → static/app/views/insights/browser/webVitals/components/pageOverviewWebVitalsDetailPanel.tsx

@@ -22,27 +22,26 @@ import {useLocation} from 'sentry/utils/useLocation';
 import useOrganization from 'sentry/utils/useOrganization';
 import useProjects from 'sentry/utils/useProjects';
 import {useRoutes} from 'sentry/utils/useRoutes';
-import DetailPanel from 'sentry/views/insights/common/components/detailPanel';
-import {SpanIndexedField} from 'sentry/views/insights/types';
-import {PerformanceBadge} from 'sentry/views/performance/browser/webVitals/components/performanceBadge';
-import {WebVitalDetailHeader} from 'sentry/views/performance/browser/webVitals/components/webVitalDescription';
-import {WebVitalStatusLineChart} from 'sentry/views/performance/browser/webVitals/components/webVitalStatusLineChart';
-import useProfileExists from 'sentry/views/performance/browser/webVitals/utils/profiling/useProfileExists';
-import {useProjectRawWebVitalsQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/rawWebVitalsQueries/useProjectRawWebVitalsQuery';
-import {useProjectRawWebVitalsValuesTimeseriesQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/rawWebVitalsQueries/useProjectRawWebVitalsValuesTimeseriesQuery';
-import {calculatePerformanceScoreFromStoredTableDataRow} from 'sentry/views/performance/browser/webVitals/utils/queries/storedScoreQueries/calculatePerformanceScoreFromStored';
-import {useProjectWebVitalsScoresQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/storedScoreQueries/useProjectWebVitalsScoresQuery';
-import {useInteractionsCategorizedSamplesQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/useInteractionsCategorizedSamplesQuery';
-import {useTransactionsCategorizedSamplesQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/useTransactionsCategorizedSamplesQuery';
+import {WebVitalStatusLineChart} from 'sentry/views/insights/browser/webVitals/components/charts/webVitalStatusLineChart';
+import {PerformanceBadge} from 'sentry/views/insights/browser/webVitals/components/performanceBadge';
+import {WebVitalDetailHeader} from 'sentry/views/insights/browser/webVitals/components/webVitalDescription';
+import {useProjectRawWebVitalsQuery} from 'sentry/views/insights/browser/webVitals/queries/rawWebVitalsQueries/useProjectRawWebVitalsQuery';
+import {useProjectRawWebVitalsValuesTimeseriesQuery} from 'sentry/views/insights/browser/webVitals/queries/rawWebVitalsQueries/useProjectRawWebVitalsValuesTimeseriesQuery';
+import {calculatePerformanceScoreFromStoredTableDataRow} from 'sentry/views/insights/browser/webVitals/queries/storedScoreQueries/calculatePerformanceScoreFromStored';
+import {useProjectWebVitalsScoresQuery} from 'sentry/views/insights/browser/webVitals/queries/storedScoreQueries/useProjectWebVitalsScoresQuery';
+import {useInteractionsCategorizedSamplesQuery} from 'sentry/views/insights/browser/webVitals/queries/useInteractionsCategorizedSamplesQuery';
+import {useTransactionsCategorizedSamplesQuery} from 'sentry/views/insights/browser/webVitals/queries/useTransactionsCategorizedSamplesQuery';
 import type {
   InteractionSpanSampleRowWithScore,
   TransactionSampleRowWithScore,
   WebVitals,
-} from 'sentry/views/performance/browser/webVitals/utils/types';
+} from 'sentry/views/insights/browser/webVitals/types';
+import useProfileExists from 'sentry/views/insights/browser/webVitals/utils/useProfileExists';
+import DetailPanel from 'sentry/views/insights/common/components/detailPanel';
+import {SpanIndexedField} from 'sentry/views/insights/types';
+import {TraceViewSources} from 'sentry/views/performance/newTraceDetails/traceMetadataHeader';
 import {generateReplayLink} from 'sentry/views/performance/transactionSummary/utils';
 
-import {TraceViewSources} from '../../newTraceDetails/traceMetadataHeader';
-
 type Column = GridColumnHeader;
 
 const columnOrder: GridColumnOrder[] = [

+ 2 - 2
static/app/views/performance/browser/webVitals/components/performanceBadge.tsx → static/app/views/insights/browser/webVitals/components/performanceBadge.tsx

@@ -1,11 +1,11 @@
 import styled from '@emotion/styled';
 
 import {space} from 'sentry/styles/space';
-import {PERFORMANCE_SCORE_COLORS} from 'sentry/views/performance/browser/webVitals/utils/performanceScoreColors';
+import {PERFORMANCE_SCORE_COLORS} from 'sentry/views/insights/browser/webVitals/utils/performanceScoreColors';
 import {
   scoreToStatus,
   STATUS_TEXT,
-} from 'sentry/views/performance/browser/webVitals/utils/scoreToStatus';
+} from 'sentry/views/insights/browser/webVitals/utils/scoreToStatus';
 
 type Props = {
   score: number;

+ 0 - 0
static/app/views/performance/browser/webVitals/components/performanceScoreRing.tsx → static/app/views/insights/browser/webVitals/components/performanceScoreRing.tsx


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