-
Notifications
You must be signed in to change notification settings - Fork 31
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
Sample details refactor/ default assembly #1327
Sample details refactor/ default assembly #1327
Conversation
…efactor/_default_assembly
…efactor/_default_assembly
…efactor/_default_assembly
…efactor/_default_assembly
…efactor/_default_assembly
…efactor/_default_assembly
...a/corefacility/bioinformatics/irida/database/changesets/RENAME_ME_WHEN_READY/all-changes.xml
Show resolved
Hide resolved
genomeAssemblyId: genomeAssemblyObj.identifier, | ||
}) | ||
.then(({ data }) => { | ||
dispatch(setDefaultGenomeAssembly(genomeAssemblyObj)); |
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 do you need to store this as state? The point to using redux toolkit is that it handles the state and you just need to invalidate to update. It has it's own cache to handle 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.
The default tag doesn't update in the UI without it. If you look in samples.js we invalidateTags: ["SampleDetails"]. However even with this it doesn't update the UI side even when a different assembly is updated. Same thing applies to the setting of a default sequencing object
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.
I think it is because the tag
here is set up wrong. If you look at the docs for invalidating tags, we do not actually set the tag type on the object itself. I think where we dropped the ball was, instead of:
providesTags: ["SampleDetails"],
providesTags: (result) => [{ type: 'SampleDetails', id: details.identifier }],
I have not played with it, but it seems more like what they are looking for and probably why we are not getting invalidation and refetching.
Description of changes
What did you change in this pull request? Provide a description of files changed, user interactions changed, etc. Include how to test your changes.
Added functionality to allow setting of a default genome assembly for a sample. This will be useful when #1257 is merged in.
Related issue
Link to the GitHub issue this pull request addresses using the
#issuenum
format. If it completes an issue, useFixes #issuenum
to automatically close the issue.Checklist
Things for the developer to confirm they've done before the PR should be accepted:
* [ ] CHANGELOG.md (and UPGRADING.md if necessary) updated with information for new change.* [ ] User documentation updated for UI or technical changes.