-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: fixed widgets not visible after saving in the dashboard detail #7106
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
👍 Looks good to me! Reviewed everything up to 98ec616 in 1 minute and 3 seconds
More details
- Looked at
90
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. frontend/src/container/GridCardLayout/GridCardLayout.tsx:487
- Draft comment:
Avoid inline styles in React. Consider moving the background color style to a CSS class or styled component. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. frontend/src/container/GridCardLayout/GridCardLayout.tsx:232
- Draft comment:
Good addition of '!isDashboardFetching' in the condition to prevent premature layout saves during an active fetch. Consider adding isDashboardFetching (and updateDashboardMutation.isLoading) to the dependency array or a comment justifying their exclusion to avoid stale closures. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. frontend/src/providers/Dashboard/Dashboard.tsx:262
- Draft comment:
Nice use of a try-finally block in the async queryFn to manage the isDashboardFetching state. This pattern ensures the flag resets even if an error occurs. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
4. frontend/src/providers/Dashboard/Dashboard.tsx:436
- Draft comment:
The context value now passes isDashboardFetching, ensuring components consuming the Dashboard context have access to the updated fetch status. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
5. frontend/src/providers/Dashboard/types.ts:50
- Draft comment:
The IDashboardContext interface now includes isDashboardFetching, which aligns well with the context changes in DashboardProvider. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
Workflow ID: wflow_nS3AWvtjE5aeOGA8
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
amlannandy
approved these changes
Feb 13, 2025
ahmadshaheer
approved these changes
Feb 13, 2025
hudsongeovane
pushed a commit
to hudsongeovane/signoz
that referenced
this pull request
Feb 22, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Here we had a race condition in maintaining 2 interdependent variables
dashboardLayout
andlayouts
caused by the parallel execution of the get and put calls triggered from different sources.Related Issues / PR's
Solves following customer issues:
Screenshots
Before:
Screen.Recording.2025-02-13.at.8.01.23.AM.mov
After:
Solved-Dashboard-not-visible.mov
Affected Areas and Manually Tested Areas
Important
Fix widgets visibility issue by adding
isDashboardFetching
check inGridCardLayout.tsx
and updating dashboard context inDashboard.tsx
.isDashboardFetching
check inGraphLayout
inGridCardLayout.tsx
to prevent saving layout during fetch.useDashboard
inDashboard.tsx
to setisDashboardFetching
state during dashboard data fetch.isDashboardFetching
toIDashboardContext
intypes.ts
andDashboard.tsx
.DashboardProvider
inDashboard.tsx
to manageisDashboardFetching
state.This description was created by
for 98ec616. It will automatically update as commits are pushed.