Skip to content
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

feat(ui) Build entity doesn't exist page for entity profiles #7150

Conversation

chriscollins3456
Copy link
Collaborator

@chriscollins3456 chriscollins3456 commented Jan 26, 2023

In the embedded profile for the chrome extension as well as any entity profile, we want to show a page saying that an entity doesn't exist in datahub if that's the case instead of pretending like we know about the entity and showing a bare bones page (like we do in the main app).

This adds a new exists field on entities that you can query in graphql. It reuses an existing EntityExistsResolver that was meant as its own endpoint with a urn in the params, but I repurpose it to get the urn from the source entity if it's not in the params so it can be used for both purposes.

Here's what the page looks like for embedded profiles:
image

and for regular profiles:
image

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Jan 26, 2023
@chriscollins3456 chriscollins3456 changed the title feat(ui) Build entity doesn't exist page for embedded profile feat(ui) Build entity doesn't exist page for entity profiles Jan 26, 2023
@@ -49,6 +49,10 @@ export default function EmbeddedProfile<T>({ urn, entityType, getOverridePropert
const { entityData, dataPossiblyCombinedWithSiblings, dataNotCombinedWithSiblings, loading, refetch } =
useGetDataForProfile({ urn, entityType, useEntityQuery, getOverrideProperties });

if (entityData?.exists === false) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you planning on adding this inside of EntityProfile component as part of this PR or separately?

Looks like FE build failing!

@chriscollins3456
Copy link
Collaborator Author

Were you planning on adding this inside of EntityProfile component as part of this PR or separately?

Shoot I just completely forgot to push up my last commit adding this to the regular profie!

Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really really nice, man!

@jjoyce0510 jjoyce0510 merged commit 7a68f11 into datahub-project:master Jan 27, 2023
ericyomi pushed a commit to ericyomi/datahub that referenced this pull request Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants