-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: update page titles for dashboards and alerts #6706
base: main
Are you sure you want to change the base?
Conversation
Welcome to the SigNoz community! Thank you for your first pull request and making this project better. 🤗 |
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.
❌ Changes requested. Reviewed everything up to 86a74a6 in 36 seconds
More details
- Looked at
29
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. frontend/src/pages/AlertDetails/AlertDetails.tsx:84
- Draft comment:
Consider extracting the document title update logic into a reusable function to adhere to the DRY principle. This logic is also present inDashboardPage.tsx
. - Reason this comment was not posted:
Confidence changes required:50%
The document title update logic is repeated in both files. It would be better to extract this logic into a reusable function to adhere to the DRY principle.
2. frontend/src/pages/NewDashboard/DashboardPage.tsx:21
- Draft comment:
Avoid using inline styles for setting document titles. Consider using a React effect hook to manage side effects like updating the document title. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_UBLf4YItn1uZTHvi
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -80,6 +80,9 @@ function AlertDetails(): JSX.Element { | |||
alertDetailsResponse, | |||
} = useGetAlertRuleDetails(); | |||
|
|||
const alertTitle = alertDetailsResponse?.payload?.data.alert; | |||
document.title = alertTitle || document.title; |
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.
Avoid using inline styles for setting document titles. Consider using a React effect hook to manage side effects like updating the document title.
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 the titles in useEffect.
Summary
The titles of dashboards and alerts are updated to their names.
Screenshots
Important
Update
document.title
inAlertDetails.tsx
andDashboardPage.tsx
to reflect alert and dashboard names.document.title
inAlertDetails.tsx
to the alert name fromalertDetailsResponse
.document.title
inDashboardPage.tsx
to the dashboard name fromdashboardResponse
.AlertDetails.tsx
DashboardPage.tsx
This description was created by for 86a74a6. It will automatically update as commits are pushed.