From b46d468f76ea48285aee2310a854e7debe9b655c Mon Sep 17 00:00:00 2001 From: AleksanderSklorz <115619721+AleksanderSklorz@users.noreply.github.com> Date: Thu, 18 Jan 2024 14:53:15 +0100 Subject: [PATCH] [ACS-6212] Fix overlaping labels and incorrect color for warning (#9219) --- .../content-node-share.dialog.html | 6 +++-- .../content-node-share.dialog.scss | 8 ++----- .../content-node-share.dialog.spec.ts | 22 +++++++++++++++++++ lib/core/src/lib/styles/_colors.scss | 2 +- lib/core/src/lib/styles/_index.scss | 1 + 5 files changed, 30 insertions(+), 9 deletions(-) diff --git a/lib/content-services/src/lib/content-node-share/content-node-share.dialog.html b/lib/content-services/src/lib/content-node-share/content-node-share.dialog.html index ba142b7403..d030ea6947 100644 --- a/lib/content-services/src/lib/content-node-share/content-node-share.dialog.html +++ b/lib/content-services/src/lib/content-node-share/content-node-share.dialog.html @@ -31,7 +31,7 @@ [style.display]="isExpiryDateToggleChecked ? 'block' : 'none'" data-automation-id="adf-slide-toggle-checked" class="adf-share-link__date-time-container"> - + {{ 'SHARE.EXPIRATION-PLACEHOLDER' | translate }} { expect(fixture.nativeElement.querySelector('[data-automation-id="adf-slide-toggle-checked"]').style.display).toEqual('none'); }); + it('should not display floating label for expiration field', () => { + component.data = { + node, + baseShareUrl: 'some-url/' + }; + + fixture.detectChanges(); + expect(fixture.debugElement.query(By.css('[data-automation-id="adf-content-share-expiration-field"]')) + .componentInstance.floatLabel).toBe('never'); + }); + + it('should not display floating label for public link field', () => { + component.data = { + node, + baseShareUrl: 'some-url/' + }; + + fixture.detectChanges(); + expect(fixture.debugElement.query(By.css('[data-automation-id="adf-content-share-public-link-field"]')) + .componentInstance.floatLabel).toBe('never'); + }); + describe('datetimepicker type', () => { beforeEach(() => { spyOn(sharedLinksApiService, 'createSharedLinks').and.returnValue(of()); diff --git a/lib/core/src/lib/styles/_colors.scss b/lib/core/src/lib/styles/_colors.scss index de5545c841..6e754a765d 100644 --- a/lib/core/src/lib/styles/_colors.scss +++ b/lib/core/src/lib/styles/_colors.scss @@ -153,7 +153,7 @@ $alfresco-warn: ( A100: #ff8a80, A200: #ff5252, A400: #ff1744, - A700: #d50000, + A700: #c95100, contrast: ( 50: $black-87-opacity, 100: $black-87-opacity, diff --git a/lib/core/src/lib/styles/_index.scss b/lib/core/src/lib/styles/_index.scss index ac5dc35201..3f329c4a73 100644 --- a/lib/core/src/lib/styles/_index.scss +++ b/lib/core/src/lib/styles/_index.scss @@ -37,6 +37,7 @@ --adf-theme-primary-900:mat.get-color-from-palette($primary, 900), --theme-warn-color: mat.get-color-from-palette($warn), + --theme-warn-color-a700: mat.get-color-from-palette($warn, A700), --theme-warn-color-default-contrast: mat.get-color-from-palette($warn, default-contrast), --theme-accent-color: mat.get-color-from-palette($accent),