Add missing features in resource settings tabs #946
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.
Based on #945
This PR looks to clean up the recently implemented plugin-based tab system in the resources/submission step (#939).
The idea is to leverage the newly developed abstraction in #945 to encapsulate the behavior of ANY resource settings panel, leaving the global resource settings panel to override based on its unique added features.
A few added items addressed in this PR:
Remaining issues:
The new approach somehow causes three tests, which pass in isolation, to fail when running the full suite.
The last one I suspect may simply require a regeneration of the stored references.
But the first two, I suspect here it is a more serious issue that ONLY shows up in testing. I think the issue is that in testing, we generate more than a single instance of certain classes that have
dict
and/orlist
caches. We define these as class variables, which is "fine" for the app, but raises issues when various tests create instances of the class. A quick solution (if indeed this is the issue) is to define these as instance variables. However, this is not straight forward for thecodes
class variable shared by instances ofResourceSettingsModel
s.There is no guarantee that this is the issue. Just a suspicion. Will test further as soon as I am not sick 🤒
@superstar54 good if you take a look, see if I missed something obvious. We can chat when I'm better.
Update
It was indeed the way we use collections as class variables. Tests passing now.