openfoodnetwork
openfoodnetwork copied to clipboard
[BUU] Don't reload whole table when deleting products or variants
When performing a delete from the actions menu, the whole table is reloaded. This can take some time, and is jarring because you can lose your position in a long list of products. The old products screen does this so we need to support it here too.
- After confirming, attempt to delete the chosen row.
- If delete succeeds, remove the row(s) from the page.
- Try using a "slide out" animation, to avoid the jump which would cause the user to lose their place.
- If the action fails, show a flash message explaining why, without changing any other part of the page.
Other notes:
- Should the pagination info be updated ("showing x of x")? For the first iteration, make no changes, this will be re-evaluated later
- Any unsaved edits will remain on the page and not affect progress. (fixes issues when other rows have been edited as pictured)
- Depends on #12361
- Very similar to #11987
- By removing SR, this will close https://github.com/openfoodfoundation/openfoodnetwork/issues/12331