diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedListV1.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedListV1.component.tsx index 6b9b3a5e417..fe376b4d854 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedListV1.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedList/ActivityFeedListV1.component.tsx @@ -12,7 +12,7 @@ */ import { Typography } from 'antd'; import { isEmpty } from 'lodash'; -import React, { ReactNode, useEffect, useState } from 'react'; +import React, { ReactNode, useEffect, useMemo, useState } from 'react'; import { ReactComponent as FeedEmptyIcon } from '../../../assets/svg/activity-feed-no-data-placeholder.svg'; import ErrorPlaceHolder from '../../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; import { ERROR_PLACEHOLDER_TYPE, SIZE } from '../../../enums/common.enum'; @@ -68,28 +68,9 @@ const ActivityFeedListV1 = ({ } }, [entityThread, selectedThread, onFeedClick]); - if (isLoading) { - return ; - } - - return isEmpty(entityThread) ? ( -
- } - type={ERROR_PLACEHOLDER_TYPE.CUSTOM}> - - {emptyPlaceholderText} - - -
- ) : ( -
- {entityThread.map((feed) => ( + const feeds = useMemo( + () => + entityThread.map((feed) => ( - ))} + )), + [ + entityThread, + activeFeedId, + componentsVisibility, + hidePopover, + isForFeedTab, + showThread, + ] + ); + + if (isLoading) { + return ; + } + + if (isEmpty(entityThread)) { + return ( +
+ } + type={ERROR_PLACEHOLDER_TYPE.CUSTOM}> + + {emptyPlaceholderText} + + +
+ ); + } + + return ( +
+ {feeds}
); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx index 9ada99cf758..cb25568b3dd 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx @@ -74,6 +74,11 @@ import { ActivityFeedTabs, } from './ActivityFeedTab.interface'; +const componentsVisibility = { + showThreadIcon: false, + showRepliesContainer: true, +}; + export const ActivityFeedTab = ({ fqn, owners = [], @@ -429,10 +434,7 @@ export const ActivityFeedTab = ({ ( + + } + values={{ + explored: t('message.have-not-explored-yet'), + }} + /> + ), + [] + ); + return (
- } - values={{ - explored: t('message.have-not-explored-yet'), - }} - /> - } + emptyPlaceholderText={emptyPlaceholderText} feedList={isTourOpen ? mockFeedData : threads} hidePopover={isEditView} isLoading={loading && !isTourOpen} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/Widgets/FeedsWidget/FeedsWidget.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MyData/Widgets/FeedsWidget/FeedsWidget.test.tsx index c46b6589a8b..22958554893 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/Widgets/FeedsWidget/FeedsWidget.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/Widgets/FeedsWidget/FeedsWidget.test.tsx @@ -12,7 +12,7 @@ */ import { act, fireEvent, render, screen } from '@testing-library/react'; import React from 'react'; -import { PAGE_SIZE_LARGE } from '../../../../constants/constants'; +import { PAGE_SIZE_MEDIUM } from '../../../../constants/constants'; import { useApplicationStore } from '../../../../hooks/useApplicationStore'; import { mockUserData } from '../../../Settings/Users/mocks/User.mocks'; import FeedsWidget from './FeedsWidget.component'; @@ -134,7 +134,7 @@ describe('FeedsWidget', () => { undefined, undefined, undefined, - PAGE_SIZE_LARGE + PAGE_SIZE_MEDIUM ); }); @@ -154,7 +154,7 @@ describe('FeedsWidget', () => { undefined, undefined, undefined, - PAGE_SIZE_LARGE + PAGE_SIZE_MEDIUM ); }); diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/app.less b/openmetadata-ui/src/main/resources/ui/src/styles/app.less index 634ee09f7e4..10564af2cfc 100644 --- a/openmetadata-ui/src/main/resources/ui/src/styles/app.less +++ b/openmetadata-ui/src/main/resources/ui/src/styles/app.less @@ -154,6 +154,9 @@ a[href].link-text-grey, .text-underline { text-decoration: underline; } +.text-line-through { + text-decoration: line-through; +} // image property diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx index 24d2e1df17e..8606238f99f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/EntityVersionUtils.tsx @@ -137,33 +137,31 @@ export const getDiffValue = (oldValue: string, newValue: string) => { export const getAddedDiffElement = (text: string) => { return ( - {text} - + ); }; export const getRemovedDiffElement = (text: string) => { return ( - {text} - + ); }; export const getNormalDiffElement = (text: string) => { return ( - + {text} - + ); }; @@ -172,10 +170,18 @@ export const getTextDiff = ( newText: string, latestText?: string ) => { + const imagePlaceholder = 'data:image'; if (isEmpty(oldText) && isEmpty(newText)) { return latestText ?? ''; } + if ( + newText.includes(imagePlaceholder) || + oldText.includes(imagePlaceholder) + ) { + return newText; + } + const diffArr = diffWords(toString(oldText), toString(newText)); const result = diffArr.map((diff) => {