Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Barcode scanning #8732

Merged
merged 46 commits into from
Dec 28, 2024
Merged

Conversation

SchrodingersGat
Copy link
Member

@SchrodingersGat SchrodingersGat commented Dec 20, 2024

Overview

This PR implements the "quick scan" dialog functionality in the new user interface, as well as refactoring / further features for the "barcode actions" page.

The "scan barcode" dialog has now been refactored into a common component, with support for:

  • Camera scanning
  • USB scanning
  • Raw keyboard input

Related Issues

TODO

  • Playwright testing
  • Improved documentation
  • Prevent duplicate scans
  • Fix issue deleting "last" item (or all items at once)

Future Work

  • Implement some actions

@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature barcode Barcode scanning and integration refactor Platform UI Related to the React based User Interface labels Dec 20, 2024
@SchrodingersGat SchrodingersGat added this to the 1.0.0 milestone Dec 20, 2024
Copy link

netlify bot commented Dec 20, 2024

Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit b441e3f
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/676fb65b9a0eb60008465dc8
😎 Deploy Preview https://deploy-preview-8732--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 86 (no change from production)
Best Practices: 100 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 60.62992% with 100 lines in your changes missing coverage. Please review.

Project coverage is 85.24%. Comparing base (0765b00) to head (b441e3f).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...end/src/components/barcodes/BarcodeCameraInput.tsx 32.25% 38 Missing and 4 partials ⚠️
src/frontend/src/functions/api.tsx 12.50% 19 Missing and 2 partials ⚠️
src/frontend/src/pages/Index/Scan.tsx 59.45% 12 Missing and 3 partials ⚠️
...tend/src/components/barcodes/BarcodeScanDialog.tsx 76.66% 5 Missing and 2 partials ⚠️
src/frontend/src/components/barcodes/QRCode.tsx 50.00% 3 Missing and 1 partial ⚠️
...c/frontend/src/tables/general/BarcodeScanTable.tsx 83.33% 3 Missing and 1 partial ⚠️
.../frontend/src/components/barcodes/BarcodeInput.tsx 91.30% 0 Missing and 2 partials ⚠️
...d/src/components/barcodes/BarcodeKeyboardInput.tsx 85.71% 2 Missing ⚠️
src/frontend/src/hooks/UseTable.tsx 50.00% 0 Missing and 2 partials ⚠️
src/frontend/src/tables/InvenTreeTable.tsx 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8732      +/-   ##
==========================================
+ Coverage   85.18%   85.24%   +0.05%     
==========================================
  Files        1173     1174       +1     
  Lines       51565    51548      -17     
  Branches     2094     2076      -18     
==========================================
+ Hits        43926    43942      +16     
+ Misses       7131     7084      -47     
- Partials      508      522      +14     
Flag Coverage Δ
backend 86.94% <100.00%> (+<0.01%) ⬆️
pui 69.29% <60.00%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SchrodingersGat SchrodingersGat changed the title [WIP] Barcode scanning Barcode scanning Dec 27, 2024
@SchrodingersGat SchrodingersGat merged commit 3e73162 into inventree:master Dec 28, 2024
27 checks passed
@SchrodingersGat SchrodingersGat deleted the barcode-scanning branch December 28, 2024 09:39
@matmair
Copy link
Member

matmair commented Dec 28, 2024

@sur5r @saschaludwig this should fix your scanning issues

@matmair
Copy link
Member

matmair commented Dec 28, 2024

Great improvement @SchrodingersGat! Looking very nice

@matmair matmair mentioned this pull request Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
barcode Barcode scanning and integration enhancement This is an suggested enhancement or new feature Platform UI Related to the React based User Interface refactor
Projects
None yet
2 participants