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

Nutrition extraction (followup) #6412

Open
7 tasks
teolemon opened this issue Mar 3, 2025 · 9 comments
Open
7 tasks

Nutrition extraction (followup) #6412

teolemon opened this issue Mar 3, 2025 · 9 comments

Comments

@teolemon
Copy link
Member

teolemon commented Mar 3, 2025

  • the banner of nutrition extraction has no shadow
  • there is a mistake in the translation of the banner of nutrition extraction
  • The "NEW: xxx" will force us to translate 2x, the day we remove the label
  • traces is not supported (needs dart update)
  • > < support (needs dart update)
  • . or , (can be done immediately)
  • you sometimes get a "g" in the output (no actual consequences)
@PrimaelQuemerais
Copy link
Member

I started fixing some of these issues. Here's a recap and some questions.

I'm skipping the banner shadow as we are talking about using the same layout as the ingredients extraction instead of a banner.

What does "traces" mean in regards to nutritional information? Where can I find an example of product with such traces?

The 'g' in the output is actual unit as accepting the recommendation also affects the unit. It is not present for Energy (KJ and Kcal) as the unit cannot be change. Do we need to change the layout to make it more understandable?

@teolemon
Copy link
Member Author

teolemon commented Mar 6, 2025

@PrimaelQuemerais @g123k there's the question of showing only the prompt if we have actual values available. We did some testing with @alexgarel , and that was his first remark.

@PrimaelQuemerais
Copy link
Member

We can do something like this but then there is no point in showing the prompt as the query has already been done, we can show the suggestions directly.
Moreover, @g123k is working on implementing the same interface as for ingredients extraction. In that case The extraction UI will be more prominent even if there is not suggestion available. Perhaps this means we should reconsider if the new layout is relevant?

@teolemon
Copy link
Member Author

teolemon commented Mar 8, 2025

To clarify:
The point in the chips is granular control, especially on large tables.
It keeps the user in control, and allows for progressive fixing.
The extract and replace everything is brutal, with a all or nothing approach.

@teolemon
Copy link
Member Author

Screenshot_20250314-083957.png

Screenshot_20250314-083626.png

@g123k
Copy link
Collaborator

g123k commented Mar 14, 2025

This is the bug I mentioned yesterday.
Don't worry, I know it :)

There is also one, when you edit a field and suddenly a suggestion appears.

@PrimaelQuemerais
Copy link
Member

I will fix the issue with dots and commas

@PrimaelQuemerais
Copy link
Member

@teolemon
I don't understand how you were able to input these values. Or Was it already existing values from the server?
The text field has this formatter :

inputFormatters: <TextInputFormatter>[
  FilteringTextInputFormatter.allow(
    SimpleInputNumberField.getNumberRegExp(
      decimal: true,
    ),
  ),
  DecimalSeparatorRewriter(decimalNumberFormat),
],

I was not able to input such values using the keyboard or by copy pasting

@g123k
Copy link
Collaborator

g123k commented Mar 19, 2025

@teolemon I don't understand how you were able to input these values. Or Was it already existing values from the server? The text field has this formatter :

inputFormatters: <TextInputFormatter>[
  FilteringTextInputFormatter.allow(
    SimpleInputNumberField.getNumberRegExp(
      decimal: true,
    ),
  ),
  DecimalSeparatorRewriter(decimalNumberFormat),
],

I was not able to input such values using the keyboard or by copy pasting

This is when the Robotoff answer is added.
TextInputFormatters are only used with keyboard inputs and copy/paste

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 💬 To discuss and validate
Development

No branches or pull requests

3 participants