openfoodfacts / open-prices-frontend

A vue.js front-end for Open Prices
25 stars 13 forks source link

Dashboard: easy access to My Locations and My Products #943

Open serpico opened 1 week ago

serpico commented 1 week ago

Problem

I welcome the revamp of the dashboard page (#878). I was thinking it could be useful to allow an easier access to those pages from the dashboard page using buttons similar to the current Prices and Proofs, those 2 additional buttons could be located beside/between the current Prices and Proofs, replicating the upper raw on the screenshot but with available actions.

Image

Currently user can only easily access Prices and Proofs but not Locations nor Products.

Clicking My Locations/Locations would show all the user's locations cards, when you remember you bought a product in a specific location so you would want to browse that one and your prices only.

Clicking My Products/Products would show something similar https://prices.openfoodfacts.org/products but showing only products which prices have been added by the user ordered by the biggest number of prices/most added product first.

Alternative solution : no buttons, but advanced filtering for the user to play with, same idea as #839 but extended to user's products and user's locations.

raphodn commented 1 week ago

Good idea !

There is a little complexity, because there is no direct link between users and locations or products (at the contrary of prices and proofs).

But it'll be a good place to test it out :)

raphodn commented 1 week ago

Btw i realised that the proof count is different, for now the user card shows stats for locations and proofs that have at least 1 price.

I need to clarify/homogenize

raphodn commented 1 week ago

Created 2 issues in the backend :

raphodn commented 1 week ago

existential question: what is a user's location ?

serpico commented 1 week ago

existential question: what is a user's location ?

* restrictive: where the user added a price

* wider: where the user added a price or a proof (even without prices)

From the top of my head I'm tempted to say wider, but maybe you already foresee some downside, or while testing/implementing some will surface