Skip to content

Commit 983aa01

Browse files
authored
fix(ui): Fixed persona card UI issue (#32956)
* fix(ui): Fixed persona card UI issue * lint fix
1 parent 2aeb927 commit 983aa01

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterAIContextPage/ContextCenterAIContextPage.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { getAllPersonas } from '../../../rest/PersonaAPI';
3333
import contextCenterClassBase from '../../../utils/ContextCenterClassBase';
3434
import { getEntityName } from '../../../utils/EntityNameUtils';
3535
import { getScopedRuleCount } from '../../../utils/PersonaAIContextUtils';
36+
import { stripMarkdown } from '../../../utils/StringUtils';
3637
import { showErrorToast } from '../../../utils/ToastUtils';
3738

3839
const PERSONA_PAGE_SIZE = 50;
@@ -84,7 +85,7 @@ const ContextCenterAIContextPage = () => {
8485

8586
return (
8687
<Card
87-
className="tw:cursor-pointer tw:px-5 tw:py-4.5 tw:shadow-xs tw:transition tw:hover:bg-primary_hover"
88+
className="tw:cursor-pointer tw:px-5 tw:py-4.5 tw:shadow-xs tw:transition tw:hover:bg-primary_hover tw:mb-3"
8889
data-testid={`ai-context-persona-${persona.name}`}
8990
key={persona.id}
9091
onClick={() =>
@@ -102,8 +103,9 @@ const ContextCenterAIContextPage = () => {
102103
weight="semibold">
103104
{getEntityName(persona)}
104105
</Typography>
105-
<Typography className="tw:truncate tw:text-tertiary" size="text-sm">
106-
{persona.description || t('label.no-description')}
106+
<Typography ellipsis className="tw:text-tertiary" size="text-sm">
107+
{stripMarkdown(persona.description || '') ||
108+
t('label.no-description')}
107109
</Typography>
108110
</Box>
109111
<Box align="center" className="tw:shrink-0" gap={2}>
@@ -136,7 +138,7 @@ const ContextCenterAIContextPage = () => {
136138
title={t('label.ai-context')}
137139
/>
138140
</div>
139-
<div className="context-center-content-section tw:flex tw:flex-col tw:flex-1 tw:min-h-0 tw:gap-3 tw:overflow-y-auto tw:px-5 tw:pb-5">
141+
<div className="context-center-content-section tw:flex-1 tw:min-h-0 tw:overflow-y-auto tw:px-5 tw:pb-5">
140142
{isLoading && <Loader />}
141143
{!isLoading && personas.length === 0 && (
142144
<EmptyPlaceholder

0 commit comments

Comments
 (0)