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

(Product addition) Trying to scan non standard barcodes has a disappointing experience #1427

Closed
teolemon opened this issue Mar 31, 2022 · 2 comments · Fixed by #2336
Closed
Assignees
Labels
✏️ Contribution Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion…
Milestone

Comments

@teolemon
Copy link
Member

What

  • Describe the issue clearly

Steps to reproduce the behavior

  1. Scan the Open Food Facts logo
  2. Click on 'Add product'
  3. See error

Expected behavior

It should either

  • let me add non standard barcodes
  • prevent me from adding them

Part of

Screenshot/Mockup/Before-After

image
image

@teolemon teolemon added Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… labels Mar 31, 2022
@teolemon teolemon added this to the V1 milestone May 4, 2022
@g123k
Copy link
Collaborator

g123k commented May 15, 2022

With #1781, these formats are only accepted now:

      BarcodeFormat.ean8,
      BarcodeFormat.ean13,
      BarcodeFormat.upca,
      BarcodeFormat.upce,
      BarcodeFormat.code39,
      BarcodeFormat.code93,
      BarcodeFormat.code128,
      BarcodeFormat.itf,
      BarcodeFormat.codabar,

Is-it still an issue?

@cli1005 cli1005 self-assigned this Jun 13, 2022
@cli1005 cli1005 moved this from To discuss and validate to In Progress in 🤳🥫 The Open Food Facts mobile app (Android & iOS) Jun 13, 2022
@teolemon teolemon modified the milestones: V1, V1.1 Jun 18, 2022
@cli1005
Copy link
Contributor

cli1005 commented Jun 20, 2022

Since Server calls a function normalize_code to verify whether the barcode is valid in the beginning of almost all operations, including searching and uploading.

If the scanned barcode is invalid, the code in FetchedStatus will be empty as follows:
{status: 0, code: , status_verbose: no code or invalid code, product: null}

In this case a little message will show like this to avoid wasting time in creating and uploading :
Image

Please let me know if it is not OK for you, thanks

cli1005 added a commit to cli1005/smooth-app that referenced this issue Jun 20, 2022
cli1005 added a commit to cli1005/smooth-app that referenced this issue Jun 20, 2022
@cli1005 cli1005 moved this from In Progress to Pull Requests in 🤳🥫 The Open Food Facts mobile app (Android & iOS) Jun 20, 2022
teolemon pushed a commit that referenced this issue Jun 22, 2022
* fix: #1427 scan invalid code

* fix: #1427 fix presubmit test
Repository owner moved this from Pull Requests to Done in 🤳🥫 The Open Food Facts mobile app (Android & iOS) Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Contribution Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion…
Development

Successfully merging a pull request may close this issue.

3 participants