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.
Description
At the moment when we change the scan type selection the Tree Nodes associated with them don't get re-enabled. This seems to be because the changes in the
ScanTypesPanel
don't actually get trickled up toSnykProjectSettingsConfigurable
in order for theapply()
method to run whenisModified()
returnstrue
. The reason for this is that when the selections change theDialog.isModified()
function called inisScanTypeChanged
inSnykSettingsDialog
hasn't registered that there has been a change. We're now achieving that with the use ofbindSelected
.We have some validation in place so that pre-apply we don't allow people to deselect all scan types. The new selections only get "persisted" globally once the
apply()
function gets called so the new action listener we added for each checkbox also needs to locally persist the selection changes in order for the validation to work.Docs about these panels that led to this implementation:
There are two more panels that probably have this issue. The
SeveritiesEnablementPanel
andIssueViewOptionsPanel
. Before I make those changes there I want to see if this approach is okay.Checklist