This is an automated email from the ASF dual-hosted git repository.

enzomartellucci pushed a commit to branch enxdev/refactor-antd5-icons
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/enxdev/refactor-antd5-icons by 
this push:
     new 54f62ea8d2 refactor(icons): Replaces custom icons (table, 
table-chart-title, dataset-physical) with antd5 icons
54f62ea8d2 is described below

commit 54f62ea8d242cf61809917207e273d4dbfff46f0
Author: Enzo Martellucci <[email protected]>
AuthorDate: Sat Feb 1 10:06:25 2025 +0100

    refactor(icons): Replaces custom icons (table, table-chart-title, 
dataset-physical) with antd5 icons
---
 superset-frontend/src/components/Icons/index.tsx                 | 4 ----
 .../src/components/Label/reusable/DatasetTypeLabel.tsx           | 2 +-
 superset-frontend/src/components/MetadataBar/ContentConfig.tsx   | 2 +-
 superset-frontend/src/components/TableSelector/index.tsx         | 2 +-
 .../src/explore/components/controls/DatasourceControl/index.jsx  | 3 ++-
 .../src/explore/components/controls/VizTypeControl/VizTile.tsx   | 9 +++++++--
 .../src/explore/components/controls/VizTypeControl/constants.tsx | 2 +-
 .../features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx   | 2 +-
 8 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/superset-frontend/src/components/Icons/index.tsx 
b/superset-frontend/src/components/Icons/index.tsx
index 9cd0e3602f..ffaae91447 100644
--- a/superset-frontend/src/components/Icons/index.tsx
+++ b/superset-frontend/src/components/Icons/index.tsx
@@ -144,7 +144,6 @@ const IconFileNames = [
   'sort_asc',
   'sort_desc',
   'sort',
-  'table-chart-tile',
   'triangle_change',
   'triangle_down',
   'triangle_up',
@@ -160,9 +159,6 @@ const IconFileNames = [
   'undo',
   'redo',
   // to remove
-  'database',
-  'table',
-  'tag',
 ];
 
 const iconOverrides: Record<string, FC<IconType>> = {};
diff --git 
a/superset-frontend/src/components/Label/reusable/DatasetTypeLabel.tsx 
b/superset-frontend/src/components/Label/reusable/DatasetTypeLabel.tsx
index 7379665583..d32820d627 100644
--- a/superset-frontend/src/components/Label/reusable/DatasetTypeLabel.tsx
+++ b/superset-frontend/src/components/Label/reusable/DatasetTypeLabel.tsx
@@ -32,7 +32,7 @@ const DatasetTypeLabel: React.FC<DatasetTypeLabelProps> = ({ 
datasetType }) => {
     datasetType === 'physical' ? t('Physical') : t('Virtual');
   const icon =
     datasetType === 'physical' ? (
-      <Icons.Table iconSize={SIZE} />
+      <Icons.TableOutlined iconSize={SIZE} />
     ) : (
       <Icons.ConsoleSqlOutlined iconSize={SIZE} />
     );
diff --git a/superset-frontend/src/components/MetadataBar/ContentConfig.tsx 
b/superset-frontend/src/components/MetadataBar/ContentConfig.tsx
index de23e654a7..52a701afdf 100644
--- a/superset-frontend/src/components/MetadataBar/ContentConfig.tsx
+++ b/superset-frontend/src/components/MetadataBar/ContentConfig.tsx
@@ -113,7 +113,7 @@ const config = (contentType: ContentType) => {
 
     case MetadataType.Table:
       return {
-        icon: Icons.Table,
+        icon: Icons.TableOutlined,
         title: contentType.title,
         tooltip: contentType.title,
       };
diff --git a/superset-frontend/src/components/TableSelector/index.tsx 
b/superset-frontend/src/components/TableSelector/index.tsx
index 940f42cb3d..77fc715572 100644
--- a/superset-frontend/src/components/TableSelector/index.tsx
+++ b/superset-frontend/src/components/TableSelector/index.tsx
@@ -127,7 +127,7 @@ export const TableOption = ({ table }: { table: Table }) => 
{
       {type === 'view' ? (
         <Icons.Eye iconSize="m" />
       ) : (
-        <Icons.Table iconSize="m" />
+        <Icons.DeleteOutlined iconSize="m" />
       )}
       {extra?.certification && (
         <CertifiedBadge
diff --git 
a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx 
b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
index 4e5063b1e4..88af3d76ed 100644
--- 
a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
+++ 
b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
@@ -114,6 +114,7 @@ const Styles = styled.div`
     overflow: hidden;
   }
   .datasource-svg {
+    color: ${({ theme }) => theme.colors.grayscale.base};
     margin-right: ${({ theme }) => 2 * theme.gridUnit}px;
     flex: none;
   }
@@ -140,7 +141,7 @@ export const datasourceIconLookup = {
   [DatasourceType.Query]: (
     <Icons.ConsoleSqlOutlined className="datasource-svg" />
   ),
-  [DatasourceType.Table]: <Icons.DatasetPhysical className="datasource-svg" />,
+  [DatasourceType.Table]: <Icons.TableOutlined  className="datasource-svg" />,
 };
 
 // Render title for datasource with tooltip only if text is longer than 
VISIBLE_TITLE_LENGTH
diff --git 
a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx 
b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx
index 83bb8744ec..85bf2fd5f0 100644
--- 
a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx
+++ 
b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx
@@ -96,7 +96,6 @@ export const VizTile = ({
           white-space: nowrap;
           overflow: hidden;
           max-width: fit-content;
-
           ${!isActive &&
           css`
             flex-shrink: 0;
@@ -123,7 +122,13 @@ export const VizTile = ({
           `}
         `}
       >
-        {vizMeta.icon}{' '}
+        <span 
+        css={
+          css`
+           padding:0px ${theme.gridUnit}px;
+          `
+        }
+        >{vizMeta.icon}</span>
         <span
           css={css`
             overflow: hidden;
diff --git 
a/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx
 
b/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx
index de8e5c7339..1799b800c5 100644
--- 
a/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx
+++ 
b/superset-frontend/src/explore/components/controls/VizTypeControl/constants.tsx
@@ -30,7 +30,7 @@ export const FEATURED_CHARTS: VizMeta[] = [
     icon: <Icons.BarChartTile />,
   },
   { name: VizType.Area, icon: <Icons.AreaChartTile /> },
-  { name: VizType.Table, icon: <Icons.TableChartTile /> },
+  { name: VizType.Table, icon: <Icons.TableOutlined iconSize='l' /> },
   {
     name: VizType.BigNumberTotal,
     icon: <Icons.BigNumberChartTile />,
diff --git 
a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx
 
b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx
index 2cf8c9af95..69a828037a 100644
--- 
a/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx
+++ 
b/superset-frontend/src/features/datasets/AddDataset/DatasetPanel/DatasetPanel.tsx
@@ -334,7 +334,7 @@ const DatasetPanel = ({
             title={tableName || ''}
           >
             {tableName && (
-              <Icons.Table iconColor={theme.colors.grayscale.base} />
+              <Icons.DatasetPanel iconColor={theme.colors.grayscale.base} />
             )}
             {tableName}
           </StyledHeader>

Reply via email to