docs (admin): Add SDK admin docs by paanSinghCoder · Pull Request #1411 · raystack/frontier
Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- ▶️ Resume reviews
- 🔍 Trigger review
📝 Walkthrough
Walkthrough
Adds admin SDK documentation and sidebar styling; introduces pagination and query-transform utilities; renames many admin exports and components to "*View" variants; extends numerous view prop interfaces with navigation, selection, export, and UI/context props; updates app imports/routes to use renamed components.
Changes
| Cohort / File(s) | Summary |
|---|---|
Docs: Admin reference docs/docs/sdk/web/admin/overview.md, docs/docs/sdk/web/admin/components.md, docs/docs/sdk/web/admin/utilities.md |
Adds overview, component reference (props, examples), and utilities docs describing pagination helpers, transform helpers, types, and usage examples. |
Docs: sidebar & styling docs/sidebars.js, docs/src/css/custom.css |
Adds "SDK > Web > Admin" sidebar entries and two CSS rules adjusting left padding for deeper sidebar levels. |
Admin utilities web/sdk/admin/utils/connect-pagination.ts, web/sdk/admin/utils/transform-query.ts |
Adds DEFAULT_PAGE_SIZE, ConnectRPCPaginatedResponse, getConnectNextPageParam, getGroupCountMapFromFirstPage, and transformDataTableQueryToRQLRequest with TransformOptions (includes fieldNameMapping). |
Views: rename & re-exports web/sdk/admin/index.ts, web/sdk/admin/views/organizations/.../*, web/sdk/admin/views/organizations/details/.../* |
Renames and re-exports many organization-related components from "Page"/ to "*View" (e.g., OrganizationListView, OrganizationDetailsView, OrganizationMembersView, OrganizationProjectsView, OrganizationInvoicesView, OrganizationTokensView, OrganizationApisView); fixes a typo-based export rename. |
Views: props additions / JSDoc web/sdk/admin/views/.../users/UsersView.tsx, .../organizations/list/index.tsx, .../organizations/details/index.tsx, .../plans/index.tsx, .../products/index.tsx, .../products/prices/index.tsx, .../roles/index.tsx, .../webhooks/webhooks/index.tsx, .../audit-logs/index.tsx, .../invoices/index.tsx, .../preferences/PreferencesView.tsx |
Expands many public view prop interfaces (adds navigation callbacks/currentPath, selected-id and detail control props, export handlers, appName, countries, organizationTypes, tokenProductId) and adds JSDoc/formatting in several files. |
App: updated usages/imports web/apps/admin/src/pages/organizations/details/index.tsx, web/apps/admin/src/pages/organizations/list/index.tsx, web/apps/admin/src/routes.tsx |
Updated imports and JSX to use renamed "*View" components and updated route elements to the corresponding View components. |
Small refactor: projects view web/sdk/admin/views/organizations/details/projects/index.tsx |
Renamed export to OrganizationProjectsView and removed unused imports/usages of connect-query transport and react-query client initialization. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
- refactor: remove all instances of react-router-dom #1410: Refactors admin views to be router-agnostic and adds navigation callback props and related prop/API changes.
- feat: export Audit logs page as a component and consume it in apps/admin #1374: Updates AuditLogsView and related admin view exports and utilities overlapping with this PR.
- feat: export Organisations page as a component and consume it in apps/admin #1397: Renames/aligns OrganizationList/OrganizationDetails exports and updates app imports, similar surface changes.
Suggested reviewers
- rsbh
- rohanchkrabrty
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.
Comment @coderabbitai help to get the list of available commands and usage tips.