add search icon to community and collection#109
Open
amadulhaxxani wants to merge 1 commit intoclarin-v7from
Open
add search icon to community and collection#109amadulhaxxani wants to merge 1 commit intoclarin-v7from
amadulhaxxani wants to merge 1 commit intoclarin-v7from
Conversation
add search icon to community and collection, click should navigate to community/collection pre-selected advance search page add tests to confirm the new navigation
There was a problem hiding this comment.
Pull request overview
This PR adds a "search" icon/button to Community and Collection pages that allows users to navigate directly to the search page with the scope preselected to the current community or collection. This enhancement improves user experience by making scoped searches more accessible.
Changes:
- Added a new "search-dso" menu entry to the edit menu for Communities and Collections in the resolver
- Enabled queryParams binding on menu link items to support navigation with query parameters
- Wrapped the edit menu component in a flexbox container for proper alignment on Community and Collection pages
- Added comprehensive test coverage for the new feature
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/shared/dso-page/dso-edit-menu.resolver.ts | Added "search-dso" menu entry with search icon that links to /search with scope and spc.page query parameters for Communities and Collections |
| src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.html | Added [queryParams] binding to the anchor tag to support passing query parameters through RouterLink |
| src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts | Added test to verify queryParams are correctly bound to the link element, and updated test fixture data |
| src/app/shared/dso-page/dso-edit-menu.resolver.spec.ts | Added comprehensive tests verifying the search entry appears for Communities and Collections with correct properties and queryParams, and is absent for Items |
| src/app/community-page/community-page.component.html | Wrapped ds-dso-edit-menu in a flex container for proper alignment with header content |
| src/app/community-page/community-page.component.spec.ts | Added new test file to verify the edit menu renders correctly on the community page |
| src/app/collection-page/collection-page.component.html | Wrapped ds-dso-edit-menu in a flex container for proper alignment with header content |
| src/app/collection-page/collection-page.component.spec.ts | Added new test file to verify the edit menu renders correctly on the collection page |
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.
Problem description
Add a "search" menu entry on Community and Collection pages to allow users to navigate to the search page with the scope preselected (community or collection). This makes it easier for users to limit search results to a specific community or collection.
Analysis
queryParamsare correctly bound to menu links to navigate with the scoped search.queryParamsbinding, and rendering of the edit menu.Problems
No unexpected problems occurred during the implementation.
Copilot review