Refactor the EditFormulaPresenter to accommodate a slightly different workflow in PathAndValueBuildingBlock.
Previously the popup only allowed you to create/edit an explicit formula, now we are using the usual formula editor from formulas in containers.
Mostly the changes have to do with the fact that this is in a modal dialog. The expectation is that if the dialog is canceled, the commands are not executed. In this case, rather than refactor all formula presenters to not execute commands, I have implemented the commands to be rolled back when changing formula types.
If you change the formula type a number of times, not all formulas are going to be added to the formula cache, only the formula being edited when user presses OK.
Also, if cancel is pressed, all commands are rolled back.
Type of change
Please mark relevant options with an x in the brackets.
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires documentation changes (link at least one user or developer documentation issue):
[ ] Algorithm update - updates algorithm documentation/questions/answers etc.
[ ] Other (please describe):
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
[ ] Integration tests
[x] Unit tests
[x] Manual tests
[ ] No tests required
Reviewer checklist
Mark everything that needs to be checked before merging the PR.
[ ] Check if the code is well documented
[ ] Check if the behavior is what is expected
[ ] Check if the code is well tested
[ ] Check if the code is readable and well formatted
[ ] Additional checks (document below if any)
[ ] Check if documentation update issue(s) are created if the option This change requires a documentation update above is selected
Fixes #1517
Description
Refactor the
EditFormulaPresenter
to accommodate a slightly different workflow inPathAndValueBuildingBlock
.Previously the popup only allowed you to create/edit an explicit formula, now we are using the usual formula editor from formulas in containers.
Mostly the changes have to do with the fact that this is in a modal dialog. The expectation is that if the dialog is canceled, the commands are not executed. In this case, rather than refactor all formula presenters to not execute commands, I have implemented the commands to be rolled back when changing formula types.
If you change the formula type a number of times, not all formulas are going to be added to the formula cache, only the formula being edited when user presses OK.
Also, if cancel is pressed, all commands are rolled back.
Type of change
Please mark relevant options with an
x
in the brackets.How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Reviewer checklist
Mark everything that needs to be checked before merging the PR.
This change requires a documentation update
above is selectedScreenshots (if appropriate):
Questions (if appropriate):