-
Notifications
You must be signed in to change notification settings - Fork 364
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
upcoming: [DI-21200] - Migration from ChartJS to Recharts in CloudPulse #11204
upcoming: [DI-21200] - Migration from ChartJS to Recharts in CloudPulse #11204
Conversation
481e709
to
62a5f98
Compare
@nikhagra-akamai please address the e2e failures before we get to the review - thx! |
@@ -47,7 +38,7 @@ export interface MetricsDisplayRow { | |||
data: Metrics; | |||
format: (n: number) => string; | |||
handleLegendClick?: () => void; | |||
legendColor: LegendColor; | |||
legendColor: string; |
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 looks worse from a type safety perspective. Is this change necessary?
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 it is already been discussed with @jaalah-akamai that instead of restricting to the 7 predefined colors, it should accept any color, so that legend rows greater than 7 won't collide with same color. Also, I don't think color has anything related to typesafety.
export interface DataSet { | ||
[label: string]: number; | ||
timestamp: number; | ||
} |
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.
Interfaces in the API SDK should correspond to responses from a particular endpoint. This definition may be more appropriately located in CloudPulseWidgetUtils.ts
.
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.
updated, thanks
/** | ||
* connect nulls value between two data points | ||
*/ | ||
connectNulls? :boolean; |
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.
connectNulls? :boolean; | |
connectNulls?: boolean; |
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.
updated, it was there in local changes but forgot to push. Thanks
legendRows={legendRows} | ||
connectNulls | ||
fillOpacity={0.5} | ||
legendHeight={theme.spacing(18.75)} |
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.
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 also already been discussed. I understand your concern, but think for dynamically growing legend rows where number can cross 5. Bigger legend row table won't be look so good for UI and if two side by side graphs have different number of legend row count, then that mismatch in graph & legend height will make it look more worse. As in our case legends rows are dynamic & they can grow to 20.
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.
Understood, thanks for the context.
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.
In the latest revision, only two rows fit into the viewport at a time. Do we have any estimates on how many rows were expecting on average? If there are 5+ rows, why are we restricting the window to only show 2 instead of 4 or more?
Coverage Report: ✅ |
@abailly-akamai This PR is raised so that code changes can be reviewed & parallelly we are working on automation test cases, which will eventually be added in this PR. Please let me know if automation is necessary for the review, I'll make it draft & open once automations are done. - Thx |
@nikhagra-akamai I am unsure what you meant, but this just can't be merged with failing tests no matter what cause everyone would inherit these failures |
I only meant that failure tests should not be blocking the PR review. By the time tests are being fixed ( that will be done within a day or 2 ), we can have review for our rest of the PR code. |
@nikhagra-akamai fixing the tests may affect the current code and we are trying to minimize the back and forth. |
thank you for highlighting. I've updated Screen.Recording.2024-11-19.at.4.27.15.PM.mov |
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 for strengthening the types )it will go a long way!) and addressing the mobile defects. This migration is important, appreciate the tedious work pushing this forward, charts are never easy 👍
Approving pending some extra cleanup on the data
types.
@@ -39,7 +39,7 @@ export interface Widgets { | |||
namespace_id: number; | |||
color: string; | |||
size: number; | |||
chart_type: string; | |||
chart_type: 'line' | 'area'; |
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.
Thank you
Thanks @abailly-akamai for the approval |
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 for responding to feedback!
thanks @abailly-akamai @hkhalil-akamai for the approvals couple of updates from the last few comments
if all good, lets merge the PR |
Cloud Manager UI test results🎉 453 passing tests on test run #23 ↗︎
|
Cloud Manager E2E Run #6855
Run Properties:
|
Project |
Cloud Manager E2E
|
Branch Review |
develop
|
Run status |
Passed #6855
|
Run duration | 26m 58s |
Commit |
6c15fbd1c7: upcoming: [DI-21200] - Migration from ChartJS to Recharts in CloudPulse (#11204)
|
Committer | Nikhil Agrawal |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
1
|
Pending |
2
|
Skipped |
0
|
Passing |
453
|
View all changes introduced in this branch ↗︎ |
Description 📝
Migrated ChartJS to Recharts in CloudPulse.
Note: This PR is raised so that code changes can be reviewed & parallelly we are working on automation test cases which will eventually be added in this PR.
Changes 🔄
List any change relevant to the reviewer.
Target release date 🗓️
18th November
Preview 📷
Include a screenshot or screen recording of the change.
🔒 Use the Mask Sensitive Data setting for security.
💡 Use
<video src="" />
tag when including recordings in table.No Data Display
X-Axis with timestamp ticks for less than 24hrs
X-Axis with date & timestamp ticks for more than 24hrs
Legends rows
https://github.com/user-attachments/assets/bc8886ba-db7a-44ba-aa09-fea7d715bd22
Error State
How to test 🧪
monitor/services/:serviceType/metrics
endpoint to playaround with graph & legends.As an Author I have considered 🤔
Check all that apply