rusackas commented on code in PR #37625:
URL: https://github.com/apache/superset/pull/37625#discussion_r2770114014
##########
superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.tsx:
##########
@@ -32,47 +32,63 @@ import HoverMenu from
'src/dashboard/components/menu/HoverMenu';
import ResizableContainer from
'src/dashboard/components/resizable/ResizableContainer';
import MarkdownModeDropdown from
'src/dashboard/components/menu/MarkdownModeDropdown';
import WithPopoverMenu from 'src/dashboard/components/menu/WithPopoverMenu';
-import { componentShape } from 'src/dashboard/util/propShapes';
+import type { LayoutItem } from 'src/dashboard/types';
+import type { DropResult } from
'src/dashboard/components/dnd/dragDroppableConfig';
import { ROW_TYPE, COLUMN_TYPE } from 'src/dashboard/util/componentTypes';
import {
GRID_MIN_COLUMN_COUNT,
GRID_MIN_ROW_UNITS,
GRID_BASE_UNIT,
} from 'src/dashboard/util/constants';
-const propTypes = {
- id: PropTypes.string.isRequired,
- parentId: PropTypes.string.isRequired,
- component: componentShape.isRequired,
- parentComponent: componentShape.isRequired,
- index: PropTypes.number.isRequired,
- depth: PropTypes.number.isRequired,
- editMode: PropTypes.bool.isRequired,
-
- // from redux
- logEvent: PropTypes.func.isRequired,
- addDangerToast: PropTypes.func.isRequired,
- undoLength: PropTypes.number.isRequired,
- redoLength: PropTypes.number.isRequired,
+interface EditorInstance {
+ resize?: (force: boolean) => void;
+ getSession?: () => { setUseWrapMode: (wrap: boolean) => void };
+ focus?: () => void;
+}
+
+interface MarkdownOwnProps {
+ id: string;
+ parentId: string;
+ component: LayoutItem;
+ parentComponent: LayoutItem;
+ index: number;
+ depth: number;
+ editMode: boolean;
// grid related
- availableColumnCount: PropTypes.number.isRequired,
- columnWidth: PropTypes.number.isRequired,
- onResizeStart: PropTypes.func.isRequired,
- onResize: PropTypes.func.isRequired,
- onResizeStop: PropTypes.func.isRequired,
+ availableColumnCount: number;
+ columnWidth: number;
+ onResizeStart: import('re-resizable').ResizeStartCallback;
+ onResize: import('re-resizable').ResizeCallback;
Review Comment:
> same here
✅ **Addressed in commit d0f27eb2fb** - Moved inline `import('re-resizable')`
types to top-level imports for `ResizeStartCallback` and `ResizeCallback`.
--
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]