Skip to content

feat: export Products page as a component and consume it in apps/admin#1363

Open
paanSinghCoder wants to merge 7 commits intofeat/export-invoices-pagefrom
feat/export-products-page
Open

feat: export Products page as a component and consume it in apps/admin#1363
paanSinghCoder wants to merge 7 commits intofeat/export-invoices-pagefrom
feat/export-products-page

Conversation

@paanSinghCoder
Copy link
Contributor

Move products page to @raystack/frontier/admin

Summary

Moved the products UI from apps/admin/src/containers/products.list/ into web/lib/admin/pages/products/ as router-agnostic pages. The admin app wires routing via thin wrappers and callbacks.

Changes

  • Lib

    • Products list + detail: web/lib/admin/pages/products/index.tsx, details.tsx, header.tsx, columns.tsx, products.module.css, types.tsx.
    • Product prices: web/lib/admin/pages/products/prices/index.tsx, columns.tsx.
    • Exported from @raystack/frontier/admin:
      • ProductsPage — optional props: selectedProductId, onSelectProduct, onCloseDetail, onNavigateToPrices, appName.
      • ProductPricesPage — optional props: productId, appName, onBreadcrumbClick.
    • Product details "Go to prices" and breadcrumb "Product list" use callbacks (onNavigateToPrices, onBreadcrumbClick) so the lib stays router-agnostic.
  • App

    • ProductsPageWithRouter — uses useParams / useNavigate, passes onSelectProduct, onCloseDetail, onNavigateToPrices.
    • ProductPricesPageWithRouter — uses useParams / useNavigate, passes onBreadcrumbClick for breadcrumb navigation.
    • Routes wired to these wrappers:
      • products → product list (with optional detail sheet).
      • products/:productId → product list with detail for productId.
      • products/:productId/prices → product prices.
    • Removed containers/products.list; products UI now lives in the lib.

Note

To test locally, set the frontier dependency to the workspace package in frontier/web/apps/admin/package.json:

"@raystack/frontier": "workspace:^"

Technical details

  • Lib build and type checking pass.
  • No change to product list / detail / prices behavior; only extraction to lib and routing via callbacks.

Test plan

  • Manual: product list, row click → detail sheet, "Go to prices" → prices page, breadcrumb "Product list" → back to list.
  • Build and type checking pass for lib and admin app.

@vercel
Copy link

vercel bot commented Jan 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Feb 3, 2026 0:34am

@paanSinghCoder paanSinghCoder self-assigned this Jan 31, 2026
@paanSinghCoder paanSinghCoder added the Do not merge Label to indicate that the PR is not ready to be merged even though might be (or not) approvals. label Jan 31, 2026
@coveralls
Copy link

coveralls commented Jan 31, 2026

Pull Request Test Coverage Report for Build 21629945937

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 37.983%

Totals Coverage Status
Change from base Build 21629889516: 0.0%
Covered Lines: 15956
Relevant Lines: 42008

💛 - Coveralls

@paanSinghCoder paanSinghCoder removed the Do not merge Label to indicate that the PR is not ready to be merged even though might be (or not) approvals. label Feb 3, 2026
@paanSinghCoder paanSinghCoder requested a review from rsbh February 3, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants