From c344f1520efeca10c822fd30cdfcd2d92682068e Mon Sep 17 00:00:00 2001 From: ViktorSlavov Date: Wed, 30 Oct 2019 17:39:10 +0200 Subject: [PATCH 1/2] refactor(linear-bar): use *ngIf instead of ngClass in progress bar template --- .../core/styles/components/progress/_progress-component.scss | 5 ----- .../lib/core/styles/components/progress/_progress-theme.scss | 4 ---- .../lib/progressbar/templates/circular-bar.component.html | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/projects/igniteui-angular/src/lib/core/styles/components/progress/_progress-component.scss b/projects/igniteui-angular/src/lib/core/styles/components/progress/_progress-component.scss index b862f5f675b..cbddc10ef73 100644 --- a/projects/igniteui-angular/src/lib/core/styles/components/progress/_progress-component.scss +++ b/projects/igniteui-angular/src/lib/core/styles/components/progress/_progress-component.scss @@ -115,7 +115,6 @@ @include e(text, $m: hidden) { @extend %circular-text !optional; - @extend %circular-text--hidden !optional; } @include m(indeterminate) { @@ -124,9 +123,5 @@ @include e(outer) { @extend %circular-outer--indeterminate !optional; } - - @include e(text) { - @extend %circular-text--hidden !optional; - } } } diff --git a/projects/igniteui-angular/src/lib/core/styles/components/progress/_progress-theme.scss b/projects/igniteui-angular/src/lib/core/styles/components/progress/_progress-theme.scss index 58c097b0fa5..3044ddf69c5 100644 --- a/projects/igniteui-angular/src/lib/core/styles/components/progress/_progress-theme.scss +++ b/projects/igniteui-angular/src/lib/core/styles/components/progress/_progress-theme.scss @@ -292,10 +292,6 @@ fill: --var($theme, 'text-color'); } - %circular-text--hidden { - visibility: hidden; - } - @include keyframes('indeterminate-accordion') { 50% { stroke-dashoffset: 260; diff --git a/projects/igniteui-angular/src/lib/progressbar/templates/circular-bar.component.html b/projects/igniteui-angular/src/lib/progressbar/templates/circular-bar.component.html index 933d9183e00..897d317016f 100644 --- a/projects/igniteui-angular/src/lib/progressbar/templates/circular-bar.component.html +++ b/projects/igniteui-angular/src/lib/progressbar/templates/circular-bar.component.html @@ -7,7 +7,7 @@ [attr.aria-valuenow]="value"> - + From 410bb4e73566a4093d2b485acede3b9f7e574a26 Mon Sep 17 00:00:00 2001 From: ViktorSlavov Date: Wed, 30 Oct 2019 18:24:10 +0200 Subject: [PATCH 2/2] chore(linear-bar): fix failing tests --- .../src/lib/progressbar/circularbar.component.spec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/igniteui-angular/src/lib/progressbar/circularbar.component.spec.ts b/projects/igniteui-angular/src/lib/progressbar/circularbar.component.spec.ts index fcfa3149b9d..486ea9a8d06 100644 --- a/projects/igniteui-angular/src/lib/progressbar/circularbar.component.spec.ts +++ b/projects/igniteui-angular/src/lib/progressbar/circularbar.component.spec.ts @@ -322,7 +322,8 @@ describe('IgCircularBar', () => { componentInstance.progressbar.textVisibility = false; fixture.detectChanges(); - expect(progressBarElem.children[2].classList.value).toMatch(CIRCULAR_HIDDEN_TEXT_CLASS); + // Text is not rendered + expect(progressBarElem.children[2]).toBeFalsy(); }); it('When indeterminate mode is on value should not be updated', () => { @@ -375,8 +376,8 @@ describe('IgCircularBar', () => { componentInstance.progressbar.textVisibility = false; fixture.detectChanges(); - - expect(progressBarElem.children[2].classList.value).toMatch(CIRCULAR_HIDDEN_TEXT_CLASS); + // Text is not rendered + expect(progressBarElem.children[2]).toBeFalsy(); })); it('The max representation should respond correctly to passed maximum value', fakeAsync(() => {