From 21d36b0a791557138f8309a043b5d4fec868e55e Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Tue, 23 Sep 2025 23:41:58 +0530 Subject: [PATCH 1/2] 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) --- .../components/BlockEditor/Extensions/hashtag/HashList.tsx | 1 + .../BlockEditor/Extensions/hashtag/hashtagSuggestion.ts | 4 ++-- openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.tsx | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) 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}//${ From d080a584732af6c9afceb3d54505b22ab2128a1b Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Wed, 24 Sep 2025 00:41:55 +0530 Subject: [PATCH 2/2] MINOR: fix the add team error placeholder using wrong permission (#23522) * fix the team error placeholder using wrong permission * remvoe the unwanted file (cherry picked from commit 11226b2b3fffaeb6d73e85d9ff5e7eb60b03d192) --- .../Settings/Team/TeamDetails/TeamDetailsV1.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx index 9dbb1e3e92b..1c2286a46c9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx @@ -206,13 +206,6 @@ const TeamDetailsV1 = ({ navigate({ search: Qs.stringify({ activeTab: key }) }); }; - const { editUserPermission } = useMemo(() => { - return { - editUserPermission: - entityPermissions.EditAll || entityPermissions.EditUsers, - }; - }, [entityPermissions]); - /** * Take user id as input to find out the user data and set it for delete * @param id - user id @@ -620,12 +613,12 @@ const TeamDetailsV1 = ({ ); const teamsTableRender = useMemo(() => { - let addUserButtonTitle = editUserPermission + let addTeamButtonTitle = entityPermissions.Create ? t('label.add-entity', { entity: t('label.team') }) : t('message.no-permission-for-action'); if (isTeamDeleted) { - addUserButtonTitle = t( + addTeamButtonTitle = t( 'message.this-action-is-not-allowed-for-deleted-entities' ); } @@ -651,11 +644,11 @@ const TeamDetailsV1 = ({ }} /> - +