-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Worked on the pop-over of matched entity #5851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
chriscollins3456
merged 10 commits into
datahub-project:master
from
Ankit-Keshari-Vituity:popover-to-matches
Sep 20, 2022
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5d8ea05
Worked on pop-over of matched entity
Ankit-Keshari-Vituity af3c404
Worked on the matched tag , term on search result
Ankit-Keshari-Vituity 8c40ed4
Added a condition to check the matched vale lenght
Ankit-Keshari-Vituity f05435a
Merge branch 'master' into popover-to-matches
jjoyce0510 f5b5a24
Removed the type from the graphQl
Ankit-Keshari-Vituity 6066991
Merge branch 'popover-to-matches' of https://github.com/Ankit-Keshari…
Ankit-Keshari-Vituity dd5e1f0
Merge branch 'master' into popover-to-matches
chriscollins3456 6326a92
worked on the PR comments
Ankit-Keshari-Vituity ef19bf5
Merge branch 'popover-to-matches' of https://github.com/Ankit-Keshari…
Ankit-Keshari-Vituity cf3f113
Merge branch 'master' into popover-to-matches
chriscollins3456 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
datahub-web-react/src/app/entity/dataset/shared/TagSummary.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import { useGetTagQuery } from '../../../../graphql/tag.generated'; | ||
import { Tag } from '../../../../types.generated'; | ||
import { HoverEntityTooltip } from '../../../recommendations/renderer/component/HoverEntityTooltip'; | ||
import { StyledTag } from '../../shared/components/styled/StyledTag'; | ||
|
||
const TagLink = styled.span` | ||
display: inline-block; | ||
`; | ||
|
||
type Props = { | ||
urn: string; | ||
}; | ||
|
||
export const TagSummary = ({ urn }: Props) => { | ||
const { data } = useGetTagQuery({ variables: { urn } }); | ||
return ( | ||
<> | ||
{data && ( | ||
<HoverEntityTooltip entity={data?.tag as Tag}> | ||
<TagLink key={data?.tag?.urn}> | ||
<StyledTag | ||
style={{ cursor: 'pointer' }} | ||
$colorHash={data?.tag?.urn} | ||
$color={data?.tag?.properties?.colorHex} | ||
closable={false} | ||
> | ||
{data?.tag?.properties?.name} | ||
</StyledTag> | ||
</TagLink> | ||
</HoverEntityTooltip> | ||
)} | ||
</> | ||
); | ||
}; |
34 changes: 34 additions & 0 deletions
34
datahub-web-react/src/app/entity/dataset/shared/TermSummary.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
import { Tag } from 'antd'; | ||
import { BookOutlined } from '@ant-design/icons'; | ||
import styled from 'styled-components'; | ||
import { useGetGlossaryTermQuery } from '../../../../graphql/glossaryTerm.generated'; | ||
import { HoverEntityTooltip } from '../../../recommendations/renderer/component/HoverEntityTooltip'; | ||
import { GlossaryTerm } from '../../../../types.generated'; | ||
|
||
const TermLink = styled.span` | ||
display: inline-block; | ||
`; | ||
|
||
type Props = { | ||
urn: string; | ||
}; | ||
|
||
export const TermSummary = ({ urn }: Props) => { | ||
const { data } = useGetGlossaryTermQuery({ variables: { urn } }); | ||
|
||
return ( | ||
<> | ||
{data && ( | ||
<HoverEntityTooltip entity={data?.glossaryTerm as GlossaryTerm}> | ||
<TermLink key={data?.glossaryTerm?.urn}> | ||
<Tag closable={false} style={{ cursor: 'pointer' }}> | ||
<BookOutlined style={{ marginRight: '3%' }} /> | ||
{data?.glossaryTerm?.name} | ||
|
||
</Tag> | ||
</TermLink> | ||
</HoverEntityTooltip> | ||
)} | ||
</> | ||
); | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
query getTag($urn: String!) { | ||
tag(urn: $urn) { | ||
type | ||
urn | ||
name | ||
description | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be
urn:li:glossaryTerm