refactor(plugins): replace react-icons with antd icons, remove 83MB dependency (#39184)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Maxime Beauchemin
2026-04-08 13:21:34 -07:00
committed by GitHub
parent b8b2bdedf9
commit 63cceb6a79
5 changed files with 22 additions and 28 deletions

View File

@@ -22,9 +22,11 @@ import { safeHtmlSpan } from '@superset-ui/core';
import { t } from '@apache-superset/core/translation';
import { supersetTheme } from '@apache-superset/core/theme';
import PropTypes from 'prop-types';
import { FaSort } from 'react-icons/fa';
import { FaSortDown as FaSortDesc } from 'react-icons/fa';
import { FaSortUp as FaSortAsc } from 'react-icons/fa';
import {
CaretUpOutlined,
CaretDownOutlined,
ColumnHeightOutlined,
} from '@ant-design/icons';
import {
ColorFormatters,
getTextColorForBackground,
@@ -855,7 +857,7 @@ export class TableRenderer extends Component<
if (activeSortColumn !== key) {
return (
<FaSort
<ColumnHeightOutlined
onClick={() =>
this.sortData(key, visibleColKeys, pivotData, maxRowIndex)
}
@@ -863,7 +865,8 @@ export class TableRenderer extends Component<
);
}
const SortIcon = sortingOrder[key] === 'asc' ? FaSortAsc : FaSortDesc;
const SortIcon =
sortingOrder[key] === 'asc' ? CaretUpOutlined : CaretDownOutlined;
return (
<SortIcon
onClick={() =>
@@ -873,7 +876,9 @@ export class TableRenderer extends Component<
);
};
const headerCellFormattedValue =
dateFormatters?.[attrName]?.(convertToNumberIfNumeric(colKey[attrIdx])) ?? colKey[attrIdx];
dateFormatters?.[attrName]?.(
convertToNumberIfNumeric(colKey[attrIdx]),
) ?? colKey[attrIdx];
const { backgroundColor, color } = getCellColor(
[attrName],
headerCellFormattedValue,