-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
[BUU] Avoid validating all records when saving #12503
Comments
|
I think that setting unchanged fields to disabled would be quite effective, and mostly safe because we re-render the view on success or failure. Except in the case of network failure. I have to admit I'm not sure how we currently handle network failure, but ideally it should be able to revert and let you try again. The simplest, and safest option is to update the ProductSet to skip over unchanged records. |
ive tried to save only changed products #12515. But still, variants should be saved here https://github.com/openfoodfoundation/openfoodnetwork/blob/master/app/services/sets/product_set.rb#L107 . Simply put there |
Thanks @isidzukuri!
I agree that's the ideal. However I think we can avoid that for now. The screen is still quite new and we want to ensure the basic features are working well before changing too much. |
What we should change and why (this is tech debt)
On the old Bulk Edit Products screen (
/admin/products
with feature toggleadmin_style_v3
OFF), when you edit some rows and click save, only the edited data are sent to the server, validated and saved.On the new screen (
/admin/products
with feature toggleadmin_style_v3
ON), it currently submits all data, and validates and saves everything.This is less efficient and probably slower. It can also cause confusion when saving, if you have an invalid record in view (corrupt data).
Context
This is demonstrated in #12486 (comment)
The text was updated successfully, but these errors were encountered: