Skip to content
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

Created new custom search scope context #2657

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

alexandrevryghem
Copy link
Member

@alexandrevryghem alexandrevryghem commented Nov 22, 2023

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

  • 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.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • 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.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

…' into w2p-108608_created-search-scope-selector_contribute-main

# Conflicts:
#	src/app/core/shared/context.model.ts
#	src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html
#	src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts
@alexandrevryghem alexandrevryghem self-assigned this Nov 22, 2023
@tdonohue tdonohue added code task 1 APPROVAL pull request only requires a single approval to merge labels Nov 22, 2023
@tdonohue tdonohue requested a review from atarix83 February 15, 2024 15:55
Copy link

github-actions bot commented Mar 8, 2024

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

…search-scope-selector_contribute-main

# Conflicts:
#	src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts
@tdonohue
Copy link
Member

@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?

@alexandrevryghem
Copy link
Member Author

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

Copy link

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

@alexandrevryghem alexandrevryghem added this to the 9.0 milestone Jan 28, 2025
@alexandrevryghem alexandrevryghem force-pushed the w2p-108608_created-search-scope-selector_contribute-main branch from a745cd4 to 196a8c2 Compare January 28, 2025 00:38
@pcg-kk pcg-kk self-requested a review February 3, 2025 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge code task
Projects
Status: 👀 Under Review
Development

Successfully merging this pull request may close these issues.

2 participants