Fix shared-front boxes-items toggle - #2896
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2896 +/- ##
==========================================
+ Coverage 73.70% 74.06% +0.35%
==========================================
Files 330 330
Lines 25325 25383 +58
Branches 2486 2520 +34
==========================================
+ Hits 18667 18800 +133
+ Misses 6607 6533 -74
+ Partials 51 50 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The new public selector lacks an accessible name.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Fixes the public statistics inventory-unit toggle and consolidates unit types.
Changes:
- Synchronizes the public Boxes/Items selector with
sboi. - Standardizes on
BoxesOrItemsCount. - Removes obsolete selector and sharing-alert plumbing.
File summaries
| File | Description |
|---|---|
shared-front/src/App.tsx |
Implements the public unit selector. |
shared-components/statviz/hooks/useShareableLink.ts |
Removes obsolete unit state. |
shared-components/statviz/dashboard/StockOverview.tsx |
Uses the shared count type. |
shared-components/statviz/dashboard/MovedBoxes.tsx |
Uses the shared count type. |
shared-components/statviz/components/visualizations/stock/StockOverviewRingFilterContainer.tsx |
Updates the unit prop type. |
shared-components/statviz/components/visualizations/stock/StockOverviewRingDataContainer.tsx |
Updates the unit prop type. |
shared-components/statviz/components/visualizations/stock/StockOverviewBarsFilterContainer.tsx |
Updates the unit prop type. |
shared-components/statviz/components/visualizations/stock/StockOverviewBarsDataContainer.tsx |
Updates the unit prop type. |
shared-components/statviz/components/visualizations/movedBoxes/ShipmentsPieChart.tsx |
Updates the unit prop type. |
shared-components/statviz/components/visualizations/movedBoxes/ShipmentsOverTimeChart.tsx |
Updates the unit prop type. |
shared-components/statviz/components/visualizations/movedBoxes/MovedBoxesFilterContainer.tsx |
Updates the unit prop type. |
shared-components/statviz/components/visualizations/movedBoxes/MovedBoxesDataContainer.tsx |
Updates the unit prop type. |
shared-components/statviz/components/visualizations/movedBoxes/MovedBoxesCharts.tsx |
Updates the unit prop type. |
shared-components/statviz/components/visualizations/createdBoxes/BoxCreationCalendarFilterContainer.tsx |
Updates the unit prop type. |
shared-components/statviz/components/visualizations/createdBoxes/BoxCreationCalendarDataContainer.tsx |
Updates the unit prop type. |
shared-components/statviz/components/ShareableLinkAlert.tsx |
Removes unit-specific alert text. |
shared-components/statviz/components/LinkSharingSection.tsx |
Removes the obsolete unit prop. |
shared-components/statviz/components/filter/BoxesOrItemsSelect.tsx |
Deletes the superseded selector. |
Review details
- Files reviewed: 18/18 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
@copilot I need tests for shared-front/src/App.tsx using vitest.
Cover the following test cases (for the first three, no data shall be displayed):
Tell me the reasoning effort you applied. |
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
Added While writing the tests I found a real bug they exposed: I did not wire the tests into - run:
name: Test shared-front and create reports
when: always
command: |
DEBUG_PRINT_LIMIT=10000 pnpm -C ../shared-front test:coverage --test-timeout=40000
- store_test_results:
path: ../shared-front/coverage/junit.xml
- store_artifacts:
path: ../shared-front/coverage
destination: shared-front-coverage
- codecov/upload:
flags: sharedFront
files: ../shared-front/coverage/coverage-final.json
plugins: noopLet me know if you'd like me to apply this and I will. Reasoning effort applied: medium. |
https://trello.com/c/e4CviUgY
This fixes the non-functional boxes-items toggle in the public FE, and cleans up the usage of BoxesOrItems/BoxesOrItemsCount types.