dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Created new custom search scope context

Open alexandrevryghem opened this issue 2 years ago • 3 comments

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 a Context.SideBarSearchModal.
  • Updated all the SidebarSearchListElementComponent and added a new @listableObjectComponent decorator with the newly created Context.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 CommunitySidebarSearchListElementComponent in your themes but only add the decorators of Context.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 DSpace button
  • 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.

alexandrevryghem avatar Nov 22 '23 16:11 alexandrevryghem

Hi @alexandrevryghem, Conflicts have been detected against the base branch. Please resolve these conflicts as soon as you can. Thanks!

github-actions[bot] avatar Mar 08 '24 15:03 github-actions[bot]

@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 avatar May 14 '24 16:05 tdonohue

@tdonohue: I synced it with main and all the test and linting still succeed

alexandrevryghem avatar May 14 '24 19:05 alexandrevryghem