mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 08:50:18 +00:00
fix(ui): hide description tooltip for tag edit mode (#19463)
* fix: remove tooltip for tag edit mode * refactor: remove comments * fix: tooltip logic for non edit mode * fix: hide tooltip for tag edit mode * refactor: remove prop for TagsV1 component * style: move cursor-pointer property to Tag * fix: unit test failure * fix: mock implementations for unit test * revert test case changes
This commit is contained in:
parent
e003a5f9ed
commit
c817785bb1
@ -41,6 +41,7 @@ const TagsV1 = ({
|
||||
tooltipOverride,
|
||||
tagType,
|
||||
size,
|
||||
isEditTags,
|
||||
}: TagsV1Props) => {
|
||||
const color = useMemo(
|
||||
() => (isVersionPage ? undefined : tag.style?.color),
|
||||
@ -144,7 +145,8 @@ const TagsV1 = ({
|
||||
),
|
||||
},
|
||||
'tag-chip tag-chip-content',
|
||||
size
|
||||
size,
|
||||
'cursor-pointer'
|
||||
)}
|
||||
data-testid="tags"
|
||||
style={
|
||||
@ -185,14 +187,19 @@ const TagsV1 = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
className="cursor-pointer"
|
||||
mouseEnterDelay={0.5}
|
||||
placement="bottomLeft"
|
||||
title={tooltipOverride ?? getTagTooltip(tag.tagFQN, tag.description)}
|
||||
trigger="hover">
|
||||
{tagChip}
|
||||
</Tooltip>
|
||||
<>
|
||||
{isEditTags ? (
|
||||
tagChip
|
||||
) : (
|
||||
<Tooltip
|
||||
mouseEnterDelay={0.5}
|
||||
placement="bottomLeft"
|
||||
title={tooltipOverride ?? getTagTooltip(tag.tagFQN, tag.description)}
|
||||
trigger="hover">
|
||||
{tagChip}
|
||||
</Tooltip>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -31,4 +31,5 @@ export type TagsV1Props = {
|
||||
tooltipOverride?: string;
|
||||
tagType?: TagSource;
|
||||
size?: SelectProps['size'];
|
||||
isEditTags?: boolean;
|
||||
};
|
||||
|
@ -248,6 +248,7 @@ const AsyncSelectList: FC<AsyncSelectListProps & SelectProps> = ({
|
||||
|
||||
return (
|
||||
<TagsV1
|
||||
isEditTags
|
||||
size={props.size}
|
||||
startWith={TAG_START_WITH.SOURCE_ICON}
|
||||
tag={tag}
|
||||
|
@ -173,6 +173,7 @@ const TreeAsyncSelectList: FC<Omit<AsyncSelectListProps, 'fetchOptions'>> = ({
|
||||
|
||||
return (
|
||||
<TagsV1
|
||||
isEditTags
|
||||
startWith={TAG_START_WITH.SOURCE_ICON}
|
||||
tag={tag}
|
||||
tagProps={tagProps}
|
||||
|
Loading…
x
Reference in New Issue
Block a user