From 40862091bd0f78efac3c740d665d59323c00dc0b Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Thu, 26 Feb 2026 09:55:44 +0000 Subject: [PATCH] refactor: improve breadcrumb component structure and remove unused imports - Enhanced the breadcrumb.component.html for better readability by restructuring the template and using structural directives. - Streamlined the rendering logic for previous and last nodes in the breadcrumb. - Removed the unused CommonModule import from breadcrumb.component.ts to simplify dependencies. --- .../lib/breadcrumb/breadcrumb.component.html | 145 +++++++++--------- .../lib/breadcrumb/breadcrumb.component.ts | 3 +- 2 files changed, 77 insertions(+), 71 deletions(-) diff --git a/lib/content-services/src/lib/breadcrumb/breadcrumb.component.html b/lib/content-services/src/lib/breadcrumb/breadcrumb.component.html index cf5b4bcf29..ac9eff877d 100644 --- a/lib/content-services/src/lib/breadcrumb/breadcrumb.component.html +++ b/lib/content-services/src/lib/breadcrumb/breadcrumb.component.html @@ -1,75 +1,82 @@ - - - + @if (!folderNode && hasRoot) { + } - - - +} diff --git a/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts b/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts index d4eb016c73..5b528156aa 100644 --- a/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts +++ b/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts @@ -31,7 +31,6 @@ import { import { MatSelect, MatSelectModule } from '@angular/material/select'; import { Node, PathElement } from '@alfresco/js-api'; import { DocumentListComponent } from '../document-list/components/document-list.component'; -import { CommonModule } from '@angular/common'; import { TranslatePipe, TranslateService } from '@ngx-translate/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { IconModule } from '@alfresco/adf-core'; @@ -39,7 +38,7 @@ import { LiveAnnouncer } from '@angular/cdk/a11y'; @Component({ selector: 'adf-breadcrumb', - imports: [CommonModule, IconModule, TranslatePipe, MatSelectModule], + imports: [IconModule, TranslatePipe, MatSelectModule], templateUrl: './breadcrumb.component.html', styleUrls: ['./breadcrumb.component.scss'], encapsulation: ViewEncapsulation.None,