openfoodfacts / facets-knowledge-panels

Providing knowledge panels for a particular open food fact facet (category, brand, etc...)
https://openfoodfacts.github.io/facets-knowledge-panels/
GNU Affero General Public License v3.0
5 stars 7 forks source link

Add deep link to the Hunger Games logo game #80

Open teolemon opened 1 year ago

teolemon commented 1 year ago

Problem

Add deep links to the Hunger Games logo game, now that it's really performant

What

sumit-158 commented 1 year ago

@teolemon @alexfauquette can't we unify URL params that would make things easier to implement? eg:

  1. for question hunger game URL params look like "type=category&value_tag=en%3Abeers"
  2. for the hunger Games logo game URL params look like "type=brand&value=ikea"
  3. for product search "tag=toto&tagtype=brands"
alexfauquette commented 1 year ago

unify URL

I'm not sure to understand the example you provided. Could you please propose a diff about what are and should be URL params? For example if it's currently value and you would like it to work with value_tag. It would help to know how problematic it is

-type=category&value=en:beers
+type=category&value_tag=en:beers

make things easier to implement

To give you some context from hunger games side, some games are more than 4 years old, so I don't know who linked to them, so I need them to stay consistent over time.

Depending on how many modifications are to do, it could be easier to have a getLinksToHungerGame function that translates your internal data to url params than to support multiple params naming for a same value in hunger games.

sumit-158 commented 1 year ago

I'm not sure to understand the example you provided. Could you please propose a diff about what are and should be URL params? For example if it's currently value and you would like it to work with value_tag. It would help to know how problematic it is

-type=category&value=en:beers
+type=category&value_tag=en:beers

I mean to say having the same parameter pattern maybe this one type=category&value_tag=en:beers for logo and product game.

teolemon commented 9 months ago

The blocking PR has been merged. We just agreed with @raphael0202 that this feature would be really nice to have