graceguo-supercat commented on a change in pull request #16992:
URL: https://github.com/apache/superset/pull/16992#discussion_r734101412



##########
File path: superset-frontend/src/dashboard/actions/hydrate.js
##########
@@ -227,19 +231,25 @@ export const hydrateDashboard = (dashboardData, 
chartData) => (
       const componentId = chartIdToLayoutId[key];
       const directPathToFilter = (layout[componentId].parents || []).slice();
       directPathToFilter.push(componentId);
-      dashboardFilters[key] = {
-        ...dashboardFilter,
-        chartId: key,
-        componentId,
-        datasourceId: slice.form_data.datasource,
-        filterName: slice.slice_name,
-        directPathToFilter,
-        columns,
-        labels,
-        scopes: scopesByChartId,
-        isInstantFilter: !!slice.form_data.instant_filtering,
-        isDateFilter: Object.keys(columns).includes(TIME_RANGE),
-      };
+      if (
+        [
+          FILTER_BOX_MIGRATION_STATES.NOOP,
+          FILTER_BOX_MIGRATION_STATES.SNOOZED,
+        ].includes(filterboxMigrationState)
+      ) {
+        dashboardFilters[key] = {

Review comment:
       when user open dashboard with filter_box, they will be at UNDECIDED 
state. They need to decide to review or snooze.  stay in UNDECIDED state won't 
move forward to use dashboard.
   
   CONVERTED and REVIEWING state, Dashboard will use filter component and 
disable filter_box. they don't need dashboardFilters redux state at all.
   
   NOOP state is for users without migration feature flag, or dashboard already 
had fixed filter_box and filter components, or users can not edit dashboard. 
this part of users are not impact by any new logic introduced from this PR.




-- 
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