Skip to content
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

Open
wants to merge 1 commit into
base: SIG-5642
Choose a base branch
from

Conversation

SagarRajput-7
Copy link
Contributor

@SagarRajput-7 SagarRajput-7 commented Jan 31, 2025

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

@github-actions github-actions bot added the enhancement New feature or request label Jan 31, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a 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 in 9 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 why setSelectedRowWidgetId(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%
    The setSelectedRowWidgetId function is used multiple times to reset the state to null 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 why setSelectedRowWidgetId(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%
    The setSelectedRowWidgetId function is used multiple times to reset the state to null 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 why setSelectedRowWidgetId(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%
    The setSelectedRowWidgetId function is used multiple times to reset the state to null 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 why setSelectedRowWidgetId(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%
    The setSelectedRowWidgetId function is used multiple times to reset the state to null 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 the img tag. Use CSS classes or styled components instead. This is also applicable to the img 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 the border-top property. This is also applicable to the border 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 the border property. This is also applicable to the border-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);
Copy link
Member

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants