From 7cd5369a8ee18806bbb0ec720360edb228a29d22 Mon Sep 17 00:00:00 2001
From: Harshit Shah
Date: Thu, 7 May 2026 19:52:22 +0530
Subject: [PATCH 1/9] refactor(DimensionalityTab): migrate table to core-ui
Table component
Replace Ant Design Table with react-aria-based Table from
@openmetadata/ui-core-components. Removes antd ColumnsType,
HelpCircle icon, and Tooltip imports in favour of Table.Head
tooltip prop. Impact-score tooltip now rendered natively by
Table.Head. Trans type error fixed via ComponentType cast.
Select dimension dropdown styled to match date picker height
(h-8/32px) and font-size xs.
Refs: https://github.com/open-metadata/openmetadata-collate/issues/3837
---
.../DimensionalityTab/DimensionalityTab.tsx | 169 +++++++++---------
1 file changed, 80 insertions(+), 89 deletions(-)
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/DimensionalityTab/DimensionalityTab.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/DimensionalityTab/DimensionalityTab.tsx
index 93d4d9889d24..cc540b4e48e4 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/DimensionalityTab/DimensionalityTab.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/DimensionalityTab/DimensionalityTab.tsx
@@ -10,13 +10,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { Select, Skeleton, Tooltip } from '@openmetadata/ui-core-components';
-import { HelpCircle } from '@untitledui/icons';
-import { ColumnsType } from 'antd/lib/table';
+import { Select, Skeleton, Table } from '@openmetadata/ui-core-components';
import { format } from 'date-fns';
import { isEmpty, split, toLower } from 'lodash';
import { DateRangeObject } from 'Models';
-import { useEffect, useMemo, useState } from 'react';
+import { type ComponentType, useEffect, useMemo, useState } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
import {
@@ -43,11 +41,15 @@ import NoDataPlaceholderNew from '../../../common/ErrorWithPlaceholder/NoDataPla
import MuiDatePickerMenu from '../../../common/MuiDatePickerMenu/MuiDatePickerMenu';
import StatusBadge from '../../../common/StatusBadge/StatusBadge.component';
import { StatusType } from '../../../common/StatusBadge/StatusBadge.interface';
-import Table from '../../../common/Table/Table';
import { ProfilerTabPath } from '../../../Database/Profiler/ProfilerDashboard/profilerDashboard.interface';
import DimensionalityHeatmap from './DimensionalityHeatmap/DimensionalityHeatmap.component';
import { DimensionResultWithTimestamp } from './DimensionalityHeatmap/DimensionalityHeatmap.interface';
+const TransComponent = Trans as ComponentType<{
+ i18nKey: string;
+ components: Record;
+}>;
+
const DimensionalityTab = () => {
const { t } = useTranslation();
const { dimensionKey } = useRequiredParams<{ dimensionKey?: string }>();
@@ -176,83 +178,15 @@ const DimensionalityTab = () => {
});
}, [dimensionData]);
- const tableColumns: ColumnsType<{
- key: string;
- dimensionValue: string;
- result: DimensionResultWithTimestamp;
- }> = [
- {
- title: t('label.status'),
- dataIndex: 'result',
- key: 'status',
- width: 120,
- render: (result: DimensionResultWithTimestamp) => {
- return result?.testCaseStatus ? (
-
- ) : (
- --
- );
- },
- },
+ const dimensionTableColumns = [
+ { id: 'status', label: t('label.status') },
{
- title: (
-
- {t('label.impact-score')}
-
- {t('message.impact-score-helper')}
-
- }>
-
-
-
- ),
- dataIndex: 'result',
- key: 'impactScore',
- width: 120,
- render: (result: DimensionResultWithTimestamp) => {
- return (
- {result?.impactScore ?? '--'}
- );
- },
- },
- {
- title: t('label.dimension'),
- dataIndex: 'dimensionValue',
- key: 'dimensionValue',
- width: 200,
- render: (dimensionValue: string, record) => {
- return (
-
- {dimensionValue}
-
- );
- },
- },
- {
- title: t('label.last-run'),
- dataIndex: 'result',
- key: 'lastRun',
- width: 200,
- render: (result: DimensionResultWithTimestamp) => {
- return result?.timestamp ? (
-
- ) : (
- --
- );
- },
+ id: 'impactScore',
+ label: t('label.impact-score'),
+ tooltip: t('message.impact-score-helper'),
},
+ { id: 'dimensionValue', label: t('label.dimension') },
+ { id: 'lastRun', label: t('label.last-run') },
];
const noDataPlaceholder = useMemo(() => {
@@ -267,7 +201,7 @@ const DimensionalityTab = () => {
return (
- ,
1: ,
@@ -287,8 +221,9 @@ const DimensionalityTab = () => {
{`${t('label.select-dimension')}:`}