mirror of
https://github.com/apache/superset.git
synced 2026-05-30 04:39:20 +00:00
Lint / type errors: - antd v5 doesn't re-export TooltipRef at the top level; import it from antd/es/tooltip in Tooltip and Popover wrappers. - AntdAvatar.Group is a plain React.FC and rejects refs — drop forwardRef on the AvatarGroup wrapper. - BaseIcon forwardRef target straddled HTMLSpanElement and SVGSVGElement; widen the ref type and cast the antd Icon branch to bypass the intersection. Test failures from console / DOM behaviour change in React 18: - ThemeController: re-spy console.warn/error in beforeEach so the jest-fail-on-console wrapper doesn't replace the spy each test. - logging.test: restore window.console in a finally so the failOnConsole afterEach can read console[methodName]. - QueryAutoRefresh / ChartTable: import `act` from `react` instead of the deprecated `react-dom/test-utils`. - CopyToClipboard: wrap the cloneElement copy node in a span so antd Tooltip has a real DOM ref target. - GenericLink: convert to forwardRef so it can be a Tooltip trigger. - DateFilterLabel: wrap the DateLabel trigger in a span — DateLabel forwards its ref to an inner span, which would otherwise become the popover's positioning anchor under React 18. - getControlItemsMap: wrap StyledRowFormItem inside the Tooltip in a span so antd doesn't fall back to findDOMNode. - SqlEditorLeftBar: wrap DatabaseSelector inside the Popover in a span for the same reason. - IconTooltip: forwardRef so it can be used as a tooltip / popover trigger child. Also pick up pre-commit auto-fixes (ruff PERF -> dict.fromkeys, prettier formatting) so pre-commit passes cleanly on CI.