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

refactor(ContributionAssistant): More UX tweaks following feedback #1039

Merged
merged 7 commits into from
Nov 17, 2024

Conversation

TTalex
Copy link
Collaborator

@TTalex TTalex commented Nov 14, 2024

What

  • Display detected barcode below product suggestion, to compare
  • Show more cols on larger screens
  • Hide "price per" input when barcode is selected
  • Allow for price removal at the cleanup step, with a trashcan icon
  • Add a 4th step: Summary, with progress bars tracking proof and price uploads and navigation buttons to user profile, added proof or to go back to the image selection step

Screenshots

tweaks
summary

Part of

src/components/ContributionAssistantPriceFormCard.vue Outdated Show resolved Hide resolved
return {
productFormFilled: false,
pricePriceFormFilled: false,
categoryPricePerList: [
Copy link
Member

Choose a reason for hiding this comment

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

note to self: refactor this somehow (used in 3 files)

src/views/ContributionAssistant.vue Outdated Show resolved Hide resolved
src/views/ContributionAssistant.vue Outdated Show resolved Hide resolved
@@ -16,12 +24,20 @@
/>
<v-card-text>
<ProductInputRow :productForm="productPriceForm" :disableInitWhenSwitchingModes="true" @filled="productFormFilled = $event" />
<v-alert
Copy link
Member

Choose a reason for hiding this comment

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

last bit missing, is to set the mode as barcode if a product_code is detected ?? or is there many false-positives ?

Copy link
Collaborator Author

@TTalex TTalex Nov 15, 2024

Choose a reason for hiding this comment

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

Sorry, didn't understand this comment.

But maybe this context helps: gemini always tries its best to set a value to all fields. So its reply almost always contains a barcode, even when no barcodes were in the image (it likes to put the price in the barcode field for these cases)

Related fun fact: I've noticed it also does something similar with origin countries that are not in its enum set, replacing it with countries that are close geographically or culturally. For example, if its set includes CHINA and BRAZIL, and the read origin is CHILE, it tends to reply with BRAZIL, instead of the closer word CHINA, which is surprising (and pretty cool).

Copy link
Member

@raphodn raphodn Nov 16, 2024

Choose a reason for hiding this comment

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

its to avoid the click to select "barcode" instead of "category" (category is selected by default ?).
and users are lost or don't necessarily know that the barcode is hidden behind that mode

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So the suggestion is to have "barcode" selected by default instead of "category" ?

I wonder if users would also get lost for crops without barcodes, with gemini putting a random number as barcode, and users not knowing that the category is hidden behind the other mode.

Copy link
Member

@raphodn raphodn Nov 16, 2024

Choose a reason for hiding this comment

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

I need to take a closer look at the gemini response, if the barcode field is always returned.

Or maybe couple gemini with a classifier ? That would tell us if the image is a barcode or a category ??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's probably a way of modifying the prompt, asking specifically for EAN13 barcodes or empty strings. It might even lead to better parsing results !

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See #1042

@TTalex
Copy link
Collaborator Author

TTalex commented Nov 16, 2024

I ended up following the advice of moving the proof upload process as the first step.
tweaks

This is more in-lines with other processes of Open Prices (reuses the ProofInputRow components)

It breaks the idea of handling multiple proofs for the same location, but feedback seems to show that this is not how the tool is used.

Moreover, with the multiple-proof upload page in construction, I guess the process will be to use this feature to add many proofs for a store at once, then use the contribution assistant on the existing proofs.

Using recent proofs skips the compression and proof upload process, which slows down the assistant quite a lot.

Finally, I also fully disabled the possibility of going back when we reach the summary step (after price upload). The only way to add a new proof is to press the corresponding button that refreshes the page.

summary

@TTalex TTalex merged commit f25f6c7 into master Nov 17, 2024
6 of 7 checks passed
@TTalex TTalex deleted the ttalex/contribution-assistant-tweaks branch November 17, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants