-
Notifications
You must be signed in to change notification settings - Fork 29
feat: option to highlight "Deep dependencies" when clicking on source files #180
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: option to highlight "Deep dependencies" when clicking on source files #180
Conversation
4bab4c8
to
ddbdf79
Compare
|
@antoine-coulon This is ready to be reviewed. Screen.Recording.2024-11-17.at.12.42.39.am.mp4The behaviour works as expected, except:
These improvements would probably require big changes in how the renderer works. One idea is to introduce layers and a diffing engine that merges changes before sending the minimal required changes to Some performance bottlenecks come from the underlying |
Awesome work @MengLinMaker, that looks super great! I'm currently on my phone but I should be able to grab my laptop before tomorrow's night to review the work and all the provided information, and obviously merge the PR 🚀 |
Whoops sorry, just found another bug - "Deep dependencies" should never be disabled |
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.
Overall it looks good to me, thanks for the great work! I provided few comments mostly regarding the way the UI state and the graph are updated.
Also, I played a bit with the feature and it looks like Deep dependencies
and Circular dependencies
are overlapping and playing with both at the same time creates visual inconsistencies. For example, when having both options checked, selecting nodes will make highlighted circular dependencies disappear.
I would probably consider that these two options can't be checked at the same time, meaning that one option can't be checked while the other one is checked. That way, we avoid the need of reconciling the graph each time. What do you think?
Good suggestion. It's a simpler solution. Mutually exclusive toggle implemented in 6a44479 |
Added tests. The naming is confusing, especially |
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.
LGTM, thanks for the good work!
@all-contributors please add @MengLinMaker for code |
I've put up a pull request to add @MengLinMaker! 🎉 |
closes #179
Summary
Allow highlighting deep dependency sub-graph of a file that is selected:
Screen.Recording.2024-11-16.at.10.58.22.pm.mp4
This is still Work In Progress.
Implementation
Implementation overview:
deepDependencyNodeOptions
anddeepDependencyEdgeOptions
to highlight nodes and edges.toggle_deep
NetworkAction, new network state in store and checkbox to trigger option.highlightDeepDependencies
function to highlight deep dependencies using DFS._network.on('click', ...)
forviz-network
to trigger dependency highlighting.oldNodeId
is used to reset highlighting of previously selected node.Alternative UX:
focus_on_node
. Butclick
event provides faster feedback.Bugs:
Circular dependencies
- fixing would require huge changes to how rendering works.Performance:
Testing
Impacted documentation
pnpm changeset
at the root of the workspace, affected packages are being bumped (either patch/minor) and a clear description for each of the affected packages was added.