Skip to content

feat: Add More verbose proof display #6589

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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

AshutoshKhadse23
Copy link
Contributor

Closes: #6588

Added:

  • type (receipt, price tag, ...)
  • number of prices
  • location
  • date (that's the only data we used to display)
  • currency
  • timestamp
Screenshot 2025-05-09 at 11 56 25 PM

@codecov-commenter
Copy link

codecov-commenter commented May 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 107 lines in your changes missing coverage. Please review.

Project coverage is 5.71%. Comparing base (4d9c7fc) to head (c217d2a).
Report is 894 commits behind head on develop.

Files with missing lines Patch % Lines
...mooth_app/lib/pages/prices/price_proof_widget.dart 0.00% 101 Missing ⚠️
...mooth_app/lib/pages/prices/currency_extension.dart 0.00% 3 Missing ⚠️
...mooth_app/lib/pages/prices/prices_proofs_page.dart 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #6589      +/-   ##
==========================================
- Coverage     9.54%   5.71%   -3.84%     
==========================================
  Files          325     511     +186     
  Lines        16411   30514   +14103     
==========================================
+ Hits          1567    1744     +177     
- Misses       14844   28770   +13926     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AshutoshKhadse23
Copy link
Contributor Author

Hello @monsieurtanuki,
Does it now look good(code)?

Screenshot:
Screenshot 2025-05-10 at 11 29 11 AM

@monsieurtanuki
Copy link
Contributor

@AshutoshKhadse23 Not 100%.
It should look similar to product chips:

  • the count should be like the "24"
  • the timestamp should be like "4d"
  • the date should be a simple text
  • the location should be like "monoprix"
  • your currency looks ok
  • I have no idea where you picked that "generic" label - it must reflect the type which is either "receipt" or "price tag". And no icon for that, please.

Screenshot_20250510_092824

@teolemon
Copy link
Member

Can we press pause ?
I actually would like both the product and proof chips to look much better that the web version (and much closer to the rest of the app)
Currently, It's a nightmare to parse cognitively.
I think they

  • should look more like regular product cards
  • have more predictable placement of items
  • avoid repeating things if they can be mutualized in a header, or grouped
  • avoid jargon
  • (Unsolved) We have to find ways to make the brand clickable that don't turn the card into a Christmas tree.
  • "Generic" doesn't mean anything to normal people.
  • The icon should try to match the actual currency (we do that at least in one place in the app)

I kind of liked the order and density @AshutoshKhadse23 was bringing, with aligned information.
@g123k has a plan to improve the list with personal attributes,
image

Here's a quick sketch I did:
image

@monsieurtanuki
Copy link
Contributor

@AshutoshKhadse23 From now on please follow @teolemon's suggestions, comments and reviews on this PR. He has higher expectations regarding UI.

@AshutoshKhadse23
Copy link
Contributor Author

Can we press pause ? I actually would like both the product and proof chips to look much better that the web version (and much closer to the rest of the app) Currently, It's a nightmare to parse cognitively. I think they

  • should look more like regular product cards
  • have more predictable placement of items
  • avoid repeating things if they can be mutualized in a header, or grouped
  • avoid jargon
  • (Unsolved) We have to find ways to make the brand clickable that don't turn the card into a Christmas tree.
  • "Generic" doesn't mean anything to normal people.
  • The icon should try to match the actual currency (we do that at least in one place in the app)

I kind of liked the order and density @AshutoshKhadse23 was bringing, with aligned information. @g123k has a plan to improve the list with personal attributes, image

Here's a quick sketch I did: image

@teolemon ,Ok then I will work on it and push the work as early as possible

@AshutoshKhadse23
Copy link
Contributor Author

@AshutoshKhadse23 From now on please follow @teolemon's suggestions, comments and reviews on this PR. He has higher expectations regarding UI.

Ok @monsieurtanuki

@AshutoshKhadse23
Copy link
Contributor Author

Can we press pause ? I actually would like both the product and proof chips to look much better that the web version (and much closer to the rest of the app) Currently, It's a nightmare to parse cognitively. I think they

  • should look more like regular product cards
  • have more predictable placement of items
  • avoid repeating things if they can be mutualized in a header, or grouped
  • avoid jargon
  • (Unsolved) We have to find ways to make the brand clickable that don't turn the card into a Christmas tree.
  • "Generic" doesn't mean anything to normal people.
  • The icon should try to match the actual currency (we do that at least in one place in the app)

I kind of liked the order and density @AshutoshKhadse23 was bringing, with aligned information. @g123k has a plan to improve the list with personal attributes, image

Here's a quick sketch I did: image

@teolemon,
What should we do with price count do you want it to be button or what??

@AshutoshKhadse23
Copy link
Contributor Author

AshutoshKhadse23 commented May 11, 2025

@teolemon,@monsieurtanuki
Now this is how new UI looks like:
Screenshot 2025-05-11 at 11 53 44 AM

@teolemon
Copy link
Member

@AshutoshKhadse23 how come all the locations are unknown ? Is it possible to add a proof without one ? @raphodn @TTalex

@teolemon
Copy link
Member

Also, since we now have infinite scrolling, we probably don't need : "Latest 13 prices (total: 13) (2 2)" anymore

@AshutoshKhadse23
Copy link
Contributor Author

@AshutoshKhadse23 how come all the locations are unknown ? Is it possible to add a proof without one ? @raphodn @TTalex

@teolemon,
The unknown location occurs when you select online while creating proof

Screenshot 2025-05-11 at 2 10 48 PM

@AshutoshKhadse23
Copy link
Contributor Author

@AshutoshKhadse23 how come all the locations are unknown ? Is it possible to add a proof without one ? @raphodn @TTalex

Yes it is possible if you press done after the proof section is completed.

@AshutoshKhadse23
Copy link
Contributor Author

the

Ok I will make the changes

@teolemon
Copy link
Member

@AshutoshKhadse23 doesn't the API return online ? If so we should display online ? Otherwise, it might make sense to evolve the API.

@AshutoshKhadse23
Copy link
Contributor Author

@AshutoshKhadse23 doesn't the API return online ? If so we should display online ? Otherwise, it might make sense to evolve the API.

See this is the response I got from Proof class

[PriceProof] ===== PRICE PROOF DETAILS =====
[PriceProof] ID: 31552
[PriceProof] Type: priceTag
[PriceProof] Created: 2025-05-11 08:13:02.873834Z
[PriceProof] Date: 2025-05-11 00:00:00.000
[PriceProof] Currency: INR (₹)
[PriceProof] Location: maharastra vidya mandal
[PriceProof] Price Count: 0
[PriceProof] Image URL: https://prices.openfoodfacts.org/img/0072/qzRAwBSNoN.webp
[PriceProof] ==============================
[PriceProof] ===== PRICE PROOF DETAILS =====
[PriceProof] ID: 31527
[PriceProof] Type: receipt
[PriceProof] Created: 2025-05-10 19:19:50.707568Z
[PriceProof] Date: 2025-04-29 00:00:00.000
[PriceProof] Currency: INR (₹)
[PriceProof] Location: unknown
[PriceProof] Price Count: 0
[PriceProof] Image URL: https://prices.openfoodfacts.org/img/0072/90jO3tZBPb.webp
[PriceProof] ==============================
[PriceProof] ===== PRICE PROOF DETAILS =====
[PriceProof] ID: 30485
[PriceProof] Type: priceTag
[PriceProof] Created: 2025-05-07 12:23:49.134309Z
[PriceProof] Date: 2024-05-07 00:00:00.000
[PriceProof] Currency: INR (₹)
[PriceProof] Location: unknown
[PriceProof] Price Count: 0
[PriceProof] Image URL: https://prices.openfoodfacts.org/img/0069/nmSyYOjXJH.webp
[PriceProof] ==============================
[PriceProof] ===== PRICE PROOF DETAILS =====
[PriceProof] ID: 30484
[PriceProof] Type: priceTag
[PriceProof] Created: 2025-05-07 12:23:25.785900Z
[PriceProof] Date: 2024-10-18 00:00:00.000
[PriceProof] Currency: INR (₹)
[PriceProof] Location: unknown
[PriceProof] Price Count: 0
[PriceProof] Image URL: https://prices.openfoodfacts.org/img/0069/Se8ju5Od75.webp
[PriceProof] ==============================

@monsieurtanuki
Copy link
Contributor

Also, since we now have infinite scrolling, we probably don't need : "Latest 13 prices (total: 13) (2 2)" anymore

@teolemon Dealt with in #6620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

More verbose proof display
4 participants