You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/09/12 21:39:46 UTC

[superset] branch master updated: chore: Remove the ability to switch to filter-box chart when DASHBOARD_NATIVE_FILTERS feature is enabled (#25275)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 8eff5a75b4 chore: Remove the ability to switch to filter-box chart when DASHBOARD_NATIVE_FILTERS feature is enabled (#25275)
8eff5a75b4 is described below

commit 8eff5a75b433592462fba3841419efbe264f9745
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Tue Sep 12 14:39:38 2023 -0700

    chore: Remove the ability to switch to filter-box chart when DASHBOARD_NATIVE_FILTERS feature is enabled (#25275)
---
 .../src/explore/components/controls/VizTypeControl/index.tsx     | 9 +++++++++
 superset-frontend/src/pages/ChartCreation/index.tsx              | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx
index bdfcf1e40a..ec78b4267d 100644
--- a/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx
+++ b/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx
@@ -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';
@@ -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 }) {
diff --git a/superset-frontend/src/pages/ChartCreation/index.tsx b/superset-frontend/src/pages/ChartCreation/index.tsx
index 18b8080db7..c09172e99d 100644
--- a/superset-frontend/src/pages/ChartCreation/index.tsx
+++ b/superset-frontend/src/pages/ChartCreation/index.tsx
@@ -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');
 }