-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solve #109 problem #113
Solve #109 problem #113
Conversation
@@ -1282,7 +1284,27 @@ export default { | |||
this.secondaryPublicationIdentifiers = [] | |||
this.publicationIdentifiers = [] | |||
this.dataUsagePolicy = null | |||
this.targetGene = null | |||
this.existingTargetGene = null | |||
this.targetGene = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is redundant with l686 where target gene is created. I think you want to add a helper function emptyTargetGene outside the component to wrap this code and then find all the similar code and replace it with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
for (const dbName of externalGeneDatabases) { | ||
if (newValue[dbName]?.identifier?.identifier != null && newValue[dbName]?.offset == null) { | ||
this.targetGene.externalIdentifiers[dbName].offset = 0 | ||
if (newValue) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of wrapping the whole function in if (newValue) {
just add
if (!newValue) {
return
}
@@ -1291,7 +1313,6 @@ export default { | |||
this.geneName = null | |||
this.geneNameAccessionSuggestions = [] | |||
this.geneNameDropdownValue = null | |||
this.targetGenes = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this deleted? what is the effect of not clearing this on clear()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's repeated. Another this.targetGenes = []
is in line 1308.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.targetGenes is no longer getting cleared in the 'New score set' case when clear is clicked due to this deletion. not sure what you mean by it's repeated here, I don't see it on l1308 before or after your changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the repeated codes were from my other branch.
this.fileCleared('targetGeneTargetSequenceSequenceFile') | ||
this.referenceGenome = null | ||
this.targetGene = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also fix redundancy with l686 by adding helper function returning this target gene
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like you're not yet using the helper function for the initialization at l686.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ashley! Now I know what is the helper function.
I'll finish this up as I want it to go in with the frontend push today. |
…New score set case.
No description provided.