onThreadIdSelect(feed.id)}> - Reply -
{ + onThreadIdSelect(feed.id); + }}> + Reply +
+ {selctedThreadId === feed.id ? ( + = ({
withSidePanel = false,
isEntityFeed = false,
postFeedHandler,
+ entityName,
}) => {
const { updatedFeedList, relativeDays } =
getFeedListWithRelativeDays(feedList);
@@ -256,11 +259,17 @@ const ActivityFeedList: FC
- Thread on {entityField} + {noun ? noun : 'Conversation'} on{' '} + {entityField}
FeedCards
); + return jest.fn().mockReturnValue(Conversations
); +}); +jest.mock('../ActivityFeed/ActivityFeedEditor/ActivityFeedEditor.tsx', () => { + return jest.fn().mockReturnValue(FeedEditor
); }); jest.mock('../../utils/CommonUtils', () => ({ diff --git a/openmetadata-ui/src/main/resources/ui/src/components/EntityTable/EntityTable.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/EntityTable/EntityTable.component.tsx index a0b930e211a..f87e0db3570 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/EntityTable/EntityTable.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/EntityTable/EntityTable.component.tsx @@ -12,12 +12,13 @@ */ import classNames from 'classnames'; -import { cloneDeep, isUndefined, lowerCase } from 'lodash'; +import { cloneDeep, isNil, isUndefined, lowerCase } from 'lodash'; import { EntityFieldThreads, EntityTags } from 'Models'; import React, { Fragment, useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; import { useExpanded, useTable } from 'react-table'; import { getTableDetailsPath } from '../../constants/constants'; +import { EntityType } from '../../enums/entity.enum'; import { Column, ColumnJoins, @@ -32,7 +33,8 @@ import { getTableFQNFromColumnFQN, } from '../../utils/CommonUtils'; import { getFieldThreadElement } from '../../utils/FeedElementUtils'; -import SVGIcons from '../../utils/SvgUtils'; +import { getThreadValue } from '../../utils/FeedUtils'; +import SVGIcons, { Icons } from '../../utils/SvgUtils'; import { getConstraintIcon, getDataTypeString, @@ -54,9 +56,11 @@ type Props = { columnName: string; hasEditAccess: boolean; isReadOnly?: boolean; + entityFqn?: string; entityFieldThreads?: EntityFieldThreads[]; onUpdate?: (columns: Table['columns']) => void; onThreadLinkSelect?: (value: string) => void; + onEntityFieldSelect?: (value: string) => void; }; const EntityTable = ({ @@ -69,6 +73,8 @@ const EntityTable = ({ entityFieldThreads, isReadOnly = false, onThreadLinkSelect, + onEntityFieldSelect, + entityFqn, }: Props) => { const columns = React.useMemo( () => [ @@ -465,7 +471,11 @@ const EntityTable = ({ cell.row.cells[0].value, 'tags', entityFieldThreads as EntityFieldThreads[], - onThreadLinkSelect + onThreadLinkSelect, + EntityType.TABLE, + entityFqn, + `columns/${cell.row.cells[0].value}/tags`, + Boolean(cell.value.length) )} )} @@ -485,39 +495,70 @@ const EntityTable = ({ /> ) : ( - No description added + No description added{' '} )} - {getFieldThreadElement( - cell.row.cells[0].value, - 'description', - entityFieldThreads as EntityFieldThreads[], - onThreadLinkSelect - )} {!isReadOnly ? ( -- onThreadLinkSelect?.(descriptionThread.entityLink) - }> - {descriptionThread.count}{' '} - threads -
- ) : null} {isEdit && (
+ onThreadLinkSelect?.(descriptionThread.entityLink)
+ }>
+
+
+ onThreadLinkSelect?.(
+ getEntityFeedLink(entityType, entityFqn, 'description')
+ )
+ }>
+
onThreadLinkSelect?.(tagThread.entityLink)}>
- {tagThread.count} threads
+
+
+ onThreadLinkSelect?.(
+ getEntityFeedLink(entityType, entityFqn, 'tags')
+ )
+ }>
+
{
e.preventDefault();
e.stopPropagation();
onThreadLinkSelect?.(threadValue.entityLink);
}}>
- {threadValue.count} threads
+
+
{
+ e.preventDefault();
+ e.stopPropagation();
+ onThreadLinkSelect?.(
+ getEntityFeedLink(entityType, entityFqn, entityField)
+ );
+ }}>
+
{children}
: {children}; +> = ({ children, ...props }) =>{children}
; + +export const Span: FC< + HTMLAttributes