feat: rework ManageProducts page#2713
Conversation
Agent-Logs-Url: https://github.com/boxwise/boxtribute/sessions/73a33b69-6133-459d-b956-71436ee4065a Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
…te, add toggle Agent-Logs-Url: https://github.com/boxwise/boxtribute/sessions/73a33b69-6133-459d-b956-71436ee4065a Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
Agent-Logs-Url: https://github.com/boxwise/boxtribute/sessions/73a33b69-6133-459d-b956-71436ee4065a Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2713 +/- ##
==========================================
- Coverage 76.83% 76.74% -0.09%
==========================================
Files 300 301 +1
Lines 22233 22257 +24
Branches 2245 2246 +1
==========================================
Hits 17082 17082
- Misses 5104 5127 +23
- Partials 47 48 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pylipp
left a comment
There was a problem hiding this comment.
@copilot I need one change and one addition
- make the label "Show only ASSORT products" in regular instead of bold font
- in both ProductsTable and StandardProductsTable, group the rows by category. The table display should become "nested", with a "category" row above its child product rows. Move the "category" column to the left-most position in the table, and hide it for the child rows. Table sorting should be applied per category. As a bonus, the child rows should be collabsable by clicking the parent category row
- make sure the type checking, eslint, prettier, build and tests pass
- don't update the PR description
Done in commit
|
6654e74 to
90b49fc
Compare
There was a problem hiding this comment.
Pull request overview
This PR reworks the frontend “Manage Products” experience by removing the tabbed split between base products and ASSORT standard products, introducing a dedicated ASSORT route/view, and adding a client-side toggle to filter the products table to standard (ASSORT) products.
Changes:
- Replace the tabbed Manage Products layout with a single products view plus a link to a new ASSORT standard products route.
- Add
StandardProductsViewand route it at/bases/:baseId/products/assortbehind the existingmanage_productspermission gate. - Add a “Show only ASSORT products” toggle to
ProductsTablethat filters displayed rows toisStandardproducts.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pnpm-lock.yaml |
Updates lockfile for the Jotai dependency bump used by the frontend. |
front/src/views/Products/StandardProductsView.tsx |
Adds a new dedicated ASSORT standard products view with back navigation and an error boundary. |
front/src/views/Products/ProductsView.tsx |
Removes the old tabbed layout and adds a link to the new ASSORT view; wraps products in ErrorBoundary + Suspense. |
front/src/views/Products/components/ProductsTable.tsx |
Adds a Switch-based toggle to filter the table to standard (ASSORT) products. |
front/src/App.tsx |
Introduces the new /products/assort route under the existing products route group. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Summary
Reworks the ManageProducts page as described in the problem statement.
Changes
ProductsView.tsxProductsContainerdirectly withErrorBoundary+Suspense/bases/:baseId/products/assortStandardProductsView.tsx(new file)/bases/:baseId/products/assortStandardProductsContainerwrapped inErrorBoundaryApp.tsxassortroute underproductspointing toStandardProductsView(samemanage_productspermission,minBeta: 4)ProductsTable.tsxSwitch) to the left of theColumnSelector, with a regular-weight labelrow.original.isStandard === trueColumnSelectorStandardProductsTable.tsxColumnSelectorProductsContainer.tsx/StandardProductsContainer.tsxcategorycolumn moved to the left-most position in both column definitionscategoryadded tohiddenColumnsso it is only shown as a group header, not in the table header or child rowsValidation
pnpm check-types)pnpm lint:all)pnpm format:check:all)pnpm test:coverage)pnpm build)