mirror of
https://github.com/apache/superset.git
synced 2026-06-02 22:29:26 +00:00
refactor: Removes the deprecated ENABLE_EXPLORE_DRAG_AND_DROP feature flag (#26343)
This commit is contained in:
committed by
GitHub
parent
b2ad74f94f
commit
6063f4ff04
@@ -16,7 +16,6 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { FeatureFlag } from '@superset-ui/core';
|
||||
import React from 'react';
|
||||
import { render, screen } from 'spec/helpers/testing-library';
|
||||
import {
|
||||
@@ -32,14 +31,6 @@ const defaultProps: DndColumnSelectProps = {
|
||||
actions: { setControlValue: jest.fn() },
|
||||
};
|
||||
|
||||
beforeAll(() => {
|
||||
window.featureFlags = { [FeatureFlag.ENABLE_EXPLORE_DRAG_AND_DROP]: true };
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
window.featureFlags = {};
|
||||
});
|
||||
|
||||
test('renders with default props', async () => {
|
||||
render(<DndColumnSelect {...defaultProps} />, {
|
||||
useDnd: true,
|
||||
|
||||
@@ -24,11 +24,7 @@ import {
|
||||
t,
|
||||
isAdhocColumn,
|
||||
} from '@superset-ui/core';
|
||||
import {
|
||||
ColumnMeta,
|
||||
isColumnMeta,
|
||||
withDndFallback,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import { ColumnMeta, isColumnMeta } from '@superset-ui/chart-controls';
|
||||
import { isEmpty } from 'lodash';
|
||||
import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel';
|
||||
import OptionWrapper from 'src/explore/components/controls/DndColumnSelectControl/OptionWrapper';
|
||||
@@ -37,7 +33,6 @@ import { DatasourcePanelDndItem } from 'src/explore/components/DatasourcePanel/t
|
||||
import { DndItemType } from 'src/explore/components/DndItemType';
|
||||
import ColumnSelectPopoverTrigger from './ColumnSelectPopoverTrigger';
|
||||
import { DndControlProps } from './types';
|
||||
import SelectControl from '../SelectControl';
|
||||
|
||||
export type DndColumnSelectProps = DndControlProps<QueryFormColumn> & {
|
||||
options: ColumnMeta[];
|
||||
@@ -216,9 +211,4 @@ function DndColumnSelect(props: DndColumnSelectProps) {
|
||||
);
|
||||
}
|
||||
|
||||
const DndColumnSelectWithFallback = withDndFallback(
|
||||
DndColumnSelect,
|
||||
SelectControl,
|
||||
);
|
||||
|
||||
export { DndColumnSelectWithFallback as DndColumnSelect };
|
||||
export { DndColumnSelect };
|
||||
|
||||
@@ -23,7 +23,6 @@ import configureStore from 'redux-mock-store';
|
||||
|
||||
import {
|
||||
ensureIsArray,
|
||||
FeatureFlag,
|
||||
GenericDataType,
|
||||
QueryFormData,
|
||||
} from '@superset-ui/core';
|
||||
@@ -58,14 +57,6 @@ const baseFormData = {
|
||||
datasource: 'table__1',
|
||||
};
|
||||
|
||||
beforeAll(() => {
|
||||
window.featureFlags = { [FeatureFlag.ENABLE_EXPLORE_DRAG_AND_DROP]: true };
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
window.featureFlags = {};
|
||||
});
|
||||
|
||||
const mockStore = configureStore([thunk]);
|
||||
const store = mockStore({});
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import {
|
||||
ColumnMeta,
|
||||
isColumnMeta,
|
||||
isTemporalColumn,
|
||||
withDndFallback,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import Modal from 'src/components/Modal';
|
||||
import {
|
||||
@@ -50,7 +49,6 @@ import {
|
||||
} from 'src/explore/components/DatasourcePanel/types';
|
||||
import { DndItemType } from 'src/explore/components/DndItemType';
|
||||
import { ControlComponentProps } from 'src/explore/components/Control';
|
||||
import AdhocFilterControl from '../FilterControl/AdhocFilterControl';
|
||||
import DndAdhocFilterOption from './DndAdhocFilterOption';
|
||||
import { useDefaultTimeFilter } from '../DateFilterControl/utils';
|
||||
import { CLAUSES, EXPRESSION_TYPES } from '../FilterControl/types';
|
||||
@@ -422,9 +420,4 @@ const DndFilterSelect = (props: DndFilterSelectProps) => {
|
||||
);
|
||||
};
|
||||
|
||||
const DndFilterSelectWithFallback = withDndFallback(
|
||||
DndFilterSelect,
|
||||
AdhocFilterControl,
|
||||
);
|
||||
|
||||
export { DndFilterSelectWithFallback as DndFilterSelect };
|
||||
export { DndFilterSelect };
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { FeatureFlag } from '@superset-ui/core';
|
||||
import {
|
||||
render,
|
||||
screen,
|
||||
@@ -68,14 +67,6 @@ const adhocMetricB = {
|
||||
optionName: 'def',
|
||||
};
|
||||
|
||||
beforeAll(() => {
|
||||
window.featureFlags = { [FeatureFlag.ENABLE_EXPLORE_DRAG_AND_DROP]: true };
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
window.featureFlags = {};
|
||||
});
|
||||
|
||||
test('renders with default props', () => {
|
||||
render(<DndMetricSelect {...defaultProps} />, { useDnd: true });
|
||||
expect(
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
t,
|
||||
tn,
|
||||
} from '@superset-ui/core';
|
||||
import { ColumnMeta, withDndFallback } from '@superset-ui/chart-controls';
|
||||
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';
|
||||
import MetricDefinitionValue from 'src/explore/components/controls/MetricControl/MetricDefinitionValue';
|
||||
@@ -40,7 +40,6 @@ import { DndItemType } from 'src/explore/components/DndItemType';
|
||||
import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel';
|
||||
import { savedMetricType } from 'src/explore/components/controls/MetricControl/types';
|
||||
import { AGGREGATES } from 'src/explore/constants';
|
||||
import MetricsControl from '../MetricControl/MetricsControl';
|
||||
|
||||
const EMPTY_OBJECT = {};
|
||||
const DND_ACCEPTED_TYPES = [DndItemType.Column, DndItemType.Metric];
|
||||
@@ -364,9 +363,4 @@ const DndMetricSelect = (props: any) => {
|
||||
);
|
||||
};
|
||||
|
||||
const DndMetricSelectWithFallback = withDndFallback(
|
||||
DndMetricSelect,
|
||||
MetricsControl,
|
||||
);
|
||||
|
||||
export { DndMetricSelectWithFallback as DndMetricSelect };
|
||||
export { DndMetricSelect };
|
||||
|
||||
Reference in New Issue
Block a user