Skip to content

Commit

Permalink
Merge pull request #351 from smaht-dac/utk_file_search_view
Browse files Browse the repository at this point in the history
FileSearchView for type=File search
  • Loading branch information
utku-ozturk authored Feb 25, 2025
2 parents f918f12 + 6729d23 commit e428d18
Show file tree
Hide file tree
Showing 8 changed files with 447 additions and 375 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ smaht-portal
Change Log
----------

0.138.0
=======
`PR 351: FileSearchView for type=File search <https://github.com/smaht-dac/smaht-portal/pull/351>`

* New FileSearchView component to handle type=File searches
* Refactoring and improvements to BrowseView


0.137.4
=======
`PR 358: Cypress homepage and benchmarking facets test updates <https://github.com/smaht-dac/smaht-portal/pull/358>`
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "encoded"
version = "0.137.4"
version = "0.138.0"
description = "SMaHT Data Analysis Portal"
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand Down
12 changes: 11 additions & 1 deletion src/encoded/static/components/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1661,9 +1661,19 @@ const ContentRenderer = React.memo(function ContentRenderer(props) {
// error catching
content = <ErrorPage currRoute={routeLeaf} status={status} />;
} else if (context) {
// Hack for associating the /browse/ searches with BrowseView.
// Otherwise it will use FileSearchView since Registry.lookup checks for first matching view
let lookupContext = context;
const browseIdx = context?.['@type']?.indexOf('Browse') || -1;
if (browseIdx > -1) {
const cloned = context['@type'].slice();
cloned.splice(browseIdx, 1);
cloned.unshift('Browse');
lookupContext = { '@type': cloned };
}
// What should occur (success)
const ContentView = (contentViews || globalContentViews).lookup(
context,
lookupContext,
currentAction
);

Expand Down
Loading

0 comments on commit e428d18

Please sign in to comment.