justinpark commented on code in PR #37107:
URL: https://github.com/apache/superset/pull/37107#discussion_r2728563189


##########
superset-frontend/src/components/Chart/ChartRenderer.tsx:
##########
@@ -17,55 +17,155 @@
  * under the License.
  */
 import { snakeCase, isEqual, cloneDeep } from 'lodash';
-import PropTypes from 'prop-types';
-import { createRef, Component } from 'react';
+import { createRef, Component, RefObject, MouseEvent, ReactNode } from 'react';
 import {
   SuperChart,
   Behavior,
   getChartMetadataRegistry,
   VizType,
   isFeatureEnabled,
   FeatureFlag,
+  QueryFormData,
+  AnnotationData,
+  DataMask,
+  QueryData,
+  JsonObject,
+  LatestQueryFormData,
+  AgGridChartState,
+  ContextMenuFilters,
+  DataRecordFilters,
 } from '@superset-ui/core';
 import { logging } from '@apache-superset/core';
 import { t } from '@apache-superset/core/ui';
 import { Logger, LOG_ACTIONS_RENDER_CHART } from 'src/logger/LogUtils';
 import { EmptyState } from '@superset-ui/core/components';
 import { ChartSource } from 'src/types/ChartSource';
-import ChartContextMenu from './ChartContextMenu/ChartContextMenu';
-
-const propTypes = {
-  annotationData: PropTypes.object,
-  actions: PropTypes.object,
-  chartId: PropTypes.number.isRequired,
-  datasource: PropTypes.object,
-  initialValues: PropTypes.object,
-  formData: PropTypes.object.isRequired,
-  latestQueryFormData: PropTypes.object,
-  labelsColor: PropTypes.object,
-  labelsColorMap: PropTypes.object,
-  height: PropTypes.number,
-  width: PropTypes.number,
-  setControlValue: PropTypes.func,
-  vizType: PropTypes.string.isRequired,
-  triggerRender: PropTypes.bool,
-  // state
-  chartAlert: PropTypes.string,
-  chartStatus: PropTypes.string,
-  queriesResponse: PropTypes.arrayOf(PropTypes.object),
-  triggerQuery: PropTypes.bool,
-  chartIsStale: PropTypes.bool,
-  // dashboard callbacks
-  addFilter: PropTypes.func,
-  setDataMask: PropTypes.func,
-  onFilterMenuOpen: PropTypes.func,
-  onFilterMenuClose: PropTypes.func,
-  ownState: PropTypes.object,
-  postTransformProps: PropTypes.func,
-  source: PropTypes.oneOf([ChartSource.Dashboard, ChartSource.Explore]),
-  emitCrossFilters: PropTypes.bool,
-  onChartStateChange: PropTypes.func,
-};
+import type { Datasource, ChartStatus } from 'src/explore/types';
+import type { Dispatch } from 'redux';
+import ChartContextMenu, {
+  ChartContextMenuRef,
+} from './ChartContextMenu/ChartContextMenu';
+
+// Types for filter values
+type FilterValue = string | number | boolean | null | undefined;
+
+// LegendState type based on ECharts
+interface LegendState {
+  [name: string]: boolean;
+}
+
+// Webpack globals declaration
+declare const __webpack_require__:
+  | {
+      h?: () => string;
+    }
+  | undefined;

Review Comment:
   Is this code really necessary?



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