feat: move sdk general by rohanchkrabrty · Pull Request #1414 · raystack/frontier

📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Consolidated and streamlined the organization general settings interface by restructuring the component architecture for improved modularity
    • Enhanced the organization deletion workflow with an improved controlled dialog pattern, offering better flexibility and control
    • Reorganized routing structure for settings management while preserving all permission checks and validation logic

Walkthrough

This PR refactors the organization general settings UI by introducing a new GeneralPage component, simplifying the main index, removing the delete route, converting DeleteOrganizationDialog to a controlled component, and introducing navigation callback patterns through new type definitions.

Changes

Cohort / File(s) Summary
Route and component simplification
web/sdk/react/components/organization/general/index.tsx, web/sdk/react/components/organization/routes.tsx
Removed GeneralDeleteOrganization component and its routing logic; simplified general index to delegate to GeneralPage with reduced state management (~130 lines removed).
Type system additions
web/sdk/react/components/organization/shared/types.ts
Added OnNavigate type and BasePageProps interface to support navigation callbacks across organization pages.
Dialog component refactoring
web/sdk/react/views/general/delete-organization-dialog.tsx
Converted DeleteOrganizationDialog from always-open to controlled component accepting open and onOpenChange props; removed router dependency and replaced page reload with onDeleteSuccess callback.
New GeneralPage component
web/sdk/react/views/general/general-page.tsx
Introduced new 127-line GeneralPage component managing organization settings UI, including permission checks, delete dialog state, and composition of GeneralOrganization and DeleteOrganizationDialog subcomponents.
Public API exports and minor updates
web/sdk/react/views/general/general-organization.tsx, web/sdk/react/views/general/general.module.css, web/sdk/react/views/general/index.ts
Exported GeneralOrganizationProps interface; updated AvatarUpload import path to alias; consolidated public re-exports of GeneralPage, GeneralOrganization, and DeleteOrganizationDialog with their prop types.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • paanSinghCoder
  • rsbh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.