We should change the tempstore to save changes on a per-block level so that users can undo changes made to different blocks individually. Consider the following use case: user changes the settings for block 1, block 2 and block 3, then realizes that they need to undo the changes made to block 2. The only way to do that currently is to undo all changes, and then have the user recreate the changes for block 1 and block 3. Really bad UX and it gets even worse as the number of changed blocks increases.
How about we have per-block tempstores instead of a single one for the entire form? That would allow us to place "Discard changes" links individually on each changed block in addition to the global "Cancel" button that we have for the entire form.
Recent comments
In a blog post titled "Github Tips and Tricks for Contrib Maintainers", I'd like to see some of the following topics: When is the README sufficient for documentation? When should...
Github Tips and Tricks for Contrib Maintainers
Thanks Alejandro. That was the clues I needed.
Ubercart - Programmatically add product to cart and straight to Checkout
Have you tried uc_cart_add_item()? You need to provide the nid of the product. Then you can use backdrop_goto('cart/checkout'); to send the user to the checkout screen. uc_cart_add_item...
Ubercart - Programmatically add product to cart and straight to Checkout