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