-
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
feat: added feat to add new panel in a section #6999
base: SIG-5642
Are you sure you want to change the base?
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.
👍 Looks good to me! Reviewed everything up to e2b1d35 in 1 minute and 41 seconds
More details
- Looked at
359
lines of code in9
files - Skipped
0
files when reviewing. - Skipped posting
7
drafted comments based on config settings.
1. frontend/src/container/GridCardLayout/DashboardEmptyState/DashboardEmptyState.tsx:38
- Draft comment:
Consider adding a comment to explain whysetSelectedRowWidgetId(null)
is called here. It seems to reset the state after the widget handler is executed. - Reason this comment was not posted:
Confidence changes required:20%
ThesetSelectedRowWidgetId
function is used multiple times to reset the state tonull
after certain operations. This is a good practice to ensure that the state is reset after its purpose is fulfilled.
2. frontend/src/container/GridCardLayout/GridCardLayout.tsx:177
- Draft comment:
Consider adding a comment to explain whysetSelectedRowWidgetId(null)
is called here. It seems to reset the state after the dashboard is updated. - Reason this comment was not posted:
Confidence changes required:20%
ThesetSelectedRowWidgetId
function is used multiple times to reset the state tonull
after certain operations. This is a good practice to ensure that the state is reset after its purpose is fulfilled.
3. frontend/src/container/NewDashboard/DashboardDescription/index.tsx:161
- Draft comment:
Consider adding a comment to explain whysetSelectedRowWidgetId(null)
is called here. It seems to reset the state after the widget handler is executed. - Reason this comment was not posted:
Confidence changes required:20%
ThesetSelectedRowWidgetId
function is used multiple times to reset the state tonull
after certain operations. This is a good practice to ensure that the state is reset after its purpose is fulfilled.
4. frontend/src/container/NewWidget/index.tsx:471
- Draft comment:
Consider adding a comment to explain whysetSelectedRowWidgetId(null)
is called here. It seems to reset the state after the dashboard is updated. - Reason this comment was not posted:
Confidence changes required:20%
ThesetSelectedRowWidgetId
function is used multiple times to reset the state tonull
after certain operations. This is a good practice to ensure that the state is reset after its purpose is fulfilled.
5. frontend/src/container/GridCardLayout/DashboardEmptyState/DashboardEmptyState.tsx:38
- Draft comment:
Avoid using inline styles for theimg
tag. Use CSS classes or styled components instead. This is also applicable to theimg
tag on line 70. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
6. frontend/src/container/GridCardLayout/GridCardLayout.styles.scss:141
- Draft comment:
Use design tokens or predefined color constants instead of hardcoding color values for theborder-top
property. This is also applicable to theborder
property on line 114. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
7. frontend/src/container/GridCardLayout/GridCardLayout.styles.scss:123
- Draft comment:
Use design tokens or predefined color constants instead of hardcoding color values for theborder
property. This is also applicable to theborder-top
property on line 151. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_chuYCvbNo7ygTsA3
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
// slice the layout from current row to next row | ||
const sectionWidgets = | ||
nextRowIndex === -1 ? layout : layout.slice(0, nextRowIndex); | ||
console.log('sectionWidgets', sectionWidgets, nextRowIndex); |
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.
Remove the console log?
); | ||
const nextRowId = nextRowIndex !== -1 ? updatedLayout[nextRowIndex].i : null; | ||
|
||
console.log(nextRowId); |
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.
Same
Summary
Related Issues / PR's
Screenshots
Screen.Recording.2025-01-31.at.3.29.47.PM.mov
Screen.Recording.2025-01-31.at.3.32.03.PM.mov
Affected Areas and Manually Tested Areas