mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-29 20:30:19 +00:00
fix loader and header issue (#20651)
This commit is contained in:
parent
a59295a619
commit
f8f6634809
@ -112,7 +112,7 @@ const ActivityFeedListV1New = ({
|
||||
isFullWidth,
|
||||
]
|
||||
);
|
||||
if (isLoading && isForFeedTab) {
|
||||
if (isLoading) {
|
||||
return <Loader />;
|
||||
}
|
||||
|
||||
|
@ -66,9 +66,9 @@
|
||||
.task-feed-card-v1-new {
|
||||
.header-link {
|
||||
word-wrap: break-word;
|
||||
white-space: normal;
|
||||
color: @blue-9;
|
||||
font-weight: 600;
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
.feeds-widget-container {
|
||||
|
@ -13,6 +13,7 @@
|
||||
import { Button, Dropdown, Menu, Segmented, Space, Typography } from 'antd';
|
||||
import { AxiosError } from 'axios';
|
||||
import classNames from 'classnames';
|
||||
import { isEmpty } from 'lodash';
|
||||
import {
|
||||
default as React,
|
||||
RefObject,
|
||||
@ -115,6 +116,7 @@ export const ActivityFeedTab = ({
|
||||
loading: false,
|
||||
data: FEED_COUNT_INITIAL_DATA,
|
||||
});
|
||||
const [isFirstLoad, setIsFirstLoad] = useState<boolean>(true);
|
||||
|
||||
const {
|
||||
selectedThread,
|
||||
@ -150,8 +152,12 @@ export const ActivityFeedTab = ({
|
||||
() => activeTab === ActivityFeedTabs.MENTIONS,
|
||||
[activeTab]
|
||||
);
|
||||
useEffect(() => {
|
||||
setIsFirstLoad(true);
|
||||
}, [subTab]);
|
||||
|
||||
const handleTabChange = (subTab: string) => {
|
||||
setIsFirstLoad(true);
|
||||
history.push(
|
||||
entityUtilClassBase.getEntityLink(
|
||||
entityType,
|
||||
@ -256,6 +262,7 @@ export const ActivityFeedTab = ({
|
||||
|
||||
const handleFeedFetchFromFeedList = useCallback(
|
||||
(after?: string) => {
|
||||
setIsFirstLoad(false);
|
||||
getFeedData(feedFilter, after, threadType, entityType, fqn, taskFilter);
|
||||
},
|
||||
[threadType, feedFilter, entityType, fqn, taskFilter, getFeedData]
|
||||
@ -611,14 +618,14 @@ export const ActivityFeedTab = ({
|
||||
handlePanelResize={handlePanelResize}
|
||||
isForFeedTab={false}
|
||||
isFullWidth={isFullWidth}
|
||||
isLoading={loading}
|
||||
isLoading={isFirstLoad && loading}
|
||||
selectedThread={selectedThread}
|
||||
showThread={false}
|
||||
onAfterClose={handleAfterTaskClose}
|
||||
onFeedClick={handleFeedClick}
|
||||
/>
|
||||
{loader}
|
||||
{entityThread.length > 0 && (
|
||||
{!isFirstLoad && loader}
|
||||
{!isEmpty(entityThread) && !loading && (
|
||||
<div
|
||||
className="w-full"
|
||||
data-testid="observer-element"
|
||||
|
@ -214,7 +214,6 @@
|
||||
|
||||
.header-link {
|
||||
word-wrap: break-word;
|
||||
white-space: normal;
|
||||
font-weight: 600;
|
||||
|
||||
.ant-typography,
|
||||
|
@ -327,12 +327,12 @@ export const TaskTabNew = ({
|
||||
{taskColumnName}
|
||||
|
||||
<Typography.Text
|
||||
className="break-all text-sm entity-link header-link"
|
||||
className="break-all text-sm entity-link header-link whitespace-normal"
|
||||
data-testid="entity-link">
|
||||
{getNameFromFQN(entityFQN)}
|
||||
</Typography.Text>
|
||||
|
||||
<Typography.Text className="p-l-xss entity-type header-link">{`(${entityType})`}</Typography.Text>
|
||||
<Typography.Text className="p-l-xss entity-type header-link whitespace-normal">{`(${entityType})`}</Typography.Text>
|
||||
</Button>
|
||||
</EntityPopOverCard>
|
||||
) : null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user