Support multiple search instances on a single page (9.x)#5739
Draft
alijaber-atmire wants to merge 2 commits into
Draft
Support multiple search instances on a single page (9.x)#5739alijaber-atmire wants to merge 2 commits into
alijaber-atmire wants to merge 2 commits into
Conversation
added 2 commits
May 30, 2026 23:09
…with searchInstanceId
Adds support for running multiple search components on a single page by
prefixing all search-related route and query parameters with a unique
search instance id (${searchInstanceId}.${parameterName}). Previously only
sort and pagination parameters were scoped; configuration, fixedFilterQuery,
scope, query, dsoType, view and filter queries (f.xxx) are now scoped too.
…w2p-141627_search-instance-params-9.x_contribute # Conflicts: # src/app/core/shared/search/search-configuration.service.ts
This was referenced May 31, 2026
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.
References
Description
Extends the per-search-instance prefixing (currently only applied to
sortandpagination) to all remaining search route and query parameters, so multiple search components can coexist on a single page without interfering with each other.Instructions for Reviewers
This builds on the existing mechanism that prefixes
sort/paginationparams with a unique search-instance identifier, and applies the same approach to every other search parameter.List of changes in this PR:
searchInstanceIdtoSearchConfigurationServiceand helper methods to build/read instance-scoped parameters:getSearchInstanceParam,getCurrentSearchInstanceParam,getCurrentSearchInstanceQueryParam,getSearchInstanceFilterParam,getCurrentSearchInstanceFilterParam, andgetSearchInstanceFilterParamPrefix.getCurrentConfiguration,getCurrentScope,getCurrentQuery, andgetCurrentDSOTypeto resolve their values from instance-prefixed route/query parameters (with a fallback to the legacy unprefixed parameter for backwards compatibility).SearchFilterServiceandSearchServiceto read/write thef.xxxfilter parameters andviewusing the instance prefix.search.component,search-form.component,search-results.component,search-settings.component,search-switch-configuration.component,search-navbar.component,search-page.component,configuration-search-page.component,themed(-configuration)-search.component, the facet/range filter option components, andobject-collection.component— to use the instance-prefixed parameter names.recent-item-list,my-dspace-configuration.service, andmy-dspace.guardto use the new instance-scoped params.search-configuration-service/pagination-servicetest stubs accordingly.How to test:
yarn start/npm start).dsoType, and apply facet/range filters.<id>.query,<id>.f.author,<id>.configuration) and that the second search component is unaffected.Checklist
mainbranch of code — N/A: this is a version-specific PR targetingdspace-9_x(the bug is being fixed on the 7.6/9.x/10.x lines).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.