-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(ui) Display duplicate nodes in lineage viz #6526
Conversation
@@ -4,7 +4,7 @@ import { curveBasis } from '@vx/curve'; | |||
import { LinePath } from '@vx/shape'; | |||
import { TransformMatrix } from '@vx/zoom/lib/types'; |
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.
Any component with an 'And' in the name makes me sad
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.
yes lol
|
||
return ( | ||
<LineageEntityNode | ||
key={`node-${node.data.urn}-${direction}`} | ||
key={key} |
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.
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
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.
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
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 unnecessarydirection
prop being passed.Checklist