Skip to content

Commit

Permalink
chore: Remove the ability to switch to filter-box chart when DASHBOAR…
Browse files Browse the repository at this point in the history
…D_NATIVE_FILTERS feature is enabled
  • Loading branch information
john-bodley committed Sep 12, 2023
1 parent a9512c1 commit 329ff44
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import {
getChartMetadataRegistry,
styled,
SupersetTheme,
isFeatureEnabled,
FeatureFlag,
} from '@superset-ui/core';
import { usePluginContext } from 'src/components/DynamicPlugins';
import Modal from 'src/components/Modal';
Expand All @@ -46,6 +48,13 @@ const bootstrapData = getBootstrapData();
const denyList: string[] = bootstrapData.common.conf.VIZ_TYPE_DENYLIST || [];
const metadataRegistry = getChartMetadataRegistry();

if (
isFeatureEnabled(FeatureFlag.DASHBOARD_NATIVE_FILTERS) &&
!denyList.includes('filter_box')
) {
denyList.push('filter_box');
}

export const VIZ_TYPE_CONTROL_TEST_ID = 'viz-type-control';

function VizSupportValidation({ vizType }: { vizType: string }) {
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/pages/ChartCreation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const denyList: string[] = bootstrapData.common.conf.VIZ_TYPE_DENYLIST || [];

if (
isFeatureEnabled(FeatureFlag.DASHBOARD_NATIVE_FILTERS) &&
!('filter_box' in denyList)
!denyList.includes('filter_box')
) {
denyList.push('filter_box');
}
Expand Down

0 comments on commit 329ff44

Please sign in to comment.