-
Notifications
You must be signed in to change notification settings - Fork 508
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
[Feature]: Add zoom in/out controls to Plexus graphs #2072
[Feature]: Add zoom in/out controls to Plexus graphs #2072
Conversation
Signed-off-by: Wise-Wizard <saransh.shankar@gmail.com>
Signed-off-by: Wise-Wizard <saransh.shankar@gmail.com>
Signed-off-by: Wise-Wizard <saransh.shankar@gmail.com>
Always best to continue in the same PR, to keep the context. |
Hi, I was working on integrating the modifications in Plexus Package, I thought the changes have to be made to Minimap in src package but turns out none of the changes I made were being reflected in he UI of the Graphs. I spent some time debugging it and turns out the changes should be made to the lib pacakge under plexus package and the changes are being reflected. The problem I am facing is the lib package is included in the gitignore file. Please help me, resolve this doubt because I am stuck on how to proceed next. |
iiuc lib is the output of the build process for plexus, i.e. they will be reflected in the UI if you do |
Yes exactly, Not only hot reload but making legitimate changes in the src package of plexus and restarting the terminal is also not reflecting the changes at all, whereas hot reload of jaeger-ui is working fine. |
If you can fix hot reload it would be awesome. It can be a separate PR from this. |
can it be fixed for everyone? |
Yes, I will have to make about 30 file changes wherever plexus is being used. |
that sounds bad - can you explain what you found & the workaround? |
I found out that the main faults were due to the faulty imports. I redirected the imports to plexus/src package for example import { Digraph, LayoutManager } from "@jaegertracing/plexus/src/index"; and import { TEdge, TVertex } from "@jaegertracing/plexus/src/types/index"; This solved the issue of why the changes were not being reflected. |
I see - I think it makes sense, but at the same time perhaps the solution shouldn't be in changing the imports, but some fo the build settings. I am not a JS/TS expert, but for instance in the Go world you can have deps & imports that look like a 3rd-party dependency: but then an override is provided to tell the build that they should actually be sourced locally from the monorepo: |
Ohh okay, I have also worked in Go and have some knowledge about how it works. So, I understand what the requirement is. I will see if the same thing is possible for TS. |
Yeah, it's done. Had to make changes in the package.json file which redirected it to the src package instead of the lib package, and now the hot reload is working for all the files succesfully! |
But, noticed there are some remaining imports in files that are specifically pointing to the lib folder which must be changed, rest all pointing to the main plexus folder now points to the src instead of lib. |
awesome! Definitely submit this as a separate PR |
Got it, will do. Do you also want me to change the specific imports in each file that point out to the plexus/lib packages as well? |
yes, thanks |
Hi @yurishkuro, I would like to resume working on this issue first. Making changes to DiGraph in Plexus library as you mentioned and also add the magnifying Icons as in https://react-icons.github.io/react-icons/search/#q=magnifying. |
Signed-off-by: Wise-Wizard <saransh.shankar@gmail.com>
Signed-off-by: Wise-Wizard <saransh.shankar@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2072 +/- ##
=======================================
Coverage 96.57% 96.57%
=======================================
Files 254 254
Lines 7620 7620
Branches 1986 1986
=======================================
Hits 7359 7359
Misses 261 261 ☔ View full report in Codecov by Sentry. |
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.
please include screenshots in the RR description
Signed-off-by: Wise-Wizard <saransh.shankar@gmail.com>
Included the Screenshots as well. |
Signed-off-by: Wise-Wizard <saransh.shankar@gmail.com>
Signed-off-by: Wise-Wizard <saransh.shankar@gmail.com>
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.
Thanks!
Don't mention it :) |
As always, just look for help-wanted / good-first-issue tickets |
Signed-off-by: Wise-Wizard <saransh.shankar@gmail.com>
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.
Thanks!
Resolves #2056, which reported a concern related to [Feature]: Add zoom in/out controls to graphs #2056.
Changes Made:
In order to address the mentioned issue and enhance user experience, the following changes have been implemented:
useControls
method to save the selected zoom level in local storage, ensuring persistence across sessions.Testing:
The changes have been thoroughly tested to ensure correctness and compatibility. The testing process included:
Checklist:
To comply with the project's contribution guidelines, the following checklist items have been addressed:
make lint test
, for jaeger-ui:yarn lint
andyarn test
.Screenshots:
Original Frame (Reset)
Zoomed In
Zoomed Out
Feel free to review and provide feedback. Contributions and feedback are highly appreciated!