ZCU-PUB/Display full community path in sidebar search results#1235
ZCU-PUB/Display full community path in sidebar search results#1235Paurikova2 wants to merge 6 commits intocustomer/zcu-pubfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates sidebar search list elements to show a full hierarchical parent path (breadcrumbs) for Communities and Collections in the sidebar search modal, improving context when selecting parents during creation workflows.
Changes:
- Updated
SidebarSearchListElementComponent.getParentTitle()to useDSOBreadcrumbsService.getBreadcrumbs()for Communities/Collections and join ancestors into a full path. - Extended sidebar-search list element components (Community/Collection/Person) to inject
DSOBreadcrumbsServiceafter updating the base component constructor. - Enhanced the shared sidebar-search list element test factory to provide a
DSOBreadcrumbsServicemock.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.ts |
Builds full parent path for community/collection results via breadcrumbs service. |
src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.spec.ts |
Adds breadcrumbs service mock to shared test factory. |
src/app/shared/object-list/sidebar-search-list-element/community/community-sidebar-search-list-element.component.ts |
Fixes selector and wires constructor deps through to updated base class. |
src/app/shared/object-list/sidebar-search-list-element/collection/collection-sidebar-search-list-element.component.ts |
Wires constructor deps through to updated base class. |
src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/person/person-sidebar-search-list-element.component.ts |
Adds missing breadcrumbs service injection and passes it to base constructor. |
src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.ts
Outdated
Show resolved
Hide resolved
...shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.spec.ts
Show resolved
Hide resolved
src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.ts
Outdated
Show resolved
Hide resolved
...pp/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html
Outdated
Show resolved
Hide resolved
src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.ts
Show resolved
Hide resolved
...shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.spec.ts
Show resolved
Hide resolved
...shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.spec.ts
Show resolved
Hide resolved
|
@milanmajchrak If we want to include this PR, we should also offer it to Vanilla and cherry-pick it for other customers (mainly dtq-dev). |
| const typeValue = this.dso.type?.value ?? (this.dso as any).type; | ||
| if (this.dso && (typeValue === DSpaceObjectType.COMMUNITY.toLowerCase() || typeValue === DSpaceObjectType.COLLECTION.toLowerCase())) { | ||
| // For communities and collections, build hierarchical path via breadcrumbs | ||
| return this.dsoBreadcrumbsService.getBreadcrumbs(this.dso as unknown as ChildHALResource & DSpaceObject, '').pipe( |
There was a problem hiding this comment.
Cannot it be done without as unknown as - it seems like big hack
|
@milanmajchrak I wanted to add it to scenarios earlier, but then I realized we should first merge it into dtq-dev (zcu-pub isn’t used for testing). |
Problem description
Display the complete hierarchical path from root to parent for communities
and collections in the sidebar search modal, instead of showing only the
immediate parent.
Changes:
DSOBreadcrumbsService.getBreadcrumbs() for communities/collections,
building full hierarchical path (e.g., "Test / FKU" instead of "FKU")
values, as REST API deserializes type as plain string
missing dsoBreadcrumbsService parameter
breadcrumb testing
Impact:
When creating new Collections or Communities, users now see the complete
path context in search results (e.g., "Test / FKU / Home" hierarchy),
making it easier to identify and select the correct parent community.
Manual Testing (if applicable)
Copilot review