minor: domain owner edit icon and display of announcement message (#19593)

(cherry picked from commit 060ab6e6acc20b2faf775058149aa49eff028d2f)
This commit is contained in:
Pranita Fulsundar 2025-01-29 20:10:06 +05:30 committed by Ashish Gupta
parent 459e1daa69
commit 6b039ad76d
2 changed files with 33 additions and 26 deletions

View File

@ -197,12 +197,16 @@ const DocumentationTab = ({
<Typography.Text className="right-panel-label">
{t('label.owner-plural')}
</Typography.Text>
{editOwnerPermission && domain.owners && (
{editOwnerPermission &&
domain.owners &&
domain.owners.length > 0 && (
<UserTeamSelectableList
hasPermission
multiple={{ team: false, user: true }}
owner={domain.owners}
onUpdate={(updatedUser) => handleUpdatedOwner(updatedUser)}>
onUpdate={(updatedUser) =>
handleUpdatedOwner(updatedUser)
}>
<Tooltip
title={t('label.edit-entity', {
entity: t('label.owner-plural'),
@ -210,7 +214,9 @@ const DocumentationTab = ({
<Button
className="cursor-pointer flex-center m-l-xss"
data-testid="edit-owner"
icon={<EditIcon color={DE_ACTIVE_COLOR} width="14px" />}
icon={
<EditIcon color={DE_ACTIVE_COLOR} width="14px" />
}
size="small"
type="text"
/>

View File

@ -15,6 +15,7 @@ import { Card, Space, Typography } from 'antd';
import React, { FC, useMemo } from 'react';
import { ReactComponent as AnnouncementIcon } from '../../../../assets/svg/announcements-v1.svg';
import { Thread } from '../../../../generated/entity/feed/thread';
import RichTextEditorPreviewerV1 from '../../RichTextEditor/RichTextEditorPreviewerV1';
import './AnnouncementCard.less';
interface Props {
@ -50,12 +51,12 @@ const AnnouncementCard: FC<Props> = ({ onClick, announcement }) => {
</Typography.Paragraph>
</Space>
{message && (
<Typography.Paragraph
ellipsis
className="text-grey-muted m-0 text-xs"
data-testid="announcement-message">
{message}
</Typography.Paragraph>
<RichTextEditorPreviewerV1
className="text-grey-muted m-0 text-xss"
data-testid="announcement-message"
markdown={message}
reducePreviewLineClass="max-one-line"
/>
)}
</Card>
);