-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
UX improvements for creation of new products [OFN-12744] #12760
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great clean up!
±
I have a request to unify the supplier dropdown further.
%span.required * | ||
= f.select :supplier_id, options_from_collection_for_select(@producers, :id, :name, @product.supplier_id), { include_blank: t("spree.admin.products.new.supplier_select_placeholder") }, { "data-controller": "tom-select", class: "primary" } | ||
= f.select :supplier_id, options_from_collection_for_select(@producers, :id, :name, @product.supplier_id), { include_blank: true }, { "data-controller": "tom-select", class: "primary" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the supplier_select_placeholder
be retained?
±
Actually it would be worth using SearchableDropdownComponent
here. This is a template for a tom-select dropdown that has allows searching by typing, which is very helpful when you have a large number to choose from.
It will ensure it is unified with other dropdowns on the Bulk Edit Products page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
cfea5ff
to
5c95fe6
Compare
There is a failing spec here I haven't been able to figure out why it fails sometimes (although I initially wrote it) |
Hey @wandji20 , This looks like this flaky spec. It looks like the failing line (65) is the same as in the issue. So I wonder if rebasing this PR would help? In any case, I've re-opened the issue |
Thanks @filipefurtad0 for sharing updates on the issue.
It's exactly thesame |
It's good practise to remove added event listener to avoid memory leak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, Thanks.
I forgot to finish my review last week, so I went ahead and did the fix myself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, ready to test!
Hi @wandji20, Test results
Remarks
ResultsAll topics of the original issue are solved. 🥳 Merging! 🚀 |
Created openfoodfoundation/wishlist#521 to follow up. |
What? Why?
What should we test?
As per issue
Implementing a solution that will keep the uploaded image when form validation is done on the server side can be hacky.
I'm not so sure if we want to do that.
Release notes
Changelog Category (reviewers may add a label for the release notes):
UX improvements for the creation of new products
Dependencies
N/A
Documentation updates
N/A