mirror of
https://github.com/apache/superset.git
synced 2026-05-10 02:15:50 +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
@@ -20,15 +20,13 @@ import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import {
|
||||
css,
|
||||
DatasourceType,
|
||||
isFeatureEnabled,
|
||||
FeatureFlag,
|
||||
Metric,
|
||||
QueryFormData,
|
||||
styled,
|
||||
t,
|
||||
} from '@superset-ui/core';
|
||||
|
||||
import { ControlConfig, ColumnMeta } from '@superset-ui/chart-controls';
|
||||
import { ControlConfig } from '@superset-ui/chart-controls';
|
||||
|
||||
import { debounce, isArray } from 'lodash';
|
||||
import { matchSorter, rankings } from 'match-sorter';
|
||||
@@ -42,7 +40,6 @@ import { ExploreActions } from 'src/explore/actions/exploreActions';
|
||||
import Control from 'src/explore/components/Control';
|
||||
import DatasourcePanelDragOption from './DatasourcePanelDragOption';
|
||||
import { DndItemType } from '../DndItemType';
|
||||
import { StyledColumnOption, StyledMetricOption } from '../optionRenderers';
|
||||
import { DndItemValue } from './types';
|
||||
|
||||
interface DatasourceControl extends ControlConfig {
|
||||
@@ -83,10 +80,6 @@ export interface Props {
|
||||
formData?: QueryFormData;
|
||||
}
|
||||
|
||||
const enableExploreDnd = isFeatureEnabled(
|
||||
FeatureFlag.ENABLE_EXPLORE_DRAG_AND_DROP,
|
||||
);
|
||||
|
||||
const Button = styled.button`
|
||||
background: none;
|
||||
border: none;
|
||||
@@ -151,14 +144,11 @@ const LabelWrapper = styled.div`
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
${enableExploreDnd &&
|
||||
css`
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background-color: ${theme.colors.grayscale.light3};
|
||||
}
|
||||
`}
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background-color: ${theme.colors.grayscale.light3};
|
||||
}
|
||||
|
||||
& > span {
|
||||
white-space: nowrap;
|
||||
@@ -417,14 +407,10 @@ export default function DataSourcePanel({
|
||||
key={m.metric_name + String(shouldForceUpdate)}
|
||||
className="column"
|
||||
>
|
||||
{enableExploreDnd ? (
|
||||
<DatasourcePanelDragOption
|
||||
value={m}
|
||||
type={DndItemType.Metric}
|
||||
/>
|
||||
) : (
|
||||
<StyledMetricOption metric={m} showType />
|
||||
)}
|
||||
<DatasourcePanelDragOption
|
||||
value={m}
|
||||
type={DndItemType.Metric}
|
||||
/>
|
||||
</LabelContainer>
|
||||
))}
|
||||
{lists?.metrics?.length > DEFAULT_MAX_METRICS_LENGTH ? (
|
||||
@@ -454,14 +440,10 @@ export default function DataSourcePanel({
|
||||
key={col.column_name + String(shouldForceUpdate)}
|
||||
className="column"
|
||||
>
|
||||
{enableExploreDnd ? (
|
||||
<DatasourcePanelDragOption
|
||||
value={col as DndItemValue}
|
||||
type={DndItemType.Column}
|
||||
/>
|
||||
) : (
|
||||
<StyledColumnOption column={col as ColumnMeta} showType />
|
||||
)}
|
||||
<DatasourcePanelDragOption
|
||||
value={col as DndItemValue}
|
||||
type={DndItemType.Column}
|
||||
/>
|
||||
</LabelContainer>
|
||||
))}
|
||||
{lists.columns.length > DEFAULT_MAX_COLUMNS_LENGTH ? (
|
||||
|
||||
Reference in New Issue
Block a user