diff --git a/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/HashList.tsx b/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/HashList.tsx index 5791a3b3c2c..52189c77728 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/HashList.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/HashList.tsx @@ -116,6 +116,7 @@ export default forwardRef< className={classNames('w-full cursor-pointer hashtag-item', { 'bg-grey-2': index === selectedIndex, })} + data-testid={`hash-mention-${item.label}`} direction="vertical" id={`hashtag-item-${item.id}`} key={item.id} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/hashtagSuggestion.ts b/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/hashtagSuggestion.ts index c96e44aa5d4..9456023a3c7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/hashtagSuggestion.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/Extensions/hashtag/hashtagSuggestion.ts @@ -17,8 +17,8 @@ import tippy, { Instance, Props } from 'tippy.js'; import { EntityType } from '../../../../enums/entity.enum'; import { SearchIndex } from '../../../../enums/search.enum'; import { searchData } from '../../../../rest/miscAPI'; -import { getEntityBreadcrumbs } from '../../../../utils/EntityUtils'; import { buildMentionLink } from '../../../../utils/FeedUtils'; +import searchClassBase from '../../../../utils/SearchClassBase'; import { ExtensionRef } from '../../BlockEditor.interface'; import HashList from './HashList'; @@ -45,7 +45,7 @@ export const hashtagSuggestion = () => ({ hit._source.fullyQualifiedName ?? '' ), type: hit._source.entityType, - breadcrumbs: getEntityBreadcrumbs( + breadcrumbs: searchClassBase.getEntityBreadcrumbs( hit._source, hit._source.entityType as EntityType, false diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.tsx index 1f76639b118..06039e054e4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.tsx @@ -149,6 +149,10 @@ export const buildMentionLink = (entityType: string, entityFqn: string) => { const classificationFqn = Fqn.split(entityFqn); return `${document.location.protocol}//${document.location.host}/tags/${classificationFqn[0]}`; + } else if (entityType === EntityType.KNOWLEDGE_PAGE) { + return `${document.location.protocol}//${ + document.location.host + }/knowledge-center/${getEncodedFqn(entityFqn)}`; } return `${document.location.protocol}//${