Skip to content

Commit 088e746

Browse files
committed
mgr/dashboard: Remove unused css
Signed-off-by: Afreen Misbah <[email protected]>
1 parent 831cfdc commit 088e746

File tree

4 files changed

+10
-25
lines changed

4 files changed

+10
-25
lines changed

src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
let-last="last">
44
<div class="notification-wrapper">
55
<div class="notification-item">
6-
<div class="notification-icon">
7-
<cd-icon [type]="notificationIconMap[notification.type] || notificationIconMap['default']">
8-
</cd-icon>
9-
</div>
6+
<cd-icon id="notification-icon"
7+
[type]="notificationIconMap[notification.type] || notificationIconMap['default']">
8+
</cd-icon>
109
<div class="notification-content">
1110
<div class="notification-timestamp">{{ notification.timestamp | relativeDate }}</div>
1211
<div class="notification-title">{{ notification.title }}</div>

src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.scss

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,6 @@
4343
display: block;
4444
}
4545

46-
.notification-icon {
47-
flex-shrink: 0;
48-
margin-top: 0;
49-
width: 20px;
50-
height: 20px;
51-
display: flex;
52-
align-items: center;
53-
justify-content: center;
54-
55-
svg {
56-
width: 16px;
57-
height: 16px;
58-
}
59-
}
60-
6146
.notification-empty {
6247
margin: 0;
6348
padding: $spacing-05;

src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notification-panel/notification-area/notification-area.component.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe('NotificationAreaComponent', () => {
107107
firstNotification.query(By.css('.notification-message')).nativeElement.textContent
108108
).toContain('message');
109109

110-
const iconElement = firstNotification.query(By.css('.notification-icon cd-icon'));
110+
const iconElement = firstNotification.query(By.css('#notification-icon'));
111111
expect(iconElement).toBeTruthy();
112112
});
113113

@@ -119,12 +119,12 @@ describe('NotificationAreaComponent', () => {
119119
});
120120

121121
it('should render notification icons with correct types', () => {
122-
const iconElements = fixture.debugElement.queryAll(By.css('.notification-icon cd-icon'));
122+
const iconElements = fixture.debugElement.queryAll(By.css('#notification-icon'));
123123
expect(iconElements.length).toBe(2);
124124

125125
// Check that icons have the correct type attribute
126126
expect(iconElements[0].attributes['ng-reflect-type']).toBe('success');
127-
expect(iconElements[1].attributes['ng-reflect-type']).toBe('danger');
127+
expect(iconElements[1].attributes['ng-reflect-type']).toBe('error');
128128
});
129129

130130
it('should render notification dividers between items', () => {
@@ -170,8 +170,8 @@ describe('NotificationAreaComponent', () => {
170170

171171
it('should handle notification icon mapping correctly', () => {
172172
expect(component.notificationIconMap[NotificationType.success]).toBe('success');
173-
expect(component.notificationIconMap[NotificationType.error]).toBe('danger');
174-
expect(component.notificationIconMap[NotificationType.info]).toBe('info');
173+
expect(component.notificationIconMap[NotificationType.error]).toBe('error');
174+
expect(component.notificationIconMap[NotificationType.info]).toBe('infoCircle');
175175
expect(component.notificationIconMap[NotificationType.warning]).toBe('warning');
176176
});
177177

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<svg [cdsIcon]="icon"
22
[size]="size"
3-
[class]="type+'-icon'"></svg>
3+
[class]="type+'-icon'"
4+
id="icon"></svg>

0 commit comments

Comments
 (0)