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

Replicate the 'Add a single price' view from the Open Prices web app #5195

Closed
Tracked by #5072
teolemon opened this issue May 2, 2024 · 13 comments · Fixed by #5292
Closed
Tracked by #5072

Replicate the 'Add a single price' view from the Open Prices web app #5195

teolemon opened this issue May 2, 2024 · 13 comments · Fixed by #5292
Assignees
Labels
✨ enhancement New feature or request 🎨 Mockups available Some mockups are available for this issue. Please check everything is ok before starting coding. Prices

Comments

@teolemon
Copy link
Member

teolemon commented May 2, 2024

What

Figma mockups

image
https://www.figma.com/file/nFMjewFAOa8c4ahtob7CAB/Mobile-App-Design-(Quentin)?type=design&node-id=5816-22697&mode=design&t=0TyVkM5o0K1vKE0r-0

image
image
image

Part of

@teolemon teolemon added Prices ✨ enhancement New feature or request labels May 2, 2024
@teolemon teolemon changed the title Replicate the 'Add a single price' view from the Open Prices mobile app (https://prices.openfoodfacts.org/app/add) Replicate the 'Add a single price' view from the Open Prices web app May 2, 2024
@teolemon teolemon added the 🎨 Mockups available Some mockups are available for this issue. Please check everything is ok before starting coding. label May 2, 2024
@monsieurtanuki monsieurtanuki self-assigned this May 19, 2024
@monsieurtanuki
Copy link
Contributor

@teolemon Preview of location search:

empty results
Screenshot_1716277229 Screenshot_1716278139

@monsieurtanuki
Copy link
Contributor

@teolemon Rough around the edges, but it does work!

Screenshot_1716452659

In the web app:
image

https://prices.openfoodfacts.org/app/products/3560071052133

Btw I was not logged in. Are we supposed to be logged in for prices?

@teolemon
Copy link
Member Author

  • proof is compulsory
  • login is compulsory

We're in risk otherwise @raphael0202 @raphodn

@teolemon
Copy link
Member Author

@monsieurtanuki you need a currency dropdown

@monsieurtanuki
Copy link
Contributor

  • proof is compulsory
    => already is
  • login is compulsory
    => ok
  • currency dropdown
    => it was in my todo list, as well as the proof type (price tag or receipt)

Shouldn't we also define the source (e.g. web app or Smoothie or whatever)?

@teolemon
Copy link
Member Author

the source is indeed a good idea, not sure openprices supports that @raphodn

@raphodn
Copy link
Member

raphodn commented May 23, 2024

the source is indeed a good idea, not sure openprices supports that @raphodn

Yes good idea ! Though it could easily be forged, no ? Do you already have a similar mecanism in OFF ?

@monsieurtanuki
Copy link
Contributor

In off-dart we use the user agent:

OpenFoodAPIConfiguration.userAgent = UserAgent(
  name: '<Name of your app>',
);

@monsieurtanuki
Copy link
Contributor

@raphodn To be more specific, our user agent data will be used with the following parameters for most GET requests:

  • app_name (the only mandatory parameter)
  • app_version
  • app_uuid
  • app_platform
  • comment

@teolemon
Copy link
Member Author

It's used in conjonction with auth @raphodn
any API user could pass bogus comments, but in practice you'll see the username

@teolemon
Copy link
Member Author

It's mostly used to debug API implementation issues, and identify if newer versions of the clients still have the issue

@raphodn
Copy link
Member

raphodn commented May 24, 2024

Ok I'll look at this today, to add a price.source field (and also a proof.source ?), that stores the user agent's app_name

@monsieurtanuki
Copy link
Contributor

I've just added 3 prices from Smoothie.
I'm about to start the background task, which seems relevant.
Screenshot_20240524_215418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request 🎨 Mockups available Some mockups are available for this issue. Please check everything is ok before starting coding. Prices
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants