chore: Deprecate DND feature flags (#23981)

This commit is contained in:
Kamil Gabryjelski
2023-05-10 17:13:03 +02:00
committed by GitHub
parent 7fb8b38cdf
commit 7757b61c22
13 changed files with 55 additions and 95 deletions

View File

@@ -20,10 +20,8 @@
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import {
ensureIsArray,
FeatureFlag,
GenericDataType,
isAdhocMetricSimple,
isFeatureEnabled,
isSavedMetric,
Metric,
QueryFormMetric,
@@ -329,17 +327,11 @@ const DndMetricSelect = (props: any) => {
return new AdhocMetric({});
}, [droppedItem]);
const ghostButtonText = isFeatureEnabled(FeatureFlag.ENABLE_DND_WITH_CLICK_UX)
? tn(
'Drop a column/metric here or click',
'Drop columns/metrics here or click',
multi ? 2 : 1,
)
: tn(
'Drop column or metric here',
'Drop columns or metrics here',
multi ? 2 : 1,
);
const ghostButtonText = tn(
'Drop a column/metric here or click',
'Drop columns/metrics here or click',
multi ? 2 : 1,
);
return (
<div className="metrics-select">
@@ -350,11 +342,7 @@ const DndMetricSelect = (props: any) => {
accept={DND_ACCEPTED_TYPES}
ghostButtonText={ghostButtonText}
displayGhostButton={multi || value.length === 0}
onClickGhostButton={
isFeatureEnabled(FeatureFlag.ENABLE_DND_WITH_CLICK_UX)
? handleClickGhostButton
: undefined
}
onClickGhostButton={handleClickGhostButton}
{...props}
/>
<AdhocMetricPopoverTrigger