Query skeleton for expansion of deposition page - #1897
Open
vincent-czi wants to merge 6 commits into
Open
Conversation
This was referenced Jul 17, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
NOT INTENDED FOR MERGE
I've put this up as a draft PR on GitHub mostly as a way to provide a pleasant view of the diffs and to have a place to attach notes on what's going on here. The code as-is though is definitely not intended to get mergeg. This is a scaffold for the rough approach I see to handle the deposition expansion specs. The queries are -- I hope -- mostly there, but the usage definitely is not.
It's possible these commits could get cherry-picked or even merge the whole branch into a branch that is working on the deposition expansion, but they absolutely should not go straight to main.
Notes on queries
You can see a vague example of usage plan for the various new queries in the "VINCENT_WORK" block on
/depositions.$id.tsxpage. That data then gets console logged out in a matching "VINCENT_WORK" block in theuseDepositionById.tshook as a way of easily viewing the results of this query in a browser.Before we discuss usage, two things to note:
Sketch of expected usage
With the above in mind, I'm going to just sketch out the user looking at annotations (well, annotation shapes, but let's just call it annos for simplicity from here out). The tomo approach should be pretty similar. Here's how I expect usage will work:
GET_DEPOSITION_ANNOTATIONS).GET_DATASETS_FOR_DEPOSITION_VIA_ANNOTATION_SHAPESandGET_DATASETS_FOR_DEPOSITION_VIA_TOMOGRAMS).nullorganism to be presented as"Not specified". I think the code that rolls up the query result into the look-up is probably the right place to do this swap.GET_DEPOSITION_ANNOTATIONS_FOR_DATASETS). Because we only need to support filtering by dataset or organism, this can be accomplished entirely by filtering the data for_insome list of datasets (since an organism is just a collection of datasets).GET_DEPOSITION_ANNOTATIONS_FOR_DATASETS). The only difference is that we need to change the page size because the UX for an open accordion has a different count of items than when it's a filter and no accordions.GET_DEPOSITION_ANNO_RUN_COUNTS_FOR_DATASETS. We already have the annos count for each dataset via (2) above, so we don't query that here just use it from earlier info.GET_DEPOSITION_ANNO_RUNS_FOR_DATASET).GET_ANNOTATIONS_FOR_RUN_AND_DEPOSITION)Random side note about pagination weirdness
FYI, I had a weird moment where I was validating one of my queries, trying to change the
pagenumber I was passing and see the results change as the limit offset moved. But the results kept coming back the same. It's like the FE app either was ignoring the updatedpagevalue or not interpolating it into the limitOffset or the BE was ignoring the offset. But then it started working as expected? I forget if I rebooted my dev server or did something else. Totally possible it was just error/confusion on my part. But if you see anything weird about pagination not seeming to update, try rebooting the dev server or closing your browser page or something before thinking it's a real bug.