From b1d43397f99924b43f40ff7c5fa03671801602e4 Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Mon, 16 Oct 2023 23:28:37 +0530 Subject: [PATCH] ui: fixed glossary badge feedback (#13588) * ui: fixed glossary badge feedback * updated style for glossaryterm * updated style --- .../AsyncSelectList/AsyncSelectList.tsx | 15 +++++++++++-- .../EntityHeaderTitle.component.tsx | 2 +- .../AddGlossaryTermForm.interface.ts | 1 + .../GlossaryTermTab.component.tsx | 22 ++++++++++++++----- .../Glossary/GlossaryV1.component.tsx | 2 ++ .../Tag/TagsContainerV2/TagsContainerV2.tsx | 3 ++- .../TagsContainerV2/tags-container.style.less | 17 ++++++++++++++ 7 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/tags-container.style.less diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AsyncSelectList/AsyncSelectList.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AsyncSelectList/AsyncSelectList.tsx index 8a5847d46a5..abee03372ff 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AsyncSelectList/AsyncSelectList.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AsyncSelectList/AsyncSelectList.tsx @@ -20,7 +20,7 @@ import { Typography, } from 'antd'; import { AxiosError } from 'axios'; -import { debounce, isEmpty, isUndefined } from 'lodash'; +import { debounce, isEmpty, isUndefined, pick } from 'lodash'; import { CustomTagProps } from 'rc-select/lib/BaseSelect'; import React, { FC, useCallback, useMemo, useRef, useState } from 'react'; import Loader from '../../components/Loader/Loader'; @@ -153,6 +153,17 @@ const AsyncSelectList: FC = ({ const { label, onClose } = data; const tagLabel = getTagDisplay(label as string); + const tag = { + tagFQN: selectedTag?.data.fullyQualifiedName, + ...pick( + selectedTag?.data, + 'description', + 'displayName', + 'name', + 'style', + 'tagFQN' + ), + } as TagLabel; const onPreventMouseDown = (event: React.MouseEvent) => { event.preventDefault(); @@ -177,7 +188,7 @@ const AsyncSelectList: FC = ({ return ( ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeaderTitle/EntityHeaderTitle.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeaderTitle/EntityHeaderTitle.component.tsx index e4b605172b2..35fc94e0876 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeaderTitle/EntityHeaderTitle.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeaderTitle/EntityHeaderTitle.component.tsx @@ -67,7 +67,7 @@ const EntityHeaderTitle = ({ data-testid="entity-header-display-name" ellipsis={{ tooltip: true }} style={{ color: color ?? TEXT_COLOR }}> - {stringToHTML(displayName ?? name)} + {stringToHTML(displayName || name)} {openEntityInNewPage && ( - {name} - + + {record.style?.iconURL && ( + + )} + + {name} + + ); }, }, diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryV1.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryV1.component.tsx index c66e29c0c43..03407172664 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryV1.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryV1.component.tsx @@ -265,9 +265,11 @@ const GlossaryV1 = ({ reviewers, owner, relatedTerms, + style, } = formData || {}; newTermData.name = name; + newTermData.style = style; newTermData.displayName = displayName; newTermData.description = description; newTermData.synonyms = synonyms; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/TagsContainerV2.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/TagsContainerV2.tsx index 2f7ffa520a4..f95eb52defc 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/TagsContainerV2.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/TagsContainerV2.tsx @@ -45,6 +45,7 @@ import TagSelectForm from '../TagsSelectForm/TagsSelectForm.component'; import TagsV1 from '../TagsV1/TagsV1.component'; import TagsViewer from '../TagsViewer/TagsViewer'; import { LayoutType } from '../TagsViewer/TagsViewer.interface'; +import './tags-container.style.less'; import { TagsContainerV2Props } from './TagsContainerV2.interface'; const TagsContainerV2 = ({ @@ -404,7 +405,7 @@ const TagsContainerV2 = ({ return (
{header} {tagBody} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/tags-container.style.less b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/tags-container.style.less new file mode 100644 index 00000000000..3ebf0bd7483 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainerV2/tags-container.style.less @@ -0,0 +1,17 @@ +/* + * Copyright 2023 Collate. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +.tags-container { + .ant-select-selector { + padding-top: 4px; + } +}