css`
body {
diff --git a/superset-frontend/src/dashboard/types.ts b/superset-frontend/src/dashboard/types.ts
index 85df31047bc..49b05812468 100644
--- a/superset-frontend/src/dashboard/types.ts
+++ b/superset-frontend/src/dashboard/types.ts
@@ -29,7 +29,7 @@ import {
NativeFilterTarget,
ColumnOption,
} from '@superset-ui/core';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { GenericDataType } from '@apache-superset/core/common';
import { Dataset } from '@superset-ui/chart-controls';
import { chart } from 'src/components/Chart/chartReducer';
import componentTypes from 'src/dashboard/util/componentTypes';
diff --git a/superset-frontend/src/dashboard/util/backgroundStyleOptions.ts b/superset-frontend/src/dashboard/util/backgroundStyleOptions.ts
index ea055846210..2151891f255 100644
--- a/superset-frontend/src/dashboard/util/backgroundStyleOptions.ts
+++ b/superset-frontend/src/dashboard/util/backgroundStyleOptions.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { BACKGROUND_TRANSPARENT, BACKGROUND_WHITE } from './constants';
export default [
diff --git a/superset-frontend/src/dashboard/util/getFilterFieldNodesTree.ts b/superset-frontend/src/dashboard/util/getFilterFieldNodesTree.ts
index 21f84f4a129..8928f51ad51 100644
--- a/superset-frontend/src/dashboard/util/getFilterFieldNodesTree.ts
+++ b/superset-frontend/src/dashboard/util/getFilterFieldNodesTree.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { getDashboardFilterKey } from './getDashboardFilterKey';
import { ALL_FILTERS_ROOT } from './constants';
diff --git a/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.ts b/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.ts
index e5bf06421fb..ec9dbe78f13 100644
--- a/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.ts
+++ b/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.ts
@@ -17,7 +17,7 @@
* under the License.
*/
import { isEmpty } from 'lodash';
-import { t } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
import { DASHBOARD_ROOT_ID } from './constants';
import { CHART_TYPE, DASHBOARD_ROOT_TYPE, TAB_TYPE } from './componentTypes';
diff --git a/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx b/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx
index 1e2c10c9bfc..b266e23b151 100644
--- a/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx
+++ b/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { detectOS } from 'src/utils/common';
export const getSliceHeaderTooltip = (sliceName: string | undefined) => {
diff --git a/superset-frontend/src/dashboard/util/headerStyleOptions.ts b/superset-frontend/src/dashboard/util/headerStyleOptions.ts
index 73afacb811c..d1f82290e47 100644
--- a/superset-frontend/src/dashboard/util/headerStyleOptions.ts
+++ b/superset-frontend/src/dashboard/util/headerStyleOptions.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { SMALL_HEADER, MEDIUM_HEADER, LARGE_HEADER } from './constants';
export default [
diff --git a/superset-frontend/src/dashboard/util/newComponentFactory.ts b/superset-frontend/src/dashboard/util/newComponentFactory.ts
index 1e33cdfc064..2855d4a63f1 100644
--- a/superset-frontend/src/dashboard/util/newComponentFactory.ts
+++ b/superset-frontend/src/dashboard/util/newComponentFactory.ts
@@ -17,7 +17,7 @@
* under the License.
*/
import { nanoid } from 'nanoid';
-import { t } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
import {
CHART_TYPE,
diff --git a/superset-frontend/src/dashboard/util/updateComponentParentsList.ts b/superset-frontend/src/dashboard/util/updateComponentParentsList.ts
index 5df87114efb..67499d642c6 100644
--- a/superset-frontend/src/dashboard/util/updateComponentParentsList.ts
+++ b/superset-frontend/src/dashboard/util/updateComponentParentsList.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { logging } from '@apache-superset/core';
+import { logging } from '@apache-superset/core/utils';
interface LayoutComponent {
id: string;
diff --git a/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.ts b/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.ts
index 9bcf9d5e25c..0a32b3be57e 100644
--- a/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.ts
+++ b/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.ts
@@ -18,7 +18,7 @@
*/
import { useMemo } from 'react';
import { Filter, ChartCustomization } from '@superset-ui/core';
-import { useTheme } from '@apache-superset/core/ui';
+import { useTheme } from '@apache-superset/core/theme';
import { useSelector } from 'react-redux';
import { RootState } from 'src/dashboard/types';
import { useChartCustomizationFromRedux } from 'src/dashboard/components/nativeFilters/state';
diff --git a/superset-frontend/src/embedded/EmbeddedContextProviders.tsx b/superset-frontend/src/embedded/EmbeddedContextProviders.tsx
index e233010e36d..9ea9c0744ab 100644
--- a/superset-frontend/src/embedded/EmbeddedContextProviders.tsx
+++ b/superset-frontend/src/embedded/EmbeddedContextProviders.tsx
@@ -26,7 +26,7 @@ import { DynamicPluginProvider } from 'src/components';
import { EmbeddedUiConfigProvider } from 'src/components/UiConfigContext';
import { SupersetThemeProvider } from 'src/theme/ThemeProvider';
import { ThemeController } from 'src/theme/ThemeController';
-import type { ThemeStorage } from '@apache-superset/core/ui';
+import { type ThemeStorage } from '@apache-superset/core/theme';
import { store } from 'src/views/store';
import querystring from 'query-string';
diff --git a/superset-frontend/src/embedded/index.tsx b/superset-frontend/src/embedded/index.tsx
index 305b254e314..5609877f77c 100644
--- a/superset-frontend/src/embedded/index.tsx
+++ b/superset-frontend/src/embedded/index.tsx
@@ -21,10 +21,13 @@ import 'src/public-path';
import { lazy, Suspense } from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router, Route } from 'react-router-dom';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { makeApi } from '@superset-ui/core';
-import { logging } from '@apache-superset/core';
-import { type SupersetThemeConfig, ThemeMode } from '@apache-superset/core/ui';
+import { logging } from '@apache-superset/core/utils';
+import {
+ type SupersetThemeConfig,
+ ThemeMode,
+} from '@apache-superset/core/theme';
import Switchboard from '@superset-ui/switchboard';
import getBootstrapData, { applicationRoot } from 'src/utils/getBootstrapData';
import setupClient from 'src/setup/setupClient';
diff --git a/superset-frontend/src/embedded/utils.ts b/superset-frontend/src/embedded/utils.ts
index 404c493962c..cc9e8612f03 100644
--- a/superset-frontend/src/embedded/utils.ts
+++ b/superset-frontend/src/embedded/utils.ts
@@ -22,7 +22,7 @@ import {
JsonObject,
QueryFormData,
} from '@superset-ui/core';
-import { logging } from '@apache-superset/core';
+import { logging } from '@apache-superset/core/utils';
import { isEmpty, isEqual } from 'lodash';
import { NATIVE_FILTER_PREFIX } from 'src/dashboard/components/nativeFilters/FiltersConfigModal/utils';
import {
diff --git a/superset-frontend/src/explore/actions/exploreActions.ts b/superset-frontend/src/explore/actions/exploreActions.ts
index 3855e3b93bf..cfcbd8a524e 100644
--- a/superset-frontend/src/explore/actions/exploreActions.ts
+++ b/superset-frontend/src/explore/actions/exploreActions.ts
@@ -19,7 +19,7 @@
/* eslint camelcase: 0 */
import rison from 'rison';
import { Dataset } from '@superset-ui/chart-controls';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { SupersetClient, QueryFormData } from '@superset-ui/core';
import { Dispatch } from 'redux';
import {
diff --git a/superset-frontend/src/explore/actions/hydrateExplore.ts b/superset-frontend/src/explore/actions/hydrateExplore.ts
index b8e0375a648..0ceb1259b7b 100644
--- a/superset-frontend/src/explore/actions/hydrateExplore.ts
+++ b/superset-frontend/src/explore/actions/hydrateExplore.ts
@@ -29,9 +29,11 @@ import { Dispatch } from 'redux';
import {
Currency,
ensureIsArray,
+ FeatureFlag,
getCategoricalSchemeRegistry,
getColumnLabel,
getSequentialSchemeRegistry,
+ isFeatureEnabled,
NO_TIME_RANGE,
QueryFormColumn,
VizType,
@@ -142,11 +144,20 @@ export const hydrateExplore =
if (colorSchemeKey) verifyColorScheme(ColorSchemeType.CATEGORICAL);
if (linearColorSchemeKey) verifyColorScheme(ColorSchemeType.SEQUENTIAL);
+ const granularExport = isFeatureEnabled(FeatureFlag.GranularExportControls);
const exploreState = {
// note this will add `form_data` to state,
// which will be manipulable by future reducers.
can_add: findPermission('can_write', 'Chart', user?.roles),
- can_download: findPermission('can_csv', 'Superset', user?.roles),
+ can_download: granularExport
+ ? findPermission('can_export_data', 'Superset', user?.roles)
+ : findPermission('can_csv', 'Superset', user?.roles),
+ can_export_image: granularExport
+ ? findPermission('can_export_image', 'Superset', user?.roles)
+ : true,
+ can_copy_clipboard: granularExport
+ ? findPermission('can_copy_clipboard', 'Superset', user?.roles)
+ : true,
can_overwrite: ensureIsArray(slice?.owners).includes(
user?.userId as number,
),
diff --git a/superset-frontend/src/explore/actions/saveModalActions.ts b/superset-frontend/src/explore/actions/saveModalActions.ts
index c09f8e9b408..7c1df6ec8b7 100644
--- a/superset-frontend/src/explore/actions/saveModalActions.ts
+++ b/superset-frontend/src/explore/actions/saveModalActions.ts
@@ -18,7 +18,7 @@
*/
import rison from 'rison';
import { Dispatch } from 'redux';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
DatasourceType,
type QueryFormData,
diff --git a/superset-frontend/src/explore/components/ChartPills.tsx b/superset-frontend/src/explore/components/ChartPills.tsx
index 7794cf147d5..9531c8ba361 100644
--- a/superset-frontend/src/explore/components/ChartPills.tsx
+++ b/superset-frontend/src/explore/components/ChartPills.tsx
@@ -18,7 +18,7 @@
*/
import { forwardRef, RefObject } from 'react';
import { QueryData } from '@superset-ui/core';
-import { css, SupersetTheme } from '@apache-superset/core/ui';
+import { css, SupersetTheme } from '@apache-superset/core/theme';
import {
CachedLabel,
type LabelType,
diff --git a/superset-frontend/src/explore/components/Control.tsx b/superset-frontend/src/explore/components/Control.tsx
index f6eed7623f4..794525111e9 100644
--- a/superset-frontend/src/explore/components/Control.tsx
+++ b/superset-frontend/src/explore/components/Control.tsx
@@ -23,7 +23,7 @@ import {
ControlComponentProps as BaseControlComponentProps,
} from '@superset-ui/chart-controls';
import { JsonValue, QueryFormData, usePrevious } from '@superset-ui/core';
-import { styled } from '@apache-superset/core/ui';
+import { styled } from '@apache-superset/core/theme';
import { ErrorBoundary } from 'src/components';
import { ExploreActions } from 'src/explore/actions/exploreActions';
import controlMap from './controls';
diff --git a/superset-frontend/src/explore/components/ControlHeader.tsx b/superset-frontend/src/explore/components/ControlHeader.tsx
index 8213bf6267c..d4563a8dbbd 100644
--- a/superset-frontend/src/explore/components/ControlHeader.tsx
+++ b/superset-frontend/src/explore/components/ControlHeader.tsx
@@ -17,8 +17,8 @@
* under the License.
*/
import { FC, ReactNode } from 'react';
-import { t } from '@apache-superset/core';
-import { css, useTheme, SupersetTheme } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { css, useTheme, SupersetTheme } from '@apache-superset/core/theme';
import { FormLabel, InfoTooltip, Tooltip } from '@superset-ui/core/components';
import { Icons } from '@superset-ui/core/components/Icons';
diff --git a/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx b/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx
index 1945faae536..fe67e52eb6f 100644
--- a/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx
+++ b/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx
@@ -23,7 +23,7 @@ import {
userEvent,
waitFor,
} from 'spec/helpers/testing-library';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
DatasourceType,
getChartControlPanelRegistry,
diff --git a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx
index a7450ed7b6f..fba0cc3c0fd 100644
--- a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx
+++ b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx
@@ -28,7 +28,7 @@ import {
useRef,
useState,
} from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
ensureIsArray,
getChartControlPanelRegistry,
@@ -42,7 +42,12 @@ import {
FeatureFlag,
VizType,
} from '@superset-ui/core';
-import { styled, css, SupersetTheme, useTheme } from '@apache-superset/core/ui';
+import {
+ styled,
+ css,
+ SupersetTheme,
+ useTheme,
+} from '@apache-superset/core/theme';
import {
ControlPanelSectionConfig,
ControlState,
diff --git a/superset-frontend/src/explore/components/DataTableControl/index.tsx b/superset-frontend/src/explore/components/DataTableControl/index.tsx
index 2e9e11776d3..823da872857 100644
--- a/superset-frontend/src/explore/components/DataTableControl/index.tsx
+++ b/superset-frontend/src/explore/components/DataTableControl/index.tsx
@@ -17,10 +17,10 @@
* under the License.
*/
import { useMemo, useState, useEffect, useRef, RefObject } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { getTimeFormatter, safeHtmlSpan, TimeFormats } from '@superset-ui/core';
-import { css, styled, useTheme } from '@apache-superset/core/ui';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { css, styled, useTheme } from '@apache-superset/core/theme';
+import { GenericDataType } from '@apache-superset/core/common';
import { Column } from 'react-table';
import { debounce } from 'lodash';
import {
diff --git a/superset-frontend/src/explore/components/DataTableControl/useTableColumns.test.ts b/superset-frontend/src/explore/components/DataTableControl/useTableColumns.test.ts
index acfb4987879..4304da6b748 100644
--- a/superset-frontend/src/explore/components/DataTableControl/useTableColumns.test.ts
+++ b/superset-frontend/src/explore/components/DataTableControl/useTableColumns.test.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { GenericDataType } from '@apache-superset/core/common';
import { renderHook } from '@testing-library/react-hooks';
import { Constants } from '@superset-ui/core/components';
import { useTableColumns } from '.';
diff --git a/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx
index 19300e29c57..22431227cb3 100644
--- a/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx
+++ b/superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx
@@ -17,9 +17,9 @@
* under the License.
*/
import { useCallback, useEffect, useMemo, useState, MouseEvent } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core';
-import { styled } from '@apache-superset/core/ui';
+import { styled } from '@apache-superset/core/theme';
import { Icons } from '@superset-ui/core/components/Icons';
import Tabs from '@superset-ui/core/components/Tabs';
import {
diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx
index 88125ef32aa..5206032b03b 100644
--- a/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx
+++ b/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx
@@ -16,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { styled, css } from '@apache-superset/core/ui';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { styled, css } from '@apache-superset/core/theme';
+import { GenericDataType } from '@apache-superset/core/common';
import { useMemo } from 'react';
import { zip } from 'lodash';
import {
diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx
index 196bed0b1d9..70e4f755ebc 100644
--- a/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx
+++ b/superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx
@@ -16,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
-import { styled } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { styled } from '@apache-superset/core/theme';
import Tabs from '@superset-ui/core/components/Tabs';
import { ResultTypes, ResultsPaneProps } from '../types';
import { useResultsPane } from './useResultsPane';
diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx
index b48e19a44cc..1c58bd9ae69 100644
--- a/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx
+++ b/superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx
@@ -17,9 +17,9 @@
* under the License.
*/
import { useState, useEffect, useMemo, useCallback } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { ensureIsArray } from '@superset-ui/core';
-import { styled } from '@apache-superset/core/ui';
+import { styled } from '@apache-superset/core/theme';
import {
TableView,
TableSize,
@@ -27,7 +27,7 @@ import {
Loading,
EmptyWrapperType,
} from '@superset-ui/core/components';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { GenericDataType } from '@apache-superset/core/common';
import {
useFilteredTableData,
useTableColumns,
diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/SingleQueryResultPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/SingleQueryResultPane.tsx
index 6e096182234..cf44d415538 100644
--- a/superset-frontend/src/explore/components/DataTablesPane/components/SingleQueryResultPane.tsx
+++ b/superset-frontend/src/explore/components/DataTablesPane/components/SingleQueryResultPane.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import { useState, useCallback } from 'react';
-import { t } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
import {
TableView,
TableSize,
diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx
index a25a7974101..9ba54e5b62e 100644
--- a/superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx
+++ b/superset-frontend/src/explore/components/DataTablesPane/components/useResultsPane.tsx
@@ -18,13 +18,13 @@
*/
import { useState, useEffect, ReactElement, useCallback } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
ensureIsArray,
getChartMetadataRegistry,
getClientErrorObject,
} from '@superset-ui/core';
-import { styled } from '@apache-superset/core/ui';
+import { styled } from '@apache-superset/core/theme';
import { EmptyState, Loading } from '@superset-ui/core/components';
import { getChartDataRequest } from 'src/components/Chart/chartAction';
import { ResultsPaneProps, QueryResultInterface } from '../types';
diff --git a/superset-frontend/src/explore/components/DataTablesPane/types.ts b/superset-frontend/src/explore/components/DataTablesPane/types.ts
index 90ba2b98cb0..b0fdb987c9f 100644
--- a/superset-frontend/src/explore/components/DataTablesPane/types.ts
+++ b/superset-frontend/src/explore/components/DataTablesPane/types.ts
@@ -17,7 +17,7 @@
* under the License.
*/
import { JsonObject, LatestQueryFormData } from '@superset-ui/core';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { GenericDataType } from '@apache-superset/core/common';
import type { ChartStatus, Datasource } from 'src/explore/types';
export enum ResultTypes {
diff --git a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx
index 7540b235513..dad76da609d 100644
--- a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx
+++ b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelDragOption/index.tsx
@@ -19,7 +19,7 @@
import { RefObject } from 'react';
import { useDrag } from 'react-dnd';
import { Metric } from '@superset-ui/core';
-import { css, styled, useTheme } from '@apache-superset/core/ui';
+import { css, styled, useTheme } from '@apache-superset/core/theme';
import { ColumnMeta } from '@superset-ui/chart-controls';
import { DndItemType } from 'src/explore/components/DndItemType';
import {
diff --git a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx
index d97ada34d1b..c19753eaa3d 100644
--- a/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx
+++ b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx
@@ -18,9 +18,9 @@
*/
import { CSSProperties, ReactNode, useCallback } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { useCSSTextTruncation } from '@superset-ui/core';
-import { css, styled, useTheme } from '@apache-superset/core/ui';
+import { css, styled, useTheme } from '@apache-superset/core/theme';
import { Icons } from '@superset-ui/core/components/Icons';
import { Tooltip } from '@superset-ui/core/components/Tooltip';
diff --git a/superset-frontend/src/explore/components/DatasourcePanel/fixtures.tsx b/superset-frontend/src/explore/components/DatasourcePanel/fixtures.tsx
index 0c7825b9d98..39d200cba1b 100644
--- a/superset-frontend/src/explore/components/DatasourcePanel/fixtures.tsx
+++ b/superset-frontend/src/explore/components/DatasourcePanel/fixtures.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { GenericDataType } from '@apache-superset/core/common';
export const columns = [
{
diff --git a/superset-frontend/src/explore/components/DatasourcePanel/index.tsx b/superset-frontend/src/explore/components/DatasourcePanel/index.tsx
index 1278a2282f1..74718ae3751 100644
--- a/superset-frontend/src/explore/components/DatasourcePanel/index.tsx
+++ b/superset-frontend/src/explore/components/DatasourcePanel/index.tsx
@@ -17,9 +17,10 @@
* under the License.
*/
import { useContext, useMemo, useState } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { DatasourceType, Metric, QueryFormData } from '@superset-ui/core';
-import { css, styled, useTheme, Alert } from '@apache-superset/core/ui';
+import { Alert } from '@apache-superset/core/components';
+import { css, styled, useTheme } from '@apache-superset/core/theme';
import { ControlConfig } from '@superset-ui/chart-controls';
import AutoSizer from 'react-virtualized-auto-sizer';
diff --git a/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts b/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts
index eb94823069a..32f2eba3d62 100644
--- a/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts
+++ b/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { Metric } from '@superset-ui/core';
import { FoldersEditorItemType } from 'src/components/Datasource/types';
import {
diff --git a/superset-frontend/src/explore/components/EmbedCodeContent.tsx b/superset-frontend/src/explore/components/EmbedCodeContent.tsx
index 9d1ebb81bdf..deda9002a97 100644
--- a/superset-frontend/src/explore/components/EmbedCodeContent.tsx
+++ b/superset-frontend/src/explore/components/EmbedCodeContent.tsx
@@ -25,7 +25,8 @@ import {
useState,
} from 'react';
import { LatestQueryFormData } from '@superset-ui/core';
-import { css, t } from '@apache-superset/core/ui';
+import { css } from '@apache-superset/core/theme';
+import { t } from '@apache-superset/core/translation';
import { Input, Space, Typography } from '@superset-ui/core/components';
import { CopyToClipboard } from 'src/components';
import { URL_PARAMS } from 'src/constants';
diff --git a/superset-frontend/src/explore/components/ExploreAlert.tsx b/superset-frontend/src/explore/components/ExploreAlert.tsx
index 6afbb056198..d4a8a4b4405 100644
--- a/superset-frontend/src/explore/components/ExploreAlert.tsx
+++ b/superset-frontend/src/explore/components/ExploreAlert.tsx
@@ -20,7 +20,7 @@
import { forwardRef, RefObject, MouseEvent } from 'react';
import { Button } from '@superset-ui/core/components';
import { ErrorAlert } from 'src/components';
-import { styled } from '@apache-superset/core/ui';
+import { styled } from '@apache-superset/core/theme';
interface ControlPanelAlertProps {
title: string;
diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx b/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx
index 8da1bd91569..a839fbfaab5 100644
--- a/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx
+++ b/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx
@@ -32,8 +32,9 @@ import {
isMatrixifyEnabled,
MatrixifyFormData,
} from '@superset-ui/core';
-import { logging } from '@apache-superset/core';
-import { css, t, SupersetTheme } from '@apache-superset/core/ui';
+import { logging } from '@apache-superset/core/utils';
+import { css, SupersetTheme } from '@apache-superset/core/theme';
+import { t } from '@apache-superset/core/translation';
import { Icons } from '@superset-ui/core/components/Icons';
import PropertiesModal from 'src/explore/components/PropertiesModal';
import { sliceUpdated } from 'src/explore/actions/exploreActions';
diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx b/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx
index 0b95f29bde6..20bfcfb849e 100644
--- a/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx
+++ b/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx
@@ -17,8 +17,8 @@
* under the License.
*/
import { useMemo } from 'react';
-import { t } from '@apache-superset/core';
-import { tn } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
+import { tn } from '@apache-superset/core/translation';
import MetadataBar, {
MetadataType,
} from '@superset-ui/core/components/MetadataBar';
diff --git a/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx b/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx
index fd29a604383..c692e65bfd1 100644
--- a/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx
+++ b/superset-frontend/src/explore/components/ExploreChartPanel/index.tsx
@@ -18,7 +18,7 @@
*/
import { useState, useEffect, useCallback, useMemo, ReactNode } from 'react';
import Split from 'react-split';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
DatasourceType,
ensureIsArray,
@@ -30,7 +30,8 @@ import {
JsonObject,
getExtensionsRegistry,
} from '@superset-ui/core';
-import { css, styled, useTheme, Alert } from '@apache-superset/core/ui';
+import { Alert } from '@apache-superset/core/components';
+import { css, styled, useTheme } from '@apache-superset/core/theme';
import ChartContainer from 'src/components/Chart/ChartContainer';
import {
getItem,
diff --git a/superset-frontend/src/explore/components/ExploreContainer/index.tsx b/superset-frontend/src/explore/components/ExploreContainer/index.tsx
index 5cf714ea740..fbac64cf1f6 100644
--- a/superset-frontend/src/explore/components/ExploreContainer/index.tsx
+++ b/superset-frontend/src/explore/components/ExploreContainer/index.tsx
@@ -25,7 +25,7 @@ import {
useReducer,
} from 'react';
-import { styled } from '@apache-superset/core/ui';
+import { styled } from '@apache-superset/core/theme';
import { useDragDropManager } from 'react-dnd';
import { DatasourcePanelDndItem } from '../DatasourcePanel/types';
diff --git a/superset-frontend/src/explore/components/ExploreContentPopover.tsx b/superset-frontend/src/explore/components/ExploreContentPopover.tsx
index 3a006601cc7..a0f97b7543e 100644
--- a/superset-frontend/src/explore/components/ExploreContentPopover.tsx
+++ b/superset-frontend/src/explore/components/ExploreContentPopover.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { styled } from '@apache-superset/core/ui';
+import { styled } from '@apache-superset/core/theme';
export const ExplorePopoverContent = styled.div`
.edit-popover-resize {
diff --git a/superset-frontend/src/explore/components/ExploreViewContainer/index.tsx b/superset-frontend/src/explore/components/ExploreViewContainer/index.tsx
index 3fddda72aef..26110471a7f 100644
--- a/superset-frontend/src/explore/components/ExploreViewContainer/index.tsx
+++ b/superset-frontend/src/explore/components/ExploreViewContainer/index.tsx
@@ -41,8 +41,9 @@ import {
ControlStateMapping,
ControlPanelState,
} from '@superset-ui/chart-controls';
-import { t, styled, css, useTheme } from '@apache-superset/core/ui';
-import { logging } from '@apache-superset/core';
+import { styled, css, useTheme } from '@apache-superset/core/theme';
+import { t } from '@apache-superset/core/translation';
+import { logging } from '@apache-superset/core/utils';
import { debounce, isEqual, isObjectLike, omit, pick } from 'lodash';
import { Resizable } from 're-resizable';
import { Tooltip } from '@superset-ui/core/components';
diff --git a/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx b/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx
index b182f6bc662..a2b09d64cd6 100644
--- a/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx
+++ b/superset-frontend/src/explore/components/ExportToCSVDropdown/index.tsx
@@ -18,8 +18,8 @@
*/
import { ReactChild, useCallback, Key } from 'react';
-import { t } from '@apache-superset/core';
-import { styled } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { styled } from '@apache-superset/core/theme';
import { Icons } from '@superset-ui/core/components/Icons';
import { Dropdown } from '@superset-ui/core/components';
diff --git a/superset-frontend/src/explore/components/PropertiesModal/index.tsx b/superset-frontend/src/explore/components/PropertiesModal/index.tsx
index 675323a13a8..6e1ba30939f 100644
--- a/superset-frontend/src/explore/components/PropertiesModal/index.tsx
+++ b/superset-frontend/src/explore/components/PropertiesModal/index.tsx
@@ -26,7 +26,7 @@ import {
type SelectValue,
} from '@superset-ui/core/components';
import rison from 'rison';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
SupersetClient,
isFeatureEnabled,
diff --git a/superset-frontend/src/explore/components/RunQueryButton/index.tsx b/superset-frontend/src/explore/components/RunQueryButton/index.tsx
index 9e2e71e3bdb..22cf4782396 100644
--- a/superset-frontend/src/explore/components/RunQueryButton/index.tsx
+++ b/superset-frontend/src/explore/components/RunQueryButton/index.tsx
@@ -18,8 +18,8 @@
*/
import { ReactNode } from 'react';
-import { t } from '@apache-superset/core';
-import { useTheme } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { useTheme } from '@apache-superset/core/theme';
import { Button } from '@superset-ui/core/components';
import { Icons } from '@superset-ui/core/components/Icons';
diff --git a/superset-frontend/src/explore/components/SaveModal.tsx b/superset-frontend/src/explore/components/SaveModal.tsx
index 91c27f90002..a78b4ce7dc1 100644
--- a/superset-frontend/src/explore/components/SaveModal.tsx
+++ b/superset-frontend/src/explore/components/SaveModal.tsx
@@ -36,15 +36,16 @@ import {
Flex,
TreeSelect,
} from '@superset-ui/core/components';
-import { t, logging } from '@apache-superset/core';
+import { logging } from '@apache-superset/core/utils';
+import { t } from '@apache-superset/core/translation';
import { DatasourceType, isDefined, SupersetClient } from '@superset-ui/core';
+import { Alert } from '@apache-superset/core/components';
import {
css,
styled,
withTheme,
- Alert,
type SupersetTheme,
-} from '@apache-superset/core/ui';
+} from '@apache-superset/core/theme';
import { Radio } from '@superset-ui/core/components/Radio';
import { GRID_COLUMN_COUNT } from 'src/dashboard/util/constants';
import { canUserEditDashboard } from 'src/dashboard/util/permissionUtils';
diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx
index e7b7494be01..c9f2904abc8 100644
--- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx
+++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx
@@ -34,12 +34,12 @@ import {
VizType,
type QueryFormColumn,
} from '@superset-ui/core';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
styled,
withTheme,
type SupersetTheme,
-} from '@apache-superset/core/ui';
+} from '@apache-superset/core/theme';
import SelectControl from 'src/explore/components/controls/SelectControl';
import TextControl from 'src/explore/components/controls/TextControl';
import CheckboxControl from 'src/explore/components/controls/CheckboxControl';
diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.ts b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.ts
index 2c44a6fd97c..f4b9903f6d2 100644
--- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.ts
+++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationTypes.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
interface Annotation {
sourceType?: string;
diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx
index 9339f7433fe..9538264b22a 100644
--- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx
+++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx
@@ -18,14 +18,14 @@
*/
import { connect } from 'react-redux';
import { PureComponent } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
HandlerFunction,
JsonObject,
Payload,
QueryFormData,
} from '@superset-ui/core';
-import { SupersetTheme, withTheme } from '@apache-superset/core/ui';
+import { SupersetTheme, withTheme } from '@apache-superset/core/theme';
import {
AsyncEsmComponent,
List,
diff --git a/superset-frontend/src/explore/components/controls/BoundsControl.tsx b/superset-frontend/src/explore/components/controls/BoundsControl.tsx
index 788ba89aa23..6d132595258 100644
--- a/superset-frontend/src/explore/components/controls/BoundsControl.tsx
+++ b/superset-frontend/src/explore/components/controls/BoundsControl.tsx
@@ -18,8 +18,8 @@
*/
import { useEffect, useRef, useState } from 'react';
import { InputNumber } from '@superset-ui/core/components';
-import { t } from '@apache-superset/core';
-import { styled } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { styled } from '@apache-superset/core/theme';
import { debounce } from 'lodash';
import ControlHeader from 'src/explore/components/ControlHeader';
diff --git a/superset-frontend/src/explore/components/controls/CheckboxControl.tsx b/superset-frontend/src/explore/components/controls/CheckboxControl.tsx
index f9120159e90..363ac67ed24 100644
--- a/superset-frontend/src/explore/components/controls/CheckboxControl.tsx
+++ b/superset-frontend/src/explore/components/controls/CheckboxControl.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import { Component, type ReactNode } from 'react';
-import { styled, css } from '@apache-superset/core/ui';
+import { styled, css } from '@apache-superset/core/theme';
import { Checkbox } from '@superset-ui/core/components';
import ControlHeader from '../ControlHeader';
diff --git a/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx b/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx
index 0243b669f2b..d21ffeecc69 100644
--- a/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx
+++ b/superset-frontend/src/explore/components/controls/CollectionControl/index.tsx
@@ -19,8 +19,8 @@
import React, { Component } from 'react';
import { IconTooltip, List } from '@superset-ui/core/components';
import { nanoid } from 'nanoid';
-import { t } from '@apache-superset/core';
-import { withTheme, type SupersetTheme } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { withTheme, type SupersetTheme } from '@apache-superset/core/theme';
import {
SortableContainer,
SortableHandle,
diff --git a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointOption.tsx b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointOption.tsx
index afe467dda9b..fedee53bb83 100644
--- a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointOption.tsx
+++ b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointOption.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
-import { styled } from '@apache-superset/core/ui';
+import { styled } from '@apache-superset/core/theme';
import { ColorBreakpointOptionProps } from './types';
import ColorBreakpointPopoverTrigger from './ColorBreakpointPopoverTrigger';
import { DragContainer } from '../OptionControls';
diff --git a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx
index fc6ef70c0b8..857f4c995c2 100644
--- a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx
+++ b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointPopoverControl.tsx
@@ -18,9 +18,9 @@
*/
import { useState, useMemo } from 'react';
import { Button, Row, Col, InputNumber } from '@superset-ui/core/components';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { validateNumber } from '@superset-ui/core';
-import { styled } from '@apache-superset/core/ui';
+import { styled } from '@apache-superset/core/theme';
import ControlHeader from '../../ControlHeader';
import ColorPickerControl from '../ColorPickerControl';
import {
diff --git a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx
index 8ef3cee64fd..ed49d3d4435 100644
--- a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx
+++ b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/index.tsx
@@ -18,8 +18,8 @@
*/
import { useState, useEffect } from 'react';
-import { t } from '@apache-superset/core';
-import { styled } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { styled } from '@apache-superset/core/theme';
import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel';
import ColorBreakpointOption from './ColorBreakpointOption';
import { ColorBreakpointType, ColorBreakpointsControlProps } from './types';
diff --git a/superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorSchemeLabel.tsx b/superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorSchemeLabel.tsx
index 46538f81817..60e0a190916 100644
--- a/superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorSchemeLabel.tsx
+++ b/superset-frontend/src/explore/components/controls/ColorSchemeControl/ColorSchemeLabel.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
-import { css, SupersetTheme } from '@apache-superset/core/ui';
+import { css, SupersetTheme } from '@apache-superset/core/theme';
import { useRef, useState } from 'react';
import { Tooltip } from '@superset-ui/core/components';
diff --git a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx
index 06777530c72..529136f1702 100644
--- a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx
+++ b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx
@@ -18,7 +18,7 @@
*/
import { useMemo, ReactNode } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
ColorScheme,
ColorSchemeGroup,
@@ -26,7 +26,7 @@ import {
getLabelsColorMap,
CategoricalColorNamespace,
} from '@superset-ui/core';
-import { css, useTheme } from '@apache-superset/core/ui';
+import { css, useTheme } from '@apache-superset/core/theme';
import { sortBy } from 'lodash';
import ControlHeader from 'src/explore/components/ControlHeader';
import {
diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx
index 2fac42ba057..239deefaac7 100644
--- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx
+++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx
@@ -17,9 +17,9 @@
* under the License.
*/
import { useMemo, useState } from 'react';
-import { t } from '@apache-superset/core';
-import { useTheme } from '@apache-superset/core/ui';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { t } from '@apache-superset/core/translation';
+import { useTheme } from '@apache-superset/core/theme';
+import { GenericDataType } from '@apache-superset/core/common';
import {
COLUMN_NAME_ALIASES,
ControlComponentProps,
diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx
index fac850c5cfd..1b4e6fa9955 100644
--- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx
+++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import { memo } from 'react';
-import { css, useTheme } from '@apache-superset/core/ui';
+import { css, useTheme } from '@apache-superset/core/theme';
import { Popover } from '@superset-ui/core/components';
import { Icons } from '@superset-ui/core/components/Icons';
import { ColumnTypeLabel } from '@superset-ui/chart-controls';
diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigPopover.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigPopover.tsx
index 6b3f9fe38f6..c004e9939d2 100644
--- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigPopover.tsx
+++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigPopover.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { GenericDataType } from '@apache-superset/core/common';
import Tabs from '@superset-ui/core/components/Tabs';
import {
SHARED_COLUMN_CONFIG_PROPS,
diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/ControlFormItem.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/ControlFormItem.tsx
index cd35882d5ed..3c9a5379f8e 100644
--- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/ControlFormItem.tsx
+++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/ControlFormItem.tsx
@@ -18,7 +18,7 @@
*/
import { useState, FunctionComponentElement, ChangeEvent } from 'react';
import { JsonValue } from '@superset-ui/core';
-import { useTheme } from '@apache-superset/core/ui';
+import { useTheme } from '@apache-superset/core/theme';
import { ControlFormItemComponents } from './controls';
import ControlHeader, { ControlHeaderProps } from '../../../ControlHeader';
import { ControlFormItemDefaultSpec } from '../types';
diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx
index f8d60b375c7..2b05b70ceac 100644
--- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx
+++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx
@@ -23,7 +23,7 @@ import {
useMemo,
} from 'react';
import { JsonObject, JsonValue } from '@superset-ui/core';
-import { useTheme } from '@apache-superset/core/ui';
+import { useTheme } from '@apache-superset/core/theme';
import { Constants } from '@superset-ui/core/components';
import { debounce } from 'lodash';
import { ControlFormItemNode } from './ControlFormItem';
diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx
index 088a06d8998..7668cf328c2 100644
--- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx
+++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { validateNumber } from '@superset-ui/core';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { GenericDataType } from '@apache-superset/core/common';
import {
ControlFormItemSpec,
D3_FORMAT_DOCS,
diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/types.ts b/superset-frontend/src/explore/components/controls/ColumnConfigControl/types.ts
index e7bf6b42159..c77a7fe408a 100644
--- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/types.ts
+++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/types.ts
@@ -17,7 +17,7 @@
* under the License.
*/
import { JsonObject, StrictJsonValue } from '@superset-ui/core';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { GenericDataType } from '@apache-superset/core/common';
import { ControlFormItemSpec } from '@superset-ui/chart-controls';
import {
SHARED_COLUMN_CONFIG_PROPS,
diff --git a/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx b/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx
index aaa8d116bff..1273c1633ac 100644
--- a/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx
+++ b/superset-frontend/src/explore/components/controls/ComparisonRangeLabel.tsx
@@ -20,7 +20,7 @@
import { useEffect, useState } from 'react';
import { useSelector } from 'react-redux';
import { isEmpty, isEqual, noop } from 'lodash';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
BinaryAdhocFilter,
ensureIsArray,
@@ -29,7 +29,7 @@ import {
parseDttmToDate,
SimpleAdhocFilter,
} from '@superset-ui/core';
-import { css } from '@apache-superset/core/ui';
+import { css } from '@apache-superset/core/theme';
import ControlHeader, {
ControlHeaderProps,
} from 'src/explore/components/ControlHeader';
diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx
index 866e101699d..c476cc67772 100644
--- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx
+++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/ConditionalFormattingControl.tsx
@@ -17,8 +17,8 @@
* under the License.
*/
import { useEffect, useState } from 'react';
-import { t } from '@apache-superset/core';
-import { styled, css } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { styled, css } from '@apache-superset/core/theme';
import { Comparator } from '@superset-ui/chart-controls';
import { Icons } from '@superset-ui/core/components/Icons';
import ControlHeader from 'src/explore/components/ControlHeader';
diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.test.tsx b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.test.tsx
index 232661f627b..8f3838c92f8 100644
--- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.test.tsx
+++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.test.tsx
@@ -23,7 +23,7 @@ import {
waitFor,
} from 'spec/helpers/testing-library';
import { Comparator, ColorSchemeEnum } from '@superset-ui/chart-controls';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { GenericDataType } from '@apache-superset/core/common';
import { FormattingPopoverContent } from './FormattingPopoverContent';
const mockOnChange = jest.fn();
diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx
index 7331cfbb9a4..f7926929e2d 100644
--- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx
+++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx
@@ -17,9 +17,9 @@
* under the License.
*/
import { useMemo, useState, useEffect, useCallback } from 'react';
-import { t } from '@apache-superset/core';
-import { styled } from '@apache-superset/core/ui';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { t } from '@apache-superset/core/translation';
+import { styled } from '@apache-superset/core/theme';
+import { GenericDataType } from '@apache-superset/core/common';
import {
Comparator,
MultipleValueComparators,
diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/constants.ts b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/constants.ts
index 7365b147e2a..4bc6ce6a76b 100644
--- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/constants.ts
+++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/constants.ts
@@ -17,7 +17,7 @@
* under the License.
*/
import { Comparator, ObjectFormattingEnum } from '@superset-ui/chart-controls';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
export const operatorOptions = [
{ value: Comparator.None, label: t('None') },
diff --git a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/types.ts b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/types.ts
index 870a874c042..f2a58a162ed 100644
--- a/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/types.ts
+++ b/superset-frontend/src/explore/components/controls/ConditionalFormattingControl/types.ts
@@ -24,7 +24,7 @@ import {
ControlComponentProps,
ObjectFormattingEnum,
} from '@superset-ui/chart-controls';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { GenericDataType } from '@apache-superset/core/common';
export type ConditionalFormattingConfig = {
operator?: Comparator;
diff --git a/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx b/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx
index e4e623c49a9..6916c2f7095 100644
--- a/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx
+++ b/superset-frontend/src/explore/components/controls/ContourControl/ContourOption.tsx
@@ -17,8 +17,8 @@
* under the License.
*/
-import { t } from '@apache-superset/core';
-import { styled } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { styled } from '@apache-superset/core/theme';
import { ContourOptionProps } from './types';
import ContourPopoverTrigger from './ContourPopoverTrigger';
import OptionWrapper from '../DndColumnSelectControl/OptionWrapper';
diff --git a/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx b/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx
index ae734d21cb7..472716cdb2f 100644
--- a/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx
+++ b/superset-frontend/src/explore/components/controls/ContourControl/ContourPopoverControl.tsx
@@ -19,9 +19,9 @@
import { useState, useEffect } from 'react';
import { Button, Row, Col } from '@superset-ui/core/components';
import Tabs from '@superset-ui/core/components/Tabs';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { legacyValidateInteger } from '@superset-ui/core';
-import { styled } from '@apache-superset/core/ui';
+import { styled } from '@apache-superset/core/theme';
import ControlHeader from '../../ControlHeader';
import TextControl from '../TextControl';
import ColorPickerControl from '../ColorPickerControl';
diff --git a/superset-frontend/src/explore/components/controls/ContourControl/index.tsx b/superset-frontend/src/explore/components/controls/ContourControl/index.tsx
index c8148071c91..37f915eaecb 100644
--- a/superset-frontend/src/explore/components/controls/ContourControl/index.tsx
+++ b/superset-frontend/src/explore/components/controls/ContourControl/index.tsx
@@ -18,8 +18,8 @@
*/
import { useState, useEffect } from 'react';
-import { t } from '@apache-superset/core';
-import { styled } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { styled } from '@apache-superset/core/theme';
import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel';
import ContourPopoverTrigger from './ContourPopoverTrigger';
import ContourOption from './ContourOption';
diff --git a/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx b/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx
index 3da754330fd..c2a31de9ff7 100644
--- a/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx
+++ b/superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.tsx
@@ -18,9 +18,9 @@
*/
import { useCallback, useMemo } from 'react';
import { useSelector } from 'react-redux';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { Currency, ensureIsArray, getCurrencySymbol } from '@superset-ui/core';
-import { css, styled, useTheme } from '@apache-superset/core/ui';
+import { css, styled, useTheme } from '@apache-superset/core/theme';
import { CSSObject } from '@emotion/react';
import { Select, type SelectProps } from '@superset-ui/core/components';
import { ViewState } from 'src/views/types';
diff --git a/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx b/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx
index a3c824aadbc..6c848cba55d 100644
--- a/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx
+++ b/superset-frontend/src/explore/components/controls/CustomListItem/index.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { useTheme } from '@apache-superset/core/ui';
+import { useTheme } from '@apache-superset/core/theme';
import { List, type ListItemProps } from '@superset-ui/core/components';
export interface CustomListItemProps extends ListItemProps {
diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl/DatasourceControl.test.tsx b/superset-frontend/src/explore/components/controls/DatasourceControl/DatasourceControl.test.tsx
index b51e87fb2bc..a589ab83fc1 100644
--- a/superset-frontend/src/explore/components/controls/DatasourceControl/DatasourceControl.test.tsx
+++ b/superset-frontend/src/explore/components/controls/DatasourceControl/DatasourceControl.test.tsx
@@ -24,7 +24,6 @@ import { DatasourceType, JsonObject, SupersetClient } from '@superset-ui/core';
import {
render,
screen,
- act,
userEvent,
waitFor,
} from 'spec/helpers/testing-library';
@@ -32,7 +31,20 @@ import { fallbackExploreInitialData } from 'src/explore/fixtures';
import type { ColumnObject } from 'src/features/datasets/types';
import DatasourceControl from '.';
-const SupersetClientGet = jest.spyOn(SupersetClient, 'get');
+// Mock DatasourceEditor to avoid mounting the full 2,500+ line editor tree.
+// The heavy editor (CollectionTable, FilterableTable, DatabaseSelector, etc.)
+// causes OOM in CI when rendered repeatedly. These tests only need to verify
+// DatasourceControl's callback wiring through the modal save flow.
+// Editor internals are tested in DatasourceEditor.test.tsx.
+jest.mock('src/components/Datasource/components/DatasourceEditor', () => ({
+ __esModule: true,
+ default: () =>
+ require('react').createElement(
+ 'div',
+ { 'data-test': 'mock-datasource-editor' },
+ 'Mock Editor',
+ ),
+}));
let originalLocation: Location;
@@ -42,8 +54,19 @@ beforeEach(() => {
afterEach(() => {
window.location = originalLocation;
- fetchMock.clearHistory().removeRoutes();
- jest.clearAllMocks(); // Clears mock history but keeps spy in place
+
+ try {
+ const unmatched = fetchMock.callHistory.calls('unmatched');
+ if (unmatched.length > 0) {
+ const urls = unmatched.map(call => call.url).join(', ');
+ throw new Error(
+ `fetchMock: ${unmatched.length} unmatched call(s): ${urls}`,
+ );
+ }
+ } finally {
+ fetchMock.clearHistory().removeRoutes();
+ jest.restoreAllMocks();
+ }
});
interface TestDatasource {
@@ -234,16 +257,16 @@ test('Should show SQL Lab for sql_lab role', async () => {
test('Click on Swap dataset option', async () => {
const props = createProps();
- SupersetClientGet.mockImplementationOnce(
- async ({ endpoint }: { endpoint: string }) => {
+ jest
+ .spyOn(SupersetClient, 'get')
+ .mockImplementation(async ({ endpoint }: { endpoint: string }) => {
if (endpoint.includes('_info')) {
return {
json: { permissions: ['can_read', 'can_write'] },
} as any;
}
return { json: { result: [] } } as any;
- },
- );
+ });
render(
, {
useRedux: true,
@@ -251,9 +274,8 @@ test('Click on Swap dataset option', async () => {
});
await userEvent.click(screen.getByTestId('datasource-menu-trigger'));
- await act(async () => {
- await userEvent.click(screen.getByText('Swap dataset'));
- });
+ await userEvent.click(screen.getByText('Swap dataset'));
+
expect(
screen.getByText(
'Changing the dataset may break the chart if the chart relies on columns or metadata that does not exist in the target dataset',
@@ -263,25 +285,18 @@ test('Click on Swap dataset option', async () => {
test('Click on Edit dataset', async () => {
const props = createProps();
- SupersetClientGet.mockImplementationOnce(
- async () => ({ json: { result: [] } }) as any,
- );
fetchMock.removeRoute(getDbWithQuery);
fetchMock.get(getDbWithQuery, { result: [] }, { name: getDbWithQuery });
render(
, {
useRedux: true,
useRouter: true,
});
- userEvent.click(screen.getByTestId('datasource-menu-trigger'));
+ await userEvent.click(screen.getByTestId('datasource-menu-trigger'));
- await act(async () => {
- userEvent.click(screen.getByText('Edit dataset'));
- });
+ await userEvent.click(screen.getByText('Edit dataset'));
expect(
- screen.getByText(
- 'Changing these settings will affect all charts using this dataset, including charts owned by other people.',
- ),
+ await screen.findByTestId('mock-datasource-editor'),
).toBeInTheDocument();
});
@@ -289,9 +304,6 @@ test('Edit dataset should be disabled when user is not admin', async () => {
const props = createProps();
props.user.roles = {};
props.datasource.owners = [];
- SupersetClientGet.mockImplementationOnce(
- async () => ({ json: { result: [] } }) as any,
- );
render(
, {
useRedux: true,
@@ -330,9 +342,7 @@ test('Click on View in SQL Lab', async () => {
expect(queryByTestId('mock-sqllab-route')).not.toBeInTheDocument();
- await act(async () => {
- await userEvent.click(screen.getByText('View in SQL Lab'));
- });
+ await userEvent.click(screen.getByText('View in SQL Lab'));
expect(getByTestId('mock-sqllab-route')).toBeInTheDocument();
expect(JSON.parse(`${getByTestId('mock-sqllab-route').textContent}`)).toEqual(
@@ -570,235 +580,87 @@ test('should show forbidden dataset state', () => {
expect(screen.getByText(error.statusText)).toBeVisible();
});
-test('should allow creating new metrics in dataset editor', async () => {
- const newMetricName = `test_metric_${Date.now()}`;
- const mockDatasourceWithMetrics = {
- ...mockDatasource,
- metrics: [],
- };
-
+test('should fire onDatasourceSave when saving with new metrics', async () => {
const props = createProps({
- datasource: mockDatasourceWithMetrics,
+ datasource: { ...mockDatasource, metrics: [] },
});
- // Mock API calls for dataset editor
- fetchMock.get(getDbWithQuery, { response: { result: [] } });
-
- fetchMock.get(getDatasetWithAll, { result: mockDatasourceWithMetrics });
-
- fetchMock.put(putDatasetWithAll, {
- result: {
- ...mockDatasourceWithMetrics,
- metrics: [{ id: 1, metric_name: newMetricName }],
- },
- });
-
- SupersetClientGet.mockImplementationOnce(
- async () => ({ json: { result: [] } }) as any,
- );
-
render(
, {
useRedux: true,
useRouter: true,
});
- // Open datasource menu and click edit dataset
- userEvent.click(screen.getByTestId('datasource-menu-trigger'));
- userEvent.click(await screen.findByTestId('edit-dataset'));
-
- // Wait for modal to appear and navigate to Metrics tab
- await waitFor(() => {
- expect(screen.getByText('Metrics')).toBeInTheDocument();
+ await openAndSaveChanges({
+ ...mockDatasource,
+ metrics: [{ id: 1, metric_name: 'test_metric' }],
});
- userEvent.click(screen.getByText('Metrics'));
-
- // Click add new metric button
- const addButton = await screen.findByTestId('crud-add-table-item');
- userEvent.click(addButton);
-
- // Find and fill in the metric name
- const nameInput = await screen.findByTestId('textarea-editable-title-input');
- userEvent.clear(nameInput);
- userEvent.type(nameInput, newMetricName);
-
- // Save the modal
- userEvent.click(screen.getByTestId('datasource-modal-save'));
-
- // Confirm the save
- const okButton = await screen.findByText('OK');
- userEvent.click(okButton);
-
- // Verify the onDatasourceSave callback was called
await waitFor(() => {
- expect(props.onDatasourceSave).toHaveBeenCalled();
+ expect(props.onDatasourceSave).toHaveBeenCalledWith(
+ expect.objectContaining({
+ metrics: [{ id: 1, metric_name: 'test_metric' }],
+ }),
+ );
});
});
-test('should allow deleting metrics in dataset editor', async () => {
- const existingMetricName = 'existing_metric';
- const mockDatasourceWithMetrics = {
- ...mockDatasource,
- metrics: [{ id: 1, metric_name: existingMetricName }],
- };
-
+test('should fire onDatasourceSave when saving with removed metrics', async () => {
const props = createProps({
- datasource: mockDatasourceWithMetrics,
+ datasource: {
+ ...mockDatasource,
+ metrics: [{ id: 1, metric_name: 'existing_metric' }],
+ },
});
- // Mock API calls
- fetchMock.get('glob:*/api/v1/database/?q=*', { result: [] });
-
- fetchMock.get('glob:*/api/v1/dataset/*', {
- result: mockDatasourceWithMetrics,
- });
-
- fetchMock.put('glob:*/api/v1/dataset/*', {
- result: { ...mockDatasourceWithMetrics, metrics: [] },
- });
-
- SupersetClientGet.mockImplementationOnce(
- async () => ({ json: { result: [] } }) as any,
- );
-
render(
, {
useRedux: true,
useRouter: true,
});
- // Open edit dataset modal
- await userEvent.click(screen.getByTestId('datasource-menu-trigger'));
- await userEvent.click(await screen.findByTestId('edit-dataset'));
+ await openAndSaveChanges({ ...mockDatasource, metrics: [] });
- // Navigate to Metrics tab
await waitFor(() => {
- expect(screen.getByText('Metrics')).toBeInTheDocument();
- });
- await userEvent.click(screen.getByText('Metrics'));
-
- // Find existing metric and delete it
- const metricRow = (await screen.findByText(existingMetricName)).closest('tr');
- expect(metricRow).toBeInTheDocument();
-
- const deleteButton = metricRow?.querySelector(
- '[data-test="crud-delete-icon"]',
- );
- expect(deleteButton).toBeInTheDocument();
- await userEvent.click(deleteButton!);
-
- // Save the changes
- await userEvent.click(screen.getByTestId('datasource-modal-save'));
-
- // Confirm the save
- const okButton = await screen.findByText('OK');
- await userEvent.click(okButton);
-
- // Verify the onDatasourceSave callback was called
- await waitFor(() => {
- expect(props.onDatasourceSave).toHaveBeenCalled();
+ expect(props.onDatasourceSave).toHaveBeenCalledWith(
+ expect.objectContaining({ metrics: [] }),
+ );
});
});
test('should handle metric save confirmation modal', async () => {
const props = createProps();
- // Mock API calls for dataset editor
- fetchMock.get('glob:*/api/v1/database/?q=*', { result: [] });
-
- fetchMock.get('glob:*/api/v1/dataset/*', { result: mockDatasource });
-
- fetchMock.put('glob:*/api/v1/dataset/*', { result: mockDatasource });
-
- SupersetClientGet.mockImplementationOnce(
- async () => ({ json: { result: [] } }) as any,
- );
-
render(
, {
useRedux: true,
useRouter: true,
});
- // Open edit dataset modal
- await userEvent.click(screen.getByTestId('datasource-menu-trigger'));
- await userEvent.click(await screen.findByTestId('edit-dataset'));
+ await openAndSaveChanges(mockDatasource);
- // Save without making changes
- const saveButton = await screen.findByTestId('datasource-modal-save');
- await userEvent.click(saveButton);
-
- // Verify confirmation modal appears
- await waitFor(() => {
- expect(screen.getByText('OK')).toBeInTheDocument();
- });
-
- // Click OK to confirm
- await userEvent.click(screen.getByText('OK'));
-
- // Verify the save was processed
await waitFor(() => {
expect(props.onDatasourceSave).toHaveBeenCalled();
});
});
-test('should verify real DatasourceControl callback fires on save', async () => {
- // This test verifies that the REAL DatasourceControl component calls onDatasourceSave
- // This is simpler than the full metric creation flow but tests the key integration
-
+test('should fire onDatasourceSave callback on save', async () => {
const mockOnDatasourceSave = jest.fn();
const props = createProps({
datasource: mockDatasource,
onDatasourceSave: mockOnDatasourceSave,
});
- // Mock API calls with the same datasource (no changes needed for this test)
- fetchMock.get('glob:*/api/v1/database/?q=*', { result: [] });
-
- fetchMock.get('glob:*/api/v1/dataset/*', { result: mockDatasource });
-
- fetchMock.put('glob:*/api/v1/dataset/*', { result: mockDatasource });
-
- SupersetClientGet.mockImplementationOnce(
- async () => ({ json: { result: [] } }) as any,
- );
-
- // Render the REAL DatasourceControl component
render(
, {
useRedux: true,
useRouter: true,
});
- // Verify the real component rendered
- expect(screen.getByTestId('datasource-control')).toBeInTheDocument();
+ await openAndSaveChanges(mockDatasource);
- // Open dataset editor
- await userEvent.click(screen.getByTestId('datasource-menu-trigger'));
- await userEvent.click(await screen.findByTestId('edit-dataset'));
-
- // Wait for modal to open
await waitFor(() => {
- expect(screen.getByText('Columns')).toBeInTheDocument();
+ expect(mockOnDatasourceSave).toHaveBeenCalledWith(
+ expect.objectContaining({
+ id: expect.any(Number),
+ name: expect.any(String),
+ }),
+ );
});
-
- // Save without making changes (this should still trigger the callback)
- await userEvent.click(screen.getByTestId('datasource-modal-save'));
- const okButton = await screen.findByText('OK');
- await userEvent.click(okButton);
-
- // Verify the REAL component called the callback
- // This tests that the integration point works (regardless of what data is passed)
- await waitFor(() => {
- expect(mockOnDatasourceSave).toHaveBeenCalled();
- });
-
- // Verify it was called with a datasource object
- expect(mockOnDatasourceSave).toHaveBeenCalledWith(
- expect.objectContaining({
- id: expect.any(Number),
- name: expect.any(String),
- }),
- );
});
-
-// Note: Cross-component integration test removed due to complex Redux/user context setup
-// The existing callback tests provide sufficient coverage for metric creation workflows
-// Future enhancement could add MetricsControl integration when test infrastructure supports it
diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx b/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx
index 968c00d20a4..76136b8b483 100644
--- a/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx
+++ b/superset-frontend/src/explore/components/controls/DatasourceControl/index.tsx
@@ -20,13 +20,13 @@
import React, { PureComponent } from 'react';
import { DatasourceType, SupersetClient, Datasource } from '@superset-ui/core';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
css,
styled,
withTheme,
type SupersetTheme,
-} from '@apache-superset/core/ui';
+} from '@apache-superset/core/theme';
import { getTemporalColumns } from '@superset-ui/chart-controls';
import { getUrlParam } from 'src/utils/urlUtils';
import {
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx
index b35530b0295..3aa6a1415d3 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx
@@ -17,13 +17,18 @@
* under the License.
*/
import { ReactNode, useState, useEffect, useMemo } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
NO_TIME_RANGE,
useCSSTextTruncation,
fetchTimeRange,
} from '@superset-ui/core';
-import { css, styled, useTheme, SupersetTheme } from '@apache-superset/core/ui';
+import {
+ css,
+ styled,
+ useTheme,
+ SupersetTheme,
+} from '@apache-superset/core/theme';
import {
Button,
Constants,
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx
index e9f2b5aaf64..febdd725967 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { SEPARATOR } from '@superset-ui/core';
import { Input, Icons, InfoTooltip } from '@superset-ui/core/components';
import { FrameComponentProps } from 'src/explore/components/controls/DateFilterControl/types';
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CalendarFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CalendarFrame.tsx
index 505e3a0ea65..dba14caf2d8 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CalendarFrame.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CalendarFrame.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import { useEffect } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { Radio } from '@superset-ui/core/components/Radio';
import {
CALENDAR_RANGE_OPTIONS,
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CommonFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CommonFrame.tsx
index da14f0a9638..758f6d4cb9f 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CommonFrame.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CommonFrame.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { Radio } from '@superset-ui/core/components/Radio';
import {
COMMON_RANGE_OPTIONS,
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CurrentCalendarFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CurrentCalendarFrame.tsx
index 65d07c747d2..effc52860f9 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CurrentCalendarFrame.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CurrentCalendarFrame.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import { useEffect } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { Radio } from '@superset-ui/core/components/Radio';
import {
CURRENT_RANGE_OPTIONS,
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx
index f7b8d932215..e2e0ccf61be 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { customTimeRangeDecode } from '@superset-ui/core';
import {
InfoTooltip,
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateFunctionTooltip.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateFunctionTooltip.tsx
index 94a867e8624..20289345032 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateFunctionTooltip.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateFunctionTooltip.tsx
@@ -16,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
-import { useTheme } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { useTheme } from '@apache-superset/core/theme';
import { Tooltip } from '@superset-ui/core/components';
import { ClassNames } from '@emotion/react';
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx
index 619c9624dc8..ee5d8a62ae3 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/DateLabel.tsx
@@ -19,8 +19,8 @@
import { forwardRef, MouseEvent, ReactNode, RefObject } from 'react';
-import { t } from '@apache-superset/core';
-import { css, styled } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { css, styled } from '@apache-superset/core/theme';
import { Icons } from '@superset-ui/core/components/Icons';
export type DateLabelProps = {
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts b/superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts
index 795e25cafc0..f1ad62b6ad4 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
SelectOptionType,
PreviousCalendarWeek,
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
index f68c81248a2..f61fafe8bcb 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
@@ -27,7 +27,8 @@ import {
useState,
} from 'react';
import { useSelector } from 'react-redux';
-import { t, editors } from '@apache-superset/core';
+import { editors } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
AdhocColumn,
isAdhocColumn,
@@ -35,7 +36,7 @@ import {
Metric,
QueryFormMetric,
} from '@superset-ui/core';
-import { styled, css } from '@apache-superset/core/ui';
+import { styled, css } from '@apache-superset/core/theme';
import { ColumnMeta, isSavedExpression } from '@superset-ui/chart-controls';
import Tabs from '@superset-ui/core/components/Tabs';
import {
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx
index 7a706967388..cde8a498ec8 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx
@@ -19,7 +19,7 @@
import { useCallback, useEffect, useMemo, useState, ReactNode } from 'react';
import { useSelector } from 'react-redux';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
AdhocColumn,
isAdhocColumn,
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndAdhocFilterOption.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndAdhocFilterOption.tsx
index 5d4b4b206d6..857b098003b 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndAdhocFilterOption.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndAdhocFilterOption.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { DndItemType } from 'src/explore/components/DndItemType';
import AdhocFilterPopoverTrigger from 'src/explore/components/controls/FilterControl/AdhocFilterPopoverTrigger';
import AdhocFilter from 'src/explore/components/controls/FilterControl/AdhocFilter';
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx
index b7b8bd3d67a..126d699ddff 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import { useCallback, useMemo, useState } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
AdhocColumn,
isAdhocColumn,
@@ -27,7 +27,7 @@ import {
QueryFormMetric,
QueryFormData,
} from '@superset-ui/core';
-import { tn } from '@apache-superset/core';
+import { tn } from '@apache-superset/core/translation';
import { ColumnMeta, isColumnMeta } from '@superset-ui/chart-controls';
import { isString } from 'lodash';
import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel';
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
index 6f560d1ff19..6e474e552cf 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
@@ -17,9 +17,9 @@
* under the License.
*/
import { useCallback, useMemo, useState } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { AdhocColumn, QueryFormColumn, isAdhocColumn } from '@superset-ui/core';
-import { tn } from '@apache-superset/core';
+import { tn } from '@apache-superset/core/translation';
import { ColumnMeta, isColumnMeta } from '@superset-ui/chart-controls';
import { isEmpty } from 'lodash';
import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel';
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.tsx
index 8189668907b..e836e202e10 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.tsx
@@ -17,8 +17,8 @@
* under the License.
*/
import { ChangeEvent, useCallback, useState } from 'react';
-import { t } from '@apache-superset/core';
-import { styled, useTheme } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { styled, useTheme } from '@apache-superset/core/theme';
import { Input, Tooltip } from '@superset-ui/core/components';
import { Icons } from '@superset-ui/core/components/Icons';
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.test.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.test.tsx
index 3664e16c5bd..db1c341ab23 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.test.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.test.tsx
@@ -24,7 +24,7 @@ import {
QueryFormData,
QueryFormMetric,
} from '@superset-ui/core';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { GenericDataType } from '@apache-superset/core/common';
import { ColumnMeta } from '@superset-ui/chart-controls';
import {
fireEvent,
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx
index 9b1a9a371df..3f9c525e920 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx
@@ -17,7 +17,8 @@
* under the License.
*/
import { useCallback, useEffect, useMemo, useState } from 'react';
-import { t, logging } from '@apache-superset/core';
+import { logging } from '@apache-superset/core/utils';
+import { t } from '@apache-superset/core/translation';
import {
Metric,
QueryFormData,
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
index aefdc781cdf..0dd1074acec 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
@@ -19,7 +19,7 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import { nanoid } from 'nanoid';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
ensureIsArray,
isAdhocMetricSimple,
@@ -27,8 +27,8 @@ import {
Metric,
QueryFormMetric,
} from '@superset-ui/core';
-import { tn } from '@apache-superset/core';
-import { GenericDataType } from '@apache-superset/core/api/core';
+import { tn } from '@apache-superset/core/translation';
+import { GenericDataType } from '@apache-superset/core/common';
import { ColumnMeta } from '@superset-ui/chart-controls';
import AdhocMetric from 'src/explore/components/controls/MetricControl/AdhocMetric';
import AdhocMetricPopoverTrigger from 'src/explore/components/controls/MetricControl/AdhocMetricPopoverTrigger';
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx
index 153d97d6384..ba8ee28b9f0 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx
@@ -18,7 +18,7 @@
*/
import { ReactNode, useCallback, useContext, useEffect, useMemo } from 'react';
import { useDrop } from 'react-dnd';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import ControlHeader from 'src/explore/components/ControlHeader';
import {
AddControlLabel,
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx
index f00eb3f2e50..9e5a715464f 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/Option.tsx
@@ -17,8 +17,8 @@
* under the License.
*/
import { useCallback } from 'react';
-import { t } from '@apache-superset/core';
-import { css, styled, useTheme } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { css, styled, useTheme } from '@apache-superset/core/theme';
import { Icons, InfoTooltip } from '@superset-ui/core/components';
import {
CaretContainer,
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/OptionWrapper.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/OptionWrapper.tsx
index a34046f9d5e..787638269cf 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/OptionWrapper.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/OptionWrapper.tsx
@@ -31,7 +31,7 @@ import {
import { Tooltip } from '@superset-ui/core/components';
import { StyledColumnOption } from 'src/explore/components/optionRenderers';
import { isAdhocColumn } from '@superset-ui/core';
-import { styled } from '@apache-superset/core/ui';
+import { styled } from '@apache-superset/core/theme';
import { ColumnMeta } from '@superset-ui/chart-controls';
import Option from './Option';
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx
index 65f61ed5425..c32826a106e 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx
@@ -23,7 +23,7 @@ import {
useState,
MouseEvent as ReactMouseEvent,
} from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { throttle } from 'lodash';
import {
POPOVER_INITIAL_HEIGHT,
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/utils/optionSelector.ts b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/utils/optionSelector.ts
index 574578983b8..d029d8b4851 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/utils/optionSelector.ts
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/utils/optionSelector.ts
@@ -17,7 +17,7 @@
* under the License.
*/
import { ColumnMeta, isColumnMeta } from '@superset-ui/chart-controls';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
AdhocColumn,
ensureIsArray,
diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.tsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.tsx
index 97d3295bd1b..f51da2fdc13 100644
--- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.tsx
+++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.tsx
@@ -18,9 +18,9 @@
*/
import { Component, ReactNode } from 'react';
import { SupersetClient, ensureIsArray } from '@superset-ui/core';
-import { logging } from '@apache-superset/core';
-import { t } from '@apache-superset/core';
-import { withTheme, type SupersetTheme } from '@apache-superset/core/ui';
+import { logging } from '@apache-superset/core/utils';
+import { t } from '@apache-superset/core/translation';
+import { withTheme, type SupersetTheme } from '@apache-superset/core/theme';
import ControlHeader from 'src/explore/components/ControlHeader';
import AdhocMetric, {
diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.tsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.tsx
index 12d106a7319..97cb4bfb2f1 100644
--- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.tsx
+++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.tsx
@@ -18,12 +18,12 @@
*/
import type React from 'react';
import { createRef, Component, type RefObject } from 'react';
-import type { SupersetTheme } from '@apache-superset/core/ui';
+import { type SupersetTheme } from '@apache-superset/core/theme';
import { Button, Icons, Select } from '@superset-ui/core/components';
import { ErrorBoundary } from 'src/components';
import { SupersetClient } from '@superset-ui/core';
-import { t } from '@apache-superset/core';
-import { styled } from '@apache-superset/core/ui';
+import { t } from '@apache-superset/core/translation';
+import { styled } from '@apache-superset/core/theme';
import Tabs from '@superset-ui/core/components/Tabs';
import AdhocFilter from 'src/explore/components/controls/FilterControl/AdhocFilter';
diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx
index aff052566d4..ff9c4db9274 100644
--- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx
+++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx
@@ -25,14 +25,14 @@ import {
Tooltip,
type SelectValue,
} from '@superset-ui/core/components';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import {
isFeatureEnabled,
FeatureFlag,
isDefined,
SupersetClient,
} from '@superset-ui/core';
-import { styled, useTheme, css } from '@apache-superset/core/ui';
+import { styled, useTheme, css } from '@apache-superset/core/theme';
import {
Operators,
OPERATORS_OPTIONS,
diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts
index 44b2a4f5185..185a01f1216 100644
--- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts
+++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts
@@ -17,7 +17,7 @@
* under the License.
*/
import { useCallback, useState } from 'react';
-import { t } from '@apache-superset/core';
+import { t } from '@apache-superset/core/translation';
import { ensureIsArray, SupersetClient } from '@superset-ui/core';
import { debounce } from 'lodash';
import rison from 'rison';
diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/AdhocFilterEditPopoverSqlTabContent.test.tsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/AdhocFilterEditPopoverSqlTabContent.test.tsx
index 2a29116e118..f5b1eee033f 100644
--- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/AdhocFilterEditPopoverSqlTabContent.test.tsx
+++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/AdhocFilterEditPopoverSqlTabContent.test.tsx
@@ -22,30 +22,52 @@ import {
screen,
selectOption,
userEvent,
+ waitFor,
} from 'spec/helpers/testing-library';
import AdhocFilter from '../AdhocFilter';
import { Clauses, ExpressionTypes } from '../types';
import AdhocFilterEditPopoverSqlTabContent from '.';
+// Track resize calls for testing
+const mockResize = jest.fn();
+
+// Mock EditorHost with ref support for resize
+jest.mock('src/core/editors', () => {
+ const React = require('react');
+ return {
+ EditorHost: React.forwardRef(
+ (
+ {
+ value,
+ onChange,
+ }: {
+ value: string;
+ onChange: (v: string) => void;
+ },
+ ref: React.Ref<{ resize: () => void }>,
+ ) => {
+ React.useImperativeHandle(ref, () => ({
+ resize: mockResize,
+ }));
+ return (
+