fix the description renderer in team and user import (#19492)

This commit is contained in:
Ashish Gupta 2025-01-23 19:54:41 +05:30 committed by GitHub
parent 4059df8843
commit 6c381b1ce1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 16 deletions

View File

@ -19,6 +19,7 @@ import { ReactComponent as FailBadgeIcon } from '../../../../assets/svg/fail-bad
import { ReactComponent as SuccessBadgeIcon } from '../../../../assets/svg/success-badge.svg'; import { ReactComponent as SuccessBadgeIcon } from '../../../../assets/svg/success-badge.svg';
import { Status } from '../../../../generated/type/csvImportResult'; import { Status } from '../../../../generated/type/csvImportResult';
import { parseCSV } from '../../../../utils/EntityImport/EntityImportUtils'; import { parseCSV } from '../../../../utils/EntityImport/EntityImportUtils';
import RichTextEditorPreviewerV1 from '../../../common/RichTextEditor/RichTextEditorPreviewerV1';
import Table from '../../../common/Table/Table'; import Table from '../../../common/Table/Table';
import { import {
TeamCSVRecord, TeamCSVRecord,
@ -102,14 +103,12 @@ export const TeamImportResult = ({
width: 300, width: 300,
render: (description: TeamCSVRecord['description']) => { render: (description: TeamCSVRecord['description']) => {
return ( return (
<Typography.Paragraph <RichTextEditorPreviewerV1
ellipsis={{ className="w-80"
rows: 2, enableSeeMoreVariant={false}
}} markdown={description}
style={{ width: 300 }} reducePreviewLineClass="max-one-line"
title={description}> />
{description || '--'}
</Typography.Paragraph>
); );
}, },
}, },

View File

@ -19,6 +19,7 @@ import { ReactComponent as FailBadgeIcon } from '../../../../assets/svg/fail-bad
import { ReactComponent as SuccessBadgeIcon } from '../../../../assets/svg/success-badge.svg'; import { ReactComponent as SuccessBadgeIcon } from '../../../../assets/svg/success-badge.svg';
import { Status } from '../../../../generated/type/csvImportResult'; import { Status } from '../../../../generated/type/csvImportResult';
import { parseCSV } from '../../../../utils/EntityImport/EntityImportUtils'; import { parseCSV } from '../../../../utils/EntityImport/EntityImportUtils';
import RichTextEditorPreviewerV1 from '../../../common/RichTextEditor/RichTextEditorPreviewerV1';
import Table from '../../../common/Table/Table'; import Table from '../../../common/Table/Table';
import { import {
UserCSVRecord, UserCSVRecord,
@ -102,14 +103,12 @@ export const UserImportResult = ({
width: 300, width: 300,
render: (description: string) => { render: (description: string) => {
return ( return (
<Typography.Paragraph <RichTextEditorPreviewerV1
ellipsis={{ className="w-80"
rows: 2, enableSeeMoreVariant={false}
}} markdown={description}
style={{ width: 300 }} reducePreviewLineClass="max-one-line"
title={description}> />
{description || '--'}
</Typography.Paragraph>
); );
}, },
}, },