mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 11:09:14 +00:00
fix the redirect path of mention knowledge article and breadcrumb (#23519)
* fix the redirect path of mention knowledge article and breadcrumb * added data-test id here (cherry picked from commit 1d4aff0154775d7303c137e9a03c2f05ac0f3a18)
This commit is contained in:
parent
3ef60771a5
commit
21d36b0a79
@ -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}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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}//${
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user