Skip to content

By default, hide duplicate prices #2011

@raphael0202

Description

@raphael0202

On the backend, we now detect "duplicate" prices, i.e. price that have the same values for the following fields:

  • type
  • location_id
  • date
  • currency
  • price
  • price_per
  • price_is_discounted
  • price_without_discount
  • discount_type
  • product_code
  • category_tag
  • labels_tags
  • origins_tags

See the issue on the backend repo for more information: openfoodfacts/open-prices#422).

To leverage this new feature on the front-end, we could hide by default the prices that are considered as duplicate.

In the product view (ex: https://prices.openfoodfacts.org/products/0013800105851) and location view (ex: https://prices.openfoodfacts.org/locations/4191), we could add a new filter "Hide duplicate prices" that would be toggled by default.

We should probably display the duplicate prices on other views by keeping the toggle off by default for other views (all prices: https://prices.openfoodfacts.org/prices, proof prices: https://prices.openfoodfacts.org/proofs/65997), to make the job easier for users and moderators to know what prices are linked to a specific proof, and to spot possible issues.

I also think we should be transparent to the user about this filtering step, and display the number of hidden duplicate prices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions