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

View File

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