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

Refactoring: DAG migrated to Plexus's Digraph #1981

Merged
merged 16 commits into from
Dec 18, 2023

Conversation

prathamesh-mutkure
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • I've removed cytoscape and replaced it with Digraph from Plexus
  • Had to add support for labels in Digraph to support this change

How was this change tested?

  • The changes were tested visually
  • Tested with test data involving around 50 nodes

Before -

Screenshot 2023-11-18 at 22 06 10

Now -

Screenshot 2023-11-18 at 22 06 22

Tha additional tab visible in above images has been removed

Checklist

@prathamesh-mutkure
Copy link
Contributor Author

Hey @yurishkuro, the two test cases will fail for DAG, I'll fix them ASAP, you can review the changes in the meantime

Copy link

codecov bot commented Nov 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (63361a2) 96.54% compared to head (c8d6f3d) 96.54%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1981   +/-   ##
=======================================
  Coverage   96.54%   96.54%           
=======================================
  Files         255      255           
  Lines        7611     7616    +5     
  Branches     1983     1984    +1     
=======================================
+ Hits         7348     7353    +5     
  Misses        263      263           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@prathamesh-mutkure prathamesh-mutkure changed the title DAG migrated to Plexus's Digraph Refactoring: DAG migrated to Plexus's Digraph Nov 18, 2023
@prathamesh-mutkure prathamesh-mutkure marked this pull request as ready for review November 18, 2023 20:35
@prathamesh-mutkure prathamesh-mutkure requested a review from a team as a code owner November 18, 2023 20:35
@prathamesh-mutkure prathamesh-mutkure requested review from pavolloffay and removed request for a team November 18, 2023 20:35
@prathamesh-mutkure
Copy link
Contributor Author

Hey @yashrsharma44, tagging you for review

The code coverage has dropped, will try to increase it

@yurishkuro
Copy link
Member

  • ping zoom does not seem to work at all, I am getting the whole browser window changing zoom instead of the graph div only, as it was in the old DAG. I know that zoom does work in DDG (but does not seem to work in Trace Diff)
  • is dragging of the nodes not supported by Plexus at all? Not the end of the world if it's not.

@yurishkuro
Copy link
Member

Another odd thing: if I tab to Force Directed Graph and then back to DAG, the minimap goes rather nuts - the light-gray box is supposed to indicate current zoom view in the viewport, and it shows outside of it, even though the main display is fine. Clicking on the reset button returns the box back into full size minimap. I suspect it may be related to the zoom nor working.

image

@yurishkuro
Copy link
Member

I tried this with graphs with larger number of nodes. With 15 nodes it looks like this:
image
Curious why the nodes / text are so small, there's enough space between them for larger nodes.

The zoom seems to work with these larger graphs.

@prathamesh-mutkure
Copy link
Contributor Author

  • ping zoom does not seem to work at all, I am getting the whole browser window changing zoom instead of the graph div only, as it was in the old DAG. I know that zoom does work in DDG (but does not seem to work in Trace Diff)

The graph is likely smaller, you seem to got the zoom working with larger graph

is dragging of the nodes not supported by Plexus at all? Not the end of the world if it's not.

Did not see anything in the documentation and code sadly

if I tab to Force Directed Graph and then back to DAG, the minimap goes rather nuts

I'll check this one and try to fix it

I tried this with graphs with a larger number of nodes. With 15 nodes it looks like this:
Curious why the nodes / text are so small, there's enough space between them for larger nodes

The coordinates are actually returned by Plexus, the size of nodes is static, and we can play around with the size of nodes

Also, can you share data for those 15 nodes?

@yurishkuro
Copy link
Member

@yurishkuro
Copy link
Member

The graph is likely smaller, you seem to got the zoom working with larger graph

that doesn't explain why the zoom doesn't work - with the larger 15-node graph I can zoom it so that the nodes are twice as large as in the default hotrod graph (which doesn't zoom)

@prathamesh-mutkure prathamesh-mutkure force-pushed the dag-migration branch 2 times, most recently from b551e01 to 9fae595 Compare November 23, 2023 09:11
@yurishkuro yurishkuro added the changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements label Nov 23, 2023
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
@@ -13,8 +13,10 @@
// limitations under the License.

import React from 'react';
import ShallowRenderer from 'react-test-renderer/shallow';
Copy link
Member

Choose a reason for hiding this comment

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

why do we need to use ShallowRenderer and not the standard render? Does ShallowRenderer actually render more details?

@yurishkuro yurishkuro enabled auto-merge (squash) December 18, 2023 01:48
@yurishkuro yurishkuro merged commit 2947a10 into jaegertracing:main Dec 18, 2023
10 checks passed
@yurishkuro yurishkuro mentioned this pull request Dec 25, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants