Skip to content
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

fix: Do not select logos with a value #684

Merged
merged 2 commits into from
Jul 24, 2023

Conversation

alexfauquette
Copy link
Member

Fix slack message

Two related issues with logo annotation:

  1. Selecting a range of logos will toggle any logos in the range, regardless of whether or not they already have a value. Since the button is disabled if they have an annotation, they can't be deselected by clicking on them.

Cause: Whether or not the logo has an annotation is not checked at this line:

shouldBeSet[logo.id]

Solution: Add && logo.annotation_type === null && logo.annotation_value === null

  1. "Select all" have a similar issue, this time only if the annotation type has an empty value.

Cause: Only whether or not there is a value is checked at this line:

if (logo.annotation_value === null) {

Solution: Add && logo.annotation_type === null

@alexfauquette alexfauquette merged commit 3792552 into openfoodfacts:master Jul 24, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants