From 9f70eb5e09d2d9d2ec6b6a44a40270ea95c2163a Mon Sep 17 00:00:00 2001 From: Xaviju Date: Mon, 2 Oct 2023 11:59:50 +0200 Subject: [PATCH] feat(workflows): ui review III --- .../story-detail/story-detail.component.html | 8 +--- .../comment-single.component.css | 2 +- .../lib/breadcrumb/breadcrumb.component.css | 26 ++++++++++++- .../lib/breadcrumb/breadcrumb.component.html | 38 +++++++++---------- .../lib/breadcrumb/breadcrumb.component.ts | 17 ++++++--- 5 files changed, 59 insertions(+), 32 deletions(-) diff --git a/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.component.html b/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.component.html index 7e54bd243..6040b12d7 100644 --- a/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.component.html +++ b/javascript/apps/taiga/src/app/modules/project/story-detail/story-detail.component.html @@ -125,15 +125,11 @@ + ]"> - + diff --git a/javascript/libs/ui/src/lib/breadcrumb/breadcrumb.component.ts b/javascript/libs/ui/src/lib/breadcrumb/breadcrumb.component.ts index 329e1385b..e1f0ff82c 100644 --- a/javascript/libs/ui/src/lib/breadcrumb/breadcrumb.component.ts +++ b/javascript/libs/ui/src/lib/breadcrumb/breadcrumb.component.ts @@ -7,11 +7,15 @@ */ import { CommonModule } from '@angular/common'; -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; +import { + ChangeDetectionStrategy, + Component, + HostBinding, + Input, +} from '@angular/core'; import { TranslocoDirective } from '@ngneat/transloco'; import { TuiSvgModule } from '@taiga-ui/core'; - -type BreadCrumbType = 'expanded' | 'collapsed'; +import { TooltipDirective } from '../tooltip'; @Component({ selector: 'tg-ui-breadcrumb', @@ -19,15 +23,18 @@ type BreadCrumbType = 'expanded' | 'collapsed'; styleUrls: ['./breadcrumb.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [CommonModule, TranslocoDirective, TuiSvgModule], + imports: [CommonModule, TranslocoDirective, TuiSvgModule, TooltipDirective], }) export class BreadcrumbComponent { @Input({ required: true }) public crumbs: string[] = []; @Input() public icon = 'kanban'; @Input() public accent = false; - @Input() public type: BreadCrumbType = 'expanded'; @Input() public hideLastCrumb = false; + @Input() + @HostBinding('class.collapsable') + public collapsable = false; + public trackByIndex(index: number) { return index; }