You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hooks up the "Save" button in each collapsible section to save only the changes made to that model. Thankfully this turned out not to be too hard since the implementation of saveModeledMethods already (perhaps unintentionally) handles being gives only the methods from one model, because it splits the methods it's given into models and then saves only those files. Therefore it won't overwrite or delete other models that aren't being saved.
We also had to change how setUnsavedModels is called. I think what we were doing before was not quite fully correct but we were getting away with it. Now that we can save just one model at a time we need to be more granular.
We've tested this manually but checking that each model is saved individually and none of the other files are edited. Is there any more testing we can do of this?
Checklist
CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
Issues have been created for any UI or other user-facing changes made by this pull request.
[Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.
Are there any React/unit tests we can add around this area?
I think the answer is that right now, no not really. It's kinda hard.
There are currently no tests of the data-extensions-editor react code, but we could add some fairly easily. However I don't think testing this particular UI change it too useful. Adding tests of other existing functionality would be useful, but that's outside the scope of this PR.
There are also no tests of DataExtensionsEditorView, and adding some looks hard. I think we want to move implementation out of this class and into separate classes that'll be more testable, but I'm hesitant to do that in this PR. Would it be ok if I open an another issue to cover moving all of the implementation for loading/saving modelled data to a separate file and testing it?
Are there any React/unit tests we can add around this area?
I think the answer is that right now, no not really. It's kinda hard.
There are currently no tests of the data-extensions-editor react code, but we could add some fairly easily. However I don't think testing this particular UI change it too useful. Adding tests of other existing functionality would be useful, but that's outside the scope of this PR.
There are also no tests of DataExtensionsEditorView, and adding some looks hard. I think we want to move implementation out of this class and into separate classes that'll be more testable, but I'm hesitant to do that in this PR. Would it be ok if I open an another issue to cover moving all of the implementation for loading/saving modelled data to a separate file and testing it?
Yeah that makes sense! Happy to improve on test coverage separately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Paired with @shati-patel on this.
Hooks up the "Save" button in each collapsible section to save only the changes made to that model. Thankfully this turned out not to be too hard since the implementation of
saveModeledMethodsalready (perhaps unintentionally) handles being gives only the methods from one model, because it splits the methods it's given into models and then saves only those files. Therefore it won't overwrite or delete other models that aren't being saved.We also had to change how
setUnsavedModelsis called. I think what we were doing before was not quite fully correct but we were getting away with it. Now that we can save just one model at a time we need to be more granular.We've tested this manually but checking that each model is saved individually and none of the other files are edited. Is there any more testing we can do of this?
Checklist
ready-for-doc-reviewlabel there.