From fb838a8ee7c63bc9c3d1fd7c86e13436c83eaad5 Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Tue, 18 Apr 2023 22:50:00 +0530 Subject: [PATCH] Supported Markdown preview in the test case description (#11112) --- .../ProfilerDashboard/component/DataQualityTab.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/DataQualityTab.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/DataQualityTab.tsx index 460da618ae7..e815a1c3e8a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/DataQualityTab.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/DataQualityTab.tsx @@ -22,11 +22,15 @@ import { getEntityName } from 'utils/EntityUtils'; import { ReactComponent as IconDelete } from '../../../assets/svg/ic-delete.svg'; import { ReactComponent as IconEdit } from '../../../assets/svg/ic-edit.svg'; +import RichTextEditorPreviewer from 'components/common/rich-text-editor/RichTextEditorPreviewer'; import { usePermissionProvider } from 'components/PermissionProvider/PermissionProvider'; import { ResourceEntity } from 'components/PermissionProvider/PermissionProvider.interface'; import { Operation } from 'generated/entity/policies/policy'; import { checkPermission } from 'utils/PermissionsUtils'; -import { getTableTabPath } from '../../../constants/constants'; +import { + getTableTabPath, + NO_DATA_PLACEHOLDER, +} from '../../../constants/constants'; import { NO_PERMISSION_FOR_ACTION } from '../../../constants/HelperTextUtil'; import { TestCase, TestCaseResult } from '../../../generated/tests/testCase'; import { getNameFromFQN } from '../../../utils/CommonUtils'; @@ -119,7 +123,12 @@ const DataQualityTab: React.FC = ({ dataIndex: 'description', key: 'description', width: 350, - render: (text) => (isEmpty(text) ? '--' : text), + render: (text) => + !isEmpty(text) ? ( + + ) : ( + NO_DATA_PLACEHOLDER + ), }, { title: t('label.test-suite'),