dspace-angular
dspace-angular copied to clipboard
Created new custom search scope context
Description
Currently the same search results is used for all the admin sidebar modals (create/edit Community/Collection/Item) and the search in scope modal. This PR adds an easy way to only modify the search results in one of those two types of modals by creating a new Context.ScopeSelectorModal & Context.ScopeSelectorModalCurrent.
Instructions for Reviewers
List of changes in this PR:
- Created the new
Context.ScopeSelectorModal&Context.ScopeSelectorModalCurrent - Added the possibility to give a context to
DSOSelectorComponent, if none is provided it will assume that you are using aContext.SideBarSearchModal. - Updated all the
SidebarSearchListElementComponentand added a new@listableObjectComponentdecorator with the newly createdContext.ScopeSelectorModal&Context.ScopeSelectorModalCurrent. This way everything still works like it did before, but now it can also be customized
Include guidance for how to test or review your PR.
- Check that both the admin sidebar modal and the scope modal work like before
- Create a new
CommunitySidebarSearchListElementComponentin your themes but only add the decorators ofContext.ScopeSelectorModal&Context.ScopeSelectorModalCurrent - Make a change
- Verify that this change is visible when you go to the search page and click on the
All of DSpacebutton - Verify that this change is not applied in the admin sidebar modals
Checklist
- [x] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
- [x] My PR passes ESLint validation using
yarn lint - [x] My PR doesn't introduce circular dependencies (verified via
yarn check-circ-deps) - [x] My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
- [x] My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
- [x] If my PR includes new libraries/dependencies (in
package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation. - [x] If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
- [x] If my PR fixes an issue ticket, I've linked them together.
Hi @alexandrevryghem, Conflicts have been detected against the base branch. Please resolve these conflicts as soon as you can. Thanks!
@alexandrevryghem : Should this still be considered for 8.0? If so, could I ask you to update this PR on latest main to ensure that all the latest tests / lint updates are working for this PR?
@tdonohue: I synced it with main and all the test and linting still succeed