-
Notifications
You must be signed in to change notification settings - Fork 438
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
Added scope @Input() to the SearchComponent & fixed related bugs #2794
Added scope @Input() to the SearchComponent & fixed related bugs #2794
Conversation
…lts use that scope
…-search-form_contribute-main # Conflicts: # src/app/shared/search/themed-search.component.ts
@alexandrevryghem would this also fix #2555? I tried to add a |
@alanorth: Yes this will fix that issue I will also add the |
@alexandrevryghem thanks, apologies as I don't want to derail the conversation. I had tried the custom |
@alanorth: Sry I just realised that you said |
Thanks @alexandrevryghem. I verified your example. It is indeed working with |
@alanorth: That's because the recent submission section on collection pages ignores those url parameters, but this component will be replaced with the search component, so I don't think it's worth it to add that functionality for dspace-7.6.2 only. But if you want to hide the search facets & settings on your community/collection pages you should be able to achieve this by adding |
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.
👍 Thanks @alexandrevryghem ! I tested this today and verified that both bugs are fixed. The community/collection scope is now taken into account in the facets & sort options. I couldn't find any side effects to this change, so I'm merging it immediately & auto-porting to 7.x
Successfully created backport PR for |
References
Description
I added an
@Input()
scope to theSearchComponent
in order to easily be able to defined change the default scope without having to defined it in the url as a query parameter. This PR also fixes a bug caused by a timing issue with thecurrentScope$
causing invalid request to be sent to the backend when you changed scope that use a differentDiscoveryConfiguration
. This PR also fixes an issue where the scope was ignored when retrieving the sort options.Instructions for Reviewers
List of changes in this PR:
@Input() scope: string
to theSearchComponent
and passed it down to theSearchFilterComponent
&SearchFacetFilterComponent
in order to retrieve the facets with the correct scope.currentScope$
is used in order to prevent invalid request to be send when you switch between 2 scopes who have differentDiscoveryConfiguration
searchFilters
.searchConfigService#getConfigurationSearchConfig
in order to retrieve the correct sort optionsChecklist
yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.