Skip to content

Commit

Permalink
new search page version
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Feb 16, 2024
1 parent d79b98f commit 52392a6
Show file tree
Hide file tree
Showing 12 changed files with 1,024 additions and 445 deletions.
2 changes: 1 addition & 1 deletion src/components/SubsetsLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function SubsetsResponse({ bioSubsetsHierarchies, allBioSubsets, datasetIds, def
tree={tree}
size={size}
defaultTreeDepth={defaultTreeDepth}
sampleFilterScope="referenceid"
sampleFilterScope="allTermsFilters"
/>
</>
)
Expand Down
Binary file removed src/components/SubsetsLoader.textClipping
Binary file not shown.
8 changes: 3 additions & 5 deletions src/components/classificationTree/SubsetsTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ function Node({
const isSearchPossible = subset && canSearch(subset)
const even = index % 2 === 0
const detailsPage = subsetId.match("cellosaurus") ? "cellline" : "subset"
const searchPage = subsetId.match("cellosaurus") ? "filterSearch" : "search"
return (
<div
style={{
Expand Down Expand Up @@ -222,7 +221,7 @@ function Node({
<Expander isOpen={isOpen} setOpen={setOpen} />
</span>
)}
<Tippy content={`Show data for subset ${subsetId}`}>
<Tippy content={`Show data for subset "${subset.label}"`}>
<a
href={`/${detailsPage}/?id=${subsetId}&datasetIds=${datasetIds}`}
>
Expand All @@ -241,7 +240,6 @@ function Node({
href={sampleSelectUrl({
subsets: [subset],
datasetIds,
searchPage,
sampleFilterScope
})}
>
Expand Down Expand Up @@ -349,10 +347,10 @@ function useFilterTree(tree) {
return { searchInput, debouncedSearchInput, setSearchInput, filteredTree }
}

function sampleSelectUrl({ subsets, datasetIds, searchPage, sampleFilterScope }) {
function sampleSelectUrl({ subsets, datasetIds, sampleFilterScope }) {
const filters = subsets.map(({ id }) => id).join(",")
// here the `bioontology` parameter has to be used instead of `filters` for transfer to the search form
return sampleSearchPageFiltersLink({ datasetIds, searchPage, sampleFilterScope, filters })
return sampleSearchPageFiltersLink({ datasetIds, sampleFilterScope, filters })
}

function canSearch(subset) {
Expand Down
Loading

0 comments on commit 52392a6

Please sign in to comment.