Skip to content

Commit

Permalink
test(widget-builder): Remove circular dependency in analytics (#84289)
Browse files Browse the repository at this point in the history
Analytics was importing this type, which came from a file that imported
analytics. Move the type into its own file to resolve some of these
conflicts.
  • Loading branch information
narsaynorath authored Jan 30, 2025
1 parent a77753e commit 5170a7c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion static/app/utils/analytics/dashboardsAnalyticsEvents.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {DashboardsLayout} from 'sentry/views/dashboards/manage';
import type {DashboardsLayout} from 'sentry/views/dashboards/manage/types';

export enum WidgetBuilderVersion {
PAGE = 'page',
Expand Down
3 changes: 1 addition & 2 deletions static/app/views/dashboards/manage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {useNavigate} from 'sentry/utils/useNavigate';
import useOrganization from 'sentry/utils/useOrganization';
import {DashboardImportButton} from 'sentry/views/dashboards/manage/dashboardImport';
import DashboardTable from 'sentry/views/dashboards/manage/dashboardTable';
import type {DashboardsLayout} from 'sentry/views/dashboards/manage/types';
import {MetricsRemovedAlertsWidgetsAlert} from 'sentry/views/metrics/metricsRemovedAlertsWidgetsAlert';
import RouteError from 'sentry/views/routeError';

Expand Down Expand Up @@ -73,8 +74,6 @@ export const LAYOUT_KEY = 'dashboards-overview-layout';
const GRID = 'grid';
const TABLE = 'table';

export type DashboardsLayout = 'grid' | 'table';

function shouldShowTemplates(): boolean {
const shouldShow = localStorage.getItem(SHOW_TEMPLATES_KEY);
return shouldShow === 'true' || shouldShow === null;
Expand Down
1 change: 1 addition & 0 deletions static/app/views/dashboards/manage/types.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type DashboardsLayout = 'grid' | 'table';

0 comments on commit 5170a7c

Please sign in to comment.