michael-s-molina commented on a change in pull request #19064:
URL: https://github.com/apache/superset/pull/19064#discussion_r822529284



##########
File path: 
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardContainer.tsx
##########
@@ -30,13 +30,18 @@ import { ParentSize } from '@vx/responsive';
 import Tabs from 'src/components/Tabs';
 import DashboardGrid from 'src/dashboard/containers/DashboardGrid';
 import getLeafComponentIdFromPath from 
'src/dashboard/util/getLeafComponentIdFromPath';
-import { DashboardLayout, LayoutItem, RootState } from 'src/dashboard/types';
+import {
+  ChartsState,
+  DashboardLayout,
+  LayoutItem,
+  RootState,
+} from 'src/dashboard/types';
 import {
   DASHBOARD_GRID_ID,
   DASHBOARD_ROOT_DEPTH,
 } from 'src/dashboard/util/constants';
 import { getRootLevelTabIndex, getRootLevelTabsComponent } from './utils';
-import { getChartIdsInFilterScope } from '../../util/activeDashboardFilters';

Review comment:
       Can we use the full path in these imports?

##########
File path: 
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardContainer.tsx
##########
@@ -46,16 +51,32 @@ type DashboardContainerProps = {
   topLevelTabs?: LayoutItem;
 };
 
+const useNativeFilterScopes = () => {
+  const nativeFilters = useSelector<RootState, Filters>(
+    state => state.nativeFilters?.filters,
+  );
+  return useMemo(
+    () =>
+      nativeFilters
+        ? Object.values(nativeFilters).map((filter: Filter) => ({

Review comment:
       Nit: use Lodash [pick](https://lodash.com/docs/4.17.15#pick)?

##########
File path: superset-frontend/src/dashboard/components/FiltersBadge/selectors.ts
##########
@@ -27,11 +27,11 @@ import {
   NativeFilterType,
 } from '@superset-ui/core';
 import { NO_TIME_RANGE, TIME_FILTER_MAP } from 'src/explore/constants';
-import { getChartIdsInFilterScope } from 
'src/dashboard/util/activeDashboardFilters';
+import { getChartIdsInFilterBoxScope } from 
'src/dashboard/util/activeDashboardFilters';
 import { ChartConfiguration } from 'src/dashboard/reducers/types';
 import { areObjectsEqual } from 'src/reduxUtils';
 import { Layout } from '../../types';

Review comment:
       ```suggestion
   import { Layout } from 'src/dashboard/types';
   ```

##########
File path: superset-frontend/src/dashboard/components/FiltersBadge/selectors.ts
##########
@@ -27,11 +27,11 @@ import {
   NativeFilterType,
 } from '@superset-ui/core';
 import { NO_TIME_RANGE, TIME_FILTER_MAP } from 'src/explore/constants';
-import { getChartIdsInFilterScope } from 
'src/dashboard/util/activeDashboardFilters';
+import { getChartIdsInFilterBoxScope } from 
'src/dashboard/util/activeDashboardFilters';
 import { ChartConfiguration } from 'src/dashboard/reducers/types';
 import { areObjectsEqual } from 'src/reduxUtils';
 import { Layout } from '../../types';
-import { getTreeCheckedItems } from 
'../nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/utils';
+import { CHART_TYPE } from '../../util/componentTypes';

Review comment:
       ```suggestion
   import { CHART_TYPE } from 'src/dashboard/util/componentTypes';
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to