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: enable billing and org-settings in workspace blocked state #6761

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

YounixM
Copy link
Member

@YounixM YounixM commented Jan 6, 2025

Fixes - https://github.com/SigNoz/engineering-pod/issues/1991


Important

Enable billing and organization settings access for admins in workspace blocked state, with UI updates for disabled elements.

  • Behavior:
    • Allow admins to access ORG_SETTINGS, BILLING, and MY_SETTINGS routes in workspace blocked state in Private.tsx.
    • Update navigateToWorkSpaceBlocked to check for admin role and specific routes.
  • UI Components:
    • Add isDisabled prop to NavItem in NavItem.tsx to handle disabled state.
    • Update SideNav.tsx to disable menu items when workspace is blocked, except for billing and settings for admins.
    • Add View Billing button for admins in WorkspaceLocked.tsx.
  • Styles:
    • Add .disabled class styling in NavItem.styles.scss to indicate disabled state visually.
    • Update WorkspaceLocked.styles.scss for button styling in blocked state.

This description was created by Ellipsis for dc89503. It will automatically update as commits are pushed.

@YounixM YounixM marked this pull request as ready for review January 6, 2025 20:55
Copy link

github-actions bot commented Jan 6, 2025

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions github-actions bot added enhancement New feature or request docs required labels Jan 6, 2025
Copy link

github-actions bot commented Jan 6, 2025

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

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 683beab in 20 seconds

More details
  • Looked at 18 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/AppRoutes/Private.tsx:113
  • Draft comment:
    Avoid using any type for route parameter. Define a specific type/interface for route to ensure it has the expected structure.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_SQR7wH2dMnlVx2zF


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

request-info bot commented Jan 6, 2025

We would appreciate it if you could provide us with more info about this issue/pr!

Copy link

github-actions bot commented Jan 6, 2025

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link

github-actions bot commented Jan 7, 2025

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

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! Incremental review on dc89503 in 1 minute and 16 seconds

More details
  • Looked at 298 lines of code in 8 files
  • Skipped 0 files when reviewing.
  • Skipped posting 9 drafted comments based on config settings.
1. frontend/src/AppRoutes/Private.tsx:41
  • Draft comment:
    The isAdmin variable is defined but not used. Consider removing it to clean up the code.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. frontend/src/container/SideNav/NavItem/NavItem.tsx:28
  • Draft comment:
    The isDisabled prop is used correctly to prevent navigation when the workspace is blocked. Ensure this is consistently applied across all navigation items.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The isDisabled prop is used in multiple places to disable navigation items when the workspace is blocked. This is a good practice to prevent user actions that are not allowed in the current state.
3. frontend/src/container/SideNav/SideNav.tsx:378
  • Draft comment:
    The isDisabled prop is used correctly to prevent navigation when the workspace is blocked. Ensure this is consistently applied across all navigation items.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The isDisabled prop is used in multiple places to disable navigation items when the workspace is blocked. This is a good practice to prevent user actions that are not allowed in the current state.
4. frontend/src/container/SideNav/SideNav.tsx:394
  • Draft comment:
    The isDisabled prop is used correctly to prevent navigation when the workspace is blocked. Ensure this is consistently applied across all navigation items.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The isDisabled prop is used in multiple places to disable navigation items when the workspace is blocked. This is a good practice to prevent user actions that are not allowed in the current state.
5. frontend/src/container/SideNav/SideNav.tsx:404
  • Draft comment:
    The isDisabled prop is used correctly to prevent navigation when the workspace is blocked. Ensure this is consistently applied across all navigation items.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The isDisabled prop is used in multiple places to disable navigation items when the workspace is blocked. This is a good practice to prevent user actions that are not allowed in the current state.
6. frontend/src/container/SideNav/SideNav.tsx:415
  • Draft comment:
    The isDisabled prop is used correctly to prevent navigation when the workspace is blocked. Ensure this is consistently applied across all navigation items.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The isDisabled prop is used in multiple places to disable navigation items when the workspace is blocked. This is a good practice to prevent user actions that are not allowed in the current state.
7. frontend/src/container/SideNav/SideNav.tsx:432
  • Draft comment:
    The isDisabled prop is used correctly to prevent navigation when the workspace is blocked. Ensure this is consistently applied across all navigation items.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The isDisabled prop is used in multiple places to disable navigation items when the workspace is blocked. This is a good practice to prevent user actions that are not allowed in the current state.
8. frontend/src/container/SideNav/NavItem/NavItem.styles.scss:20
  • Draft comment:
    Use design tokens or predefined color constants instead of hardcoding color values like #3f5ecc to maintain consistency in design and theming. This applies to other hardcoded colors in this file as well.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.
9. frontend/src/pages/WorkspaceLocked/WorkspaceLocked.styles.scss:54
  • Draft comment:
    Use design tokens or predefined color constants instead of hardcoding color values like var(--text-vanilla-400) to maintain consistency in design and theming. This applies to other hardcoded colors in this file as well.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_HhSCPUisLSlwhbwd


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@YounixM YounixM force-pushed the feat/access-billing-and-settings branch from dc89503 to d7cf0af Compare January 8, 2025 05:38
@YounixM YounixM enabled auto-merge (squash) January 8, 2025 05:45
@YounixM YounixM merged commit e92d055 into main Jan 8, 2025
15 of 16 checks passed
@YounixM YounixM deleted the feat/access-billing-and-settings branch January 8, 2025 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants