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

feat: #2248 - user agent distinction between scan and barcode search #2408

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • barcode_product_query.dart: new parameter isScanned to distinguish scan and barcode search via the user agent comment field
  • continuous_scan_model.dart: "this IS a scan"
  • product_dialog_helper.dart: "this is NOT a scan"
  • product_query.dart: new method to set the user agent comment field

What

  • Barcode scan and barcode search use the same search URL.
  • We were asked to distinguish them via the user agent.
  • The user agent comment will be different, and will be either 'scan' or 'search'.

Fixes bug(s)

…rcode search

Impacted files:
* `barcode_product_query.dart`: new parameter `isScanned` to distinguish scan and barcode search via the user agent comment field
* `continuous_scan_model.dart`: "this IS a scan"
* `product_dialog_helper.dart`: "this is NOT a scan"
* `product_query.dart`: new method to set the user agent comment field
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner June 28, 2022 06:18
@codecov-commenter
Copy link

Codecov Report

Merging #2408 (c3e6f2f) into develop (2ea0da3) will decrease coverage by 1.32%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           develop   #2408      +/-   ##
==========================================
- Coverage     8.86%   7.53%   -1.33%     
==========================================
  Files          161     204      +43     
  Lines         6623    9751    +3128     
==========================================
+ Hits           587     735     +148     
- Misses        6036    9016    +2980     
Impacted Files Coverage Δ
...kages/smooth_app/lib/widgets/attribute_button.dart 0.00% <0.00%> (-92.00%) ⬇️
...s/smooth_app/lib/data_models/user_preferences.dart 8.73% <0.00%> (-23.57%) ⬇️
packages/smooth_app/lib/themes/smooth_theme.dart 60.00% <0.00%> (-22.98%) ⬇️
...p/lib/generic_lib/dialogs/smooth_alert_dialog.dart 15.29% <0.00%> (-18.92%) ⬇️
...mooth_app/lib/data_models/product_preferences.dart 24.65% <0.00%> (-6.78%) ⬇️
packages/smooth_app/lib/main.dart 14.40% <0.00%> (-3.49%) ⬇️
.../smooth_app/lib/pages/onboarding/welcome_page.dart 0.00% <0.00%> (-3.13%) ⬇️
.../smooth_app/lib/pages/onboarding/scan_example.dart 0.00% <0.00%> (-2.28%) ⬇️
...p/lib/pages/onboarding/consent_analytics_page.dart 0.00% <0.00%> (-1.57%) ⬇️
...smooth_app/lib/pages/product/new_product_page.dart 0.00% <0.00%> (-0.88%) ⬇️
... and 203 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c1821d...c3e6f2f. Read the comment docs.

@teolemon teolemon added 🔎 Search 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… network labels Jun 28, 2022
@monsieurtanuki monsieurtanuki merged commit c1664d6 into openfoodfacts:develop Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
network 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… 🔎 Search
Development

Successfully merging this pull request may close these issues.

Sending a more explicit header when doing a scan/query from Smoothie
3 participants