Skip to content

add search icon to community and collection#109

Open
amadulhaxxani wants to merge 1 commit intoclarin-v7from
86-scoped-search-from-communitycollection-page
Open

add search icon to community and collection#109
amadulhaxxani wants to merge 1 commit intoclarin-v7from
86-scoped-search-from-communitycollection-page

Conversation

@amadulhaxxani
Copy link

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

  • Users currently need to manually select the scope on the search page.
  • The PR adds a "search-dso" menu entry in the edit menu for both Community and Collection pages.
  • Ensures that queryParams are correctly bound to menu links to navigate with the scoped search.
  • Integrates the edit menu in the header action area of Community and Collection pages.
  • Adds tests for presence of menu entry, correct queryParams binding, and rendering of the edit menu.

Problems

No unexpected problems occurred during the implementation.

Copilot review

  • Requested review from Copilot

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
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scoped search from community/collection page

2 participants