openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
641 stars 373 forks source link

Omega 6 and 9 placement in table #8395

Open aleene opened 1 year ago

aleene commented 1 year ago

Describe the bug

The fats Omega 6 and 9 appear now as a separate row, the could be place under other fats.

To Reproduce

See this product: https://world.openfoodfacts.org/product/3329489000309/huile-d-olive-bio-vierge-extra-100-espagne-1l-grand-olio

Expected behavior

Put Omega 6 under polyunsaturated fats Put Omega 9 under monounsaturated dats

Screenshots

No response

Additional context

No response

Type of device

Browser

Browser version

No response

Number of products impacted

No response

Time per product

No response

alexgarel commented 1 year ago

It might be linked to %nutriments_tables in Food.pm

It seems to use dashes ("-", "--") to set a kind of hierarchy, but I don't know if 3 level hierarchy is possible, "---" as omega-3 and omega-6 seems to have sub items.)

Tanujgarg37 commented 1 year ago

It might be linked to %nutriments_tables in Food.pm

It seems to use dashes ("-", "--") to set a kind of hierarchy, but I don't know if 3 level hierarchy is possible, "---" as omega-3 and omega-6 seems to have sub items.)

Can you plz elaborate

alexgarel commented 1 year ago

Hi @Tanujgarg37 sorry for late reply.

But I think you may have to deep dive into the javascript that builds the table. I think the %nutriments_tables in Food.pm is the one that drives the way nutriments are presented. I added a comment not so long ago, it might help you. See https://github.com/openfoodfacts/openfoodfacts-server/blob/main/lib/ProductOpener/Food.pm#L336

Tanujgarg37 commented 1 year ago

Sure I will look into it

On Thu, Jul 27, 2023, 8:12 PM Alex Garel @.***> wrote:

Hi @Tanujgarg37 https://github.com/Tanujgarg37 sorry for late reply.

But I think you may have to deep dive into the javascript that builds the table. I think the %nutriments_tables in Food.pm is the one that drives the way nutriments are presented. I added a comment not so long ago, it might help you. See https://github.com/openfoodfacts/openfoodfacts-server/blob/main/lib/ProductOpener/Food.pm#L336

— Reply to this email directly, view it on GitHub https://github.com/openfoodfacts/openfoodfacts-server/issues/8395#issuecomment-1653762637, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU5CCEKTRGMKK6LKQPFFXKLXSJ433ANCNFSM6AAAAAAXVQBHJU . You are receiving this because you were mentioned.Message ID: @.***>

owais0017 commented 1 year ago

Assign this to me. i am already working on another issue related the to the same table, i have a good understanding of the table. can you please assign the issue to me?

Tanujgarg37 commented 1 year ago

Sorry I will do it by myself

On Sun, Aug 13, 2023, 10:34 PM owais fayaz @.***> wrote:

Assign this to me. i am already working on another issue related the to the same table, i have a good understanding of the table. can you please assign the issue to me?

— Reply to this email directly, view it on GitHub https://github.com/openfoodfacts/openfoodfacts-server/issues/8395#issuecomment-1676413888, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU5CCEPB2GVEAHP4LIETDE3XVECK3ANCNFSM6AAAAAAXVQBHJU . You are receiving this because you were mentioned.Message ID: @.***>

github-actions[bot] commented 10 months ago

This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts

aleene commented 9 months ago

see #9569