-
Notifications
You must be signed in to change notification settings - Fork 323
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
fix:default title of the chart should be updated to the graphed value… #8602
Conversation
|
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.
Summary
- Dynamic Chart Title Update: The default title of the chart now dynamically updates to reflect the selected graphed value using a
useRef
to store a temporary metric view title. - Function Type and Metric Integration: The title is updated based on the selected function type and metric, ensuring it accurately represents the current data being graphed.
Notes
- Code Reuse Opportunity: The
useRef
pattern for dynamic title updates could potentially be reused in other components requiring similar dynamic title functionality.
Comments
frontend/src/pages/Graphing/GraphingEditor.tsx
- Line 137: Using
useMemo
to updatetempMetricViewTitle.current
is unconventional. Consider using auseEffect
hook instead to ensure side effects are handled correctly.
@Vadman97 Please take a moment to review it and let me know if any areas need improvement or adjustments. Your insights and suggestions would be greatly appreciated. |
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 for your contribution! looks great, just adding a small tweak to the requirements to add the Source
to the default string
@rajeshj11 could you please also run |
Done |
@Vadman97 Are there any other changes required from my side? |
doesn't look like it - i think we need to fix one of the checks failing in remote form PRs. will fix it tomorrow |
ac11a67
to
43403f6
Compare
fixes: #8579
/claim #8579
Summary
case 1: If the graph is created/edited without any title it will pick from function type and metric. [functionType(metric)]
case 2: If the user wants to give a proper name to it, they can fill in the title of their choice. The user's title will be given a higher priority irrespective of the updation of function and metric.
note: If the user wants the system to pick the title. Make the title empty. It will automatically pick the title based on function type and metric.
How did you test this change?
https://www.loom.com/share/9fd9a1e000d84c5098afe7330f0dc6e5
Are there any deployment considerations?
No
Does this work require review from our design team?
No