Skip to content

feat: Nutripatrol web components #68

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

KarruHarin
Copy link

@KarruHarin KarruHarin commented Mar 29, 2025

What

we can integrate this same nutriPatrol component into photoManager , productPage , searchResults , by just changing the type just like @teolemon asked for .
This is the basic structure of our web component :


followed the api structure :

image

For now I am having cors error as I am running it locally and cant post to nutripatrol api .

Screenshot

Recording.2025-03-30.000453.mp4

Fixes bug(s)

openfoodfacts/openfoodfacts-explorer#178

Part of

#29

@teolemon @Kout95 looking forward for your feedback :) .

I am ready to make any modifications to the code to meet any additional requirements !

@Kout95
Copy link
Collaborator

Kout95 commented Mar 31, 2025

@KarruHarin Hey !
Thanks for your contribution I will check it more tomorrow

@Kout95
Copy link
Collaborator

Kout95 commented Mar 31, 2025

@teolemon Question, do we want to have the same button everywhere or just a web component that opens a form to send a report?

Comment on lines +135 to +141
{ value: "inappropriate", label: msg("Inappropriate content") },
{ value: "human", label: msg("Contains identifiable person") },
{ value: "beauty", label: msg("Beauty product (not food)") },
{ value: "image_to_delete_spam", label: msg("Spam") },
{ value: "image_to_delete_face", label: msg("Shows face") },
{ value: "other", label: msg("Other issue") },
]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have option in API @teolemon ?

}
}

static override styles = css`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move css in top of component

@Kout95
Copy link
Collaborator

Kout95 commented Mar 31, 2025

Use npm run translations:extract for translations :)

@KarruHarin
Copy link
Author

KarruHarin commented Mar 31, 2025

@Kout95 I have made the required changes ! Would be glad if you check and review them ! Thanks :)

@KarruHarin KarruHarin requested a review from Kout95 April 1, 2025 12:42
@teolemon teolemon changed the title Nutripatrol web components feat: Nutripatrol web components Apr 4, 2025
Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KarruHarin Can you replace all the *.xlf files by the ones from main, except for any changes in en.xlf. Crowdin automatically replicates once PRs are merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready
Development

Successfully merging this pull request may close these issues.

3 participants