I've added Undo / Redo functionality to the Calibration, Programs, and Cost functions pages of the website. The behavior is generally sensible and intuitive:
When you enter one of the 3 UndoStack-augmented pages, it causes an UndoStack that is tied to the active project to be reset so that what you have saved and active is the sole thing on the stack. So that means if you exit the page and reenter it after you've pushed N saves to the stack, when you reenter the page you will be at the place you were saved at and that will be the sole stack frame, so no Undos or Redos are there to do in that situation.
These items in the Calibration page will cause a save and a push to the UndoStack:
Hitting the "Save & run" button
Hitting either the Proportion or Number buttons
Hitting the Calibrate button
Doing any of the little icons to the right except download and help
These items in the Programs page will cause a save and a push to the UndoStack:
Checking and unchecking programs
Doing a complete Edit of a program
Doing a Copy of a program
Doing a complete Add program
Doing the little icons on the right, but a couple of caveats:
-- New needs to be tested once functionality is working for the program sets.
-- Delete does not properly push a change to the UndoStack, so you cannot Undo a delete.
These items in the Cost functions page will cause a save and a push to the UndoStack:
"Save and update" button from the Define cost functions tab
"Save" button from the Define outcome functions tab
"Reconcile" button from the Summary tab, i.e. once the Reconcile is completed
Undo moves back to the previous Save, Redo to the next one, and if this wouldn't make sense, nothing significant happens because the server returns whether a valid undo or redo was done.
The one thing I find weird about present functionality is that the saves on the first 2 tabs of the Cost functions page are independent, so if you save in one, the other one has not saved as well, so you can get some unintuitive things happening if you forget to save the other page.
It would probably not be very difficult to extend this functionality to the rest of the pages (Scenarios, Optimization, Geospatial) if so desired.
I've added Undo / Redo functionality to the Calibration, Programs, and Cost functions pages of the website. The behavior is generally sensible and intuitive:
The one thing I find weird about present functionality is that the saves on the first 2 tabs of the Cost functions page are independent, so if you save in one, the other one has not saved as well, so you can get some unintuitive things happening if you forget to save the other page.
It would probably not be very difficult to extend this functionality to the rest of the pages (Scenarios, Optimization, Geospatial) if so desired.