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

fix(ui) Display duplicate nodes in lineage viz #6526

Conversation

chriscollins3456
Copy link
Collaborator

In a previous attempt to fix a bug where switching base nodes caused weird duplicates and wonky dragging behavior, we prevented the lineage graph from rendering any duplicates. Turns out some people want to render duplicates in their graph because a singular node could be upstream and downstream of a given entity. This reverts the change to allow duplicates and fixes the base node switching bug by making the key on each node unique. I also clean things up a bit and remove an unnecessary direction prop being passed.

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 Nov 22, 2022
@@ -4,7 +4,7 @@ import { curveBasis } from '@vx/curve';
import { LinePath } from '@vx/shape';
import { TransformMatrix } from '@vx/zoom/lib/types';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any component with an 'And' in the name makes me sad

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes lol


return (
<LineageEntityNode
key={`node-${node.data.urn}-${direction}`}
key={key}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if this is relevant, but is there a way to use a triplet to render the node?

node-node.data.urn-dest.data.urn-direction?

Or is this not really the problem

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah so the problem when switching base nodes is we had keys here that weren't unique and we would leave the old base node rendered.

but as far as the general issue of having duplicate nodes and dragging and what not, having some combo like that could certainly work. idk if it's relevant in this specific situation though

@github-actions
Copy link

github-actions bot commented Nov 22, 2022

Unit Test Results (build & test)

621 tests  ±0   617 ✔️ ±0   16m 0s ⏱️ +12s
157 suites ±0       4 💤 ±0 
157 files   ±0       0 ±0 

Results for commit 34050cd. ± Comparison against base commit 7b13c28.

♻️ This comment has been updated with latest results.

@jjoyce0510 jjoyce0510 merged commit 6255181 into datahub-project:master Nov 24, 2022
cccs-Dustin pushed a commit to CybercentreCanada/datahub that referenced this pull request Feb 1, 2023
gabe-lyons pushed a commit to gabe-lyons/datahub that referenced this pull request Jun 13, 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