geido commented on a change in pull request #17089:
URL: https://github.com/apache/superset/pull/17089#discussion_r734611489



##########
File path: superset-frontend/src/dashboard/actions/dashboardInfo.ts
##########
@@ -17,13 +17,32 @@
  * under the License.
  */
 import { Dispatch } from 'redux';
-import { makeApi } from '@superset-ui/core';
+import { makeApi, CategoricalColorNamespace } from '@superset-ui/core';
+import { isString } from 'lodash';
 import { ChartConfiguration, DashboardInfo } from '../reducers/types';
 
 export const DASHBOARD_INFO_UPDATED = 'DASHBOARD_INFO_UPDATED';
 
 // updates partially changed dashboard info
 export function dashboardInfoChanged(newInfo: { metadata: any }) {
+  const { metadata } = newInfo;
+  const { color_namespace: namespace, label_colors: labelColors } = metadata;
+
+  const categoricalNamespace = CategoricalColorNamespace.getNamespace(
+    namespace,
+  );
+
+  categoricalNamespace.resetColors();

Review comment:
       That's fine. Resetting the colors is only useful when the colors of the 
label change or are removed. This is only the case here. As for the QA 
approval, we will need to discuss how is best to proceed as this requires 
potentially disruptive changes in Superset-UI.




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