Skip to content

Commit

Permalink
minor: domain owner edit icon and display of announcement message (#1…
Browse files Browse the repository at this point in the history
…9593)

(cherry picked from commit 060ab6e)
  • Loading branch information
pranita09 authored and Ashish8689 committed Jan 29, 2025
1 parent 459e1da commit 6b039ad
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,26 +197,32 @@ const DocumentationTab = ({
<Typography.Text className="right-panel-label">
{t('label.owner-plural')}
</Typography.Text>
{editOwnerPermission && domain.owners && (
<UserTeamSelectableList
hasPermission
multiple={{ team: false, user: true }}
owner={domain.owners}
onUpdate={(updatedUser) => handleUpdatedOwner(updatedUser)}>
<Tooltip
title={t('label.edit-entity', {
entity: t('label.owner-plural'),
})}>
<Button
className="cursor-pointer flex-center m-l-xss"
data-testid="edit-owner"
icon={<EditIcon color={DE_ACTIVE_COLOR} width="14px" />}
size="small"
type="text"
/>
</Tooltip>
</UserTeamSelectableList>
)}
{editOwnerPermission &&
domain.owners &&
domain.owners.length > 0 && (
<UserTeamSelectableList
hasPermission
multiple={{ team: false, user: true }}
owner={domain.owners}
onUpdate={(updatedUser) =>
handleUpdatedOwner(updatedUser)
}>
<Tooltip
title={t('label.edit-entity', {
entity: t('label.owner-plural'),
})}>
<Button
className="cursor-pointer flex-center m-l-xss"
data-testid="edit-owner"
icon={
<EditIcon color={DE_ACTIVE_COLOR} width="14px" />
}
size="small"
type="text"
/>
</Tooltip>
</UserTeamSelectableList>
)}
</div>

<Space className="m-r-xss" size={4}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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>
);
Expand Down

0 comments on commit 6b039ad

Please sign in to comment.