-
Notifications
You must be signed in to change notification settings - Fork 514
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
Replace react-vis with recharts #2558
base: main
Are you sure you want to change the base?
Conversation
ae0cbf8
to
4277922
Compare
@yurishkuro My first step is replacing the search page and get the tests working, then move on to other pages. Changes made that are different from the original PR:
Which should we use? Should the cells clip at the edge like the second one? TODO: Working on making cell size similar to the current behavior. Thanks in advance. |
Aside from color scheme the chart looks ok to me. Just make sure all existing behaviors are supported, like hover. I would add more x-axis ticks. How does grafana do it? |
but what if I select a larger time range? Doing ticks at scrape intervals would cause labels to overlap. |
please make sure you work off up to date main branch, you already have merge conflicts |
Just checked Grafana, for 2 days they do 2 hours intervals and even when resizing they reduce the tick count. Do you want Grafana like behavior? |
I don't care about it being specifically Grafana-like, just that the ticks need to adjust depending on the time range of the query, but also the screen size. E.g. in your screenshot you can easily go from 4 to 8 ticks, which will increase readability, but if I start reducing the screen width the 8 ticks might start overlapping, so what is the solution to that? |
84a5b73
to
5a4e614
Compare
Fixed merge conflicts. Do you recommend rebasing every day before starting work on a feature? We can make it responsive by calculating number of ticks based on For intervals, it might be a bit more complicated. We can calculate the interval like end-start and some if conditions based on the value. I will try to implement code tomorrow. |
I tried the There is an issue open but no timeline: recharts/recharts#3305 I think for now we have to manually calculate it. |
98bc560
to
3957421
Compare
@navaneeth-dev lmk when ready for review |
Will do, working on migrating tests from emyze to react-testing-library. Have you thought about adding .editorconfig? |
is there a lot of tests? Perhaps we can merge them in a separate PR before merging this one.
I don't know what that is, sounds like specific to an IDE that you are using. |
No just started work on "Editorconfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs": So formatter (prettier) usually comes after saving, but EditorConfig sets up the editor's: space, indent size correctly etc... |
3957421
to
186318f
Compare
my point was that changing tests to |
Understood, will migrate the remaining files and let you know: ./packages/jaeger-ui/src/components/Monitor/ServicesView/serviceGraph.tsx |
186318f
to
bd5a6ef
Compare
What is the purpose of a Line/LineSeries here? In my demo instance, I can't see any lines. |
Service Graph latency, error, request rate graphs finished. Is the tooltip fine? output.mp4 |
Fixed opsGraph, this PR is now ready. I have two questions:
EDIT: I fixed the order of time to behave like current main one. |
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 resolve conflicts and update branch up to date
packages/jaeger-ui/src/components/Monitor/ServicesView/index.tsx
Outdated
Show resolved
Hide resolved
} = {}; | ||
|
||
if (yDomain) { | ||
dynProps.yDomain = yDomain; | ||
dynProps.domain = yDomain; |
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 avoid unnecessary changes, I want to focus my review on the main changes, not be distracted by these ^^^
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.
This is a necessary change, <YAxis hide={true} {...dynProps} />
YAxis takes domain prop not yDomain
like react-vis
.
How would you want me to proceed?
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.
do you need this const and if at all? Could it not be just inlined where needed?
packages/jaeger-ui/src/components/SearchTracePage/SearchResults/ScatterPlot.jsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Navaneeth Rao <[email protected]>
- Equal interval - Proper Label position Signed-off-by: Navaneeth Rao <[email protected]>
Signed-off-by: Navaneeth Rao <[email protected]>
Signed-off-by: Navaneeth Rao <[email protected]>
Signed-off-by: Navaneeth Rao <[email protected]>
Signed-off-by: Navaneeth Rao <[email protected]>
cc45554
to
7e28fe8
Compare
Signed-off-by: Navaneeth Rao <[email protected]>
Signed-off-by: Navaneeth Rao <[email protected]>
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.
Fixed all merge conflicts and updated to main.
Signed-off-by: Navaneeth Rao <[email protected]>
@@ -82,6 +82,7 @@ | |||
"react-vis-force": "^0.3.1", |
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.
is react-vis still needed after this change?
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.
No, I will remove it
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.
react-vis-force is different from react-vis. Once we migrate the tests we can remove react-vis. rg react-vis
package.json
49: "prettier": "prettier --write '{.,scripts}/*.{js,jsx,json,md,ts,tsx,mts}' 'packages/*/{src,demo/src}/**/!(layout.worker.bundled|react-vis).{css,js,jsx,json,md,ts,tsx}' 'packages/*/*.{css,js,jsx,json,md,ts,tsx,mts}'",
50: "prettier-lint": "prettier --list-different '{.,scripts}/*.{js,jsx,json,md,ts,tsx,mts}' 'packages/*/{src,demo/src}/**/!(layout.worker.bundled|react-vis).{css,js,jsx,json,md,ts,tsx}' 'packages/*/*.{css,js,jsx,json,md,ts,tsx,mts}' || (echo '*** PLEASE RUN npm run prettier AND RESUBMIT ***' && false)",
packages/jaeger-ui/package.json
81: "react-vis": "1.11.12",
82: "react-vis-force": "^0.3.1",
packages/jaeger-ui/typings/custom.d.ts
43:declare module 'react-vis-force';
package-lock.json
16602: "node_modules/react-vis": {
16604: "resolved": "https://registry.npmjs.org/react-vis/-/react-vis-1.11.12.tgz",
16635: "node_modules/react-vis-force": {
16637: "resolved": "https://registry.npmjs.org/react-vis-force/-/react-vis-force-0.3.1.tgz",
16651: "node_modules/react-vis/node_modules/d3-color": {
16657: "node_modules/react-vis/node_modules/d3-interpolate": {
16666: "node_modules/react-vis/node_modules/deep-equal": {
20264: "react-vis": "1.11.12",
20265: "react-vis-force": "^0.3.1",
packages/jaeger-ui/src/components/DependencyGraph/ForceGraphArrowLink.tsx
22:import { ForceGraphLink } from 'react-vis-force';
packages/jaeger-ui/src/components/DependencyGraph/DependencyForceGraph.test.js
17:import { InteractiveForceGraph, ForceGraphNode } from 'react-vis-force';
packages/jaeger-ui/src/components/DependencyGraph/DependencyForceGraph.jsx
16:import { InteractiveForceGraph, ForceGraphNode } from 'react-vis-force';
packages/jaeger-ui/src/components/SearchTracePage/SearchResults/ScatterPlot.test.js
17:import { XAxis, XYPlot, YAxis, MarkSeries, Hint } from 'react-vis'; |
I think there is a bug with the size of ScatterPlot circles will test and let you know. I ran monitor docker compose example too but it shows for me 🤔 . As for Monitor I used default recharts xaxis so interval isn't uniform. I will try to make it like Grafana and let you know. |
I know, I was referring to react-vis only. |
Which problem is this PR solving?
Description of the changes
Still work in progress, copying all the changes from previous PR #2242 and implementing the needed tests.
How was this change tested?
npm run start
npm run build
npm run test
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test