From 088e746173f408fec3cd82bfd8ba6a5ba8c8c337 Mon Sep 17 00:00:00 2001 From: Afreen Misbah Date: Thu, 9 Oct 2025 17:57:21 +0530 Subject: [PATCH] mgr/dashboard: Remove unused css Signed-off-by: Afreen Misbah --- .../notification-area.component.html | 7 +++---- .../notification-area.component.scss | 15 --------------- .../notification-area.component.spec.ts | 10 +++++----- .../shared/components/icon/icon.component.html | 3 ++- 4 files changed, 10 insertions(+), 25 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.html index 8dd5a48e7d78..e9814713b45a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.html @@ -3,10 +3,9 @@ let-last="last">
-
- - -
+ +
{{ notification.timestamp | relativeDate }}
{{ notification.title }}
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.scss index 14bf38ff9db4..c7ddebbd465f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.scss @@ -43,21 +43,6 @@ display: block; } -.notification-icon { - flex-shrink: 0; - margin-top: 0; - width: 20px; - height: 20px; - display: flex; - align-items: center; - justify-content: center; - - svg { - width: 16px; - height: 16px; - } -} - .notification-empty { margin: 0; padding: $spacing-05; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.spec.ts index 7fb06f5ce7c9..095524df5af9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.spec.ts @@ -107,7 +107,7 @@ describe('NotificationAreaComponent', () => { firstNotification.query(By.css('.notification-message')).nativeElement.textContent ).toContain('message'); - const iconElement = firstNotification.query(By.css('.notification-icon cd-icon')); + const iconElement = firstNotification.query(By.css('#notification-icon')); expect(iconElement).toBeTruthy(); }); @@ -119,12 +119,12 @@ describe('NotificationAreaComponent', () => { }); it('should render notification icons with correct types', () => { - const iconElements = fixture.debugElement.queryAll(By.css('.notification-icon cd-icon')); + const iconElements = fixture.debugElement.queryAll(By.css('#notification-icon')); expect(iconElements.length).toBe(2); // Check that icons have the correct type attribute expect(iconElements[0].attributes['ng-reflect-type']).toBe('success'); - expect(iconElements[1].attributes['ng-reflect-type']).toBe('danger'); + expect(iconElements[1].attributes['ng-reflect-type']).toBe('error'); }); it('should render notification dividers between items', () => { @@ -170,8 +170,8 @@ describe('NotificationAreaComponent', () => { it('should handle notification icon mapping correctly', () => { expect(component.notificationIconMap[NotificationType.success]).toBe('success'); - expect(component.notificationIconMap[NotificationType.error]).toBe('danger'); - expect(component.notificationIconMap[NotificationType.info]).toBe('info'); + expect(component.notificationIconMap[NotificationType.error]).toBe('error'); + expect(component.notificationIconMap[NotificationType.info]).toBe('infoCircle'); expect(component.notificationIconMap[NotificationType.warning]).toBe('warning'); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.html index f1182dd46d03..2f176abf74c9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.html @@ -1,3 +1,4 @@ + [class]="type+'-icon'" + id="icon"> -- 2.47.3