From ad14f60a2c41329ff4b40aa9bb0e3f45ef740c1c Mon Sep 17 00:00:00 2001
From: Kazgatari <56477241+Kazgatari@users.noreply.github.com>
Date: Sun, 16 Aug 2026 22:13:33 +0200
Subject: [PATCH] changed icons
---
.../topic-hierarchy.component.html | 42 +++++--------------
.../topic-hierarchy.component.scss | 24 +++--------
.../topic-hierarchy.component.spec.ts | 22 ----------
.../topic-hierarchy.component.ts | 22 +++++-----
webapp/src/app/shared/ui/icons.ts | 18 ++++++++
5 files changed, 46 insertions(+), 82 deletions(-)
delete mode 100644 webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.spec.ts
diff --git a/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.html b/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.html
index 1fef6456..5afda813 100644
--- a/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.html
+++ b/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.html
@@ -34,7 +34,7 @@
(click)="expandAll()"
matTooltip="Alle Ebenen ausklappen"
aria-label="Alle Ebenen ausklappen">
- unfold_more
+ {{ UNFOLD_MORE_ICON }}
Alle ausklappen
@@ -59,7 +59,7 @@
(click)="clearSelection()"
matTooltip="Auswahl aufheben"
aria-label="Auswahl aufheben">
- close
+ {{ CLOSE_ICON }}
}
@@ -76,7 +76,7 @@
} @else if (searchResults().length === 0) {
-
search_off
+
{{ SEARCH_OFF_ICON }}
Keine Themen für „{{ searchQuery() }}“ gefunden.
} @else {
@@ -139,20 +139,11 @@
class="node-header domain-header"
(click)="toggleDomain(domain.name)"
[attr.aria-expanded]="expandedDomains().has(domain.name)">
- {{
- getDomainIcon(domain.name)
- }}
{{ domain.name }}
{{
getDomainTopicCount(domain)
}}
-
- {{
- expandedDomains().has(domain.name)
- ? 'expand_more'
- : 'chevron_right'
- }}
-
+ {{ CHEVRON_RIGHT_ICON }}
@@ -176,13 +167,9 @@
{{
getFieldTopicCount(field)
}}
-
- {{
- expandedFields().has(field.name)
- ? 'expand_more'
- : 'chevron_right'
- }}
-
+ {{
+ CHEVRON_RIGHT_ICON
+ }}
@@ -201,22 +188,15 @@
[attr.aria-expanded]="
expandedSubfields().has(subfield.name)
">
- folder_open
{{
subfield.name
}}
{{
getSubfieldTopicCount(subfield)
}}
-
- {{
- expandedSubfields().has(subfield.name)
- ? 'expand_more'
- : 'chevron_right'
- }}
-
+ {{
+ CHEVRON_RIGHT_ICON
+ }}
diff --git a/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.scss b/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.scss
index 165bcda5..5643cfef 100644
--- a/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.scss
+++ b/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.scss
@@ -219,7 +219,11 @@
height: 16px;
color: var(--sg-text-muted);
flex-shrink: 0;
- transition: transform 0.15s ease;
+ transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
+ }
+
+ &[aria-expanded='true'] .chevron-icon {
+ transform: rotate(90deg);
}
}
@@ -233,15 +237,6 @@
color: var(--sg-text);
padding: 6px 8px;
- .domain-icon {
- font-size: 16px;
- width: 16px;
- height: 16px;
- margin-right: 8px;
- color: var(--sg-primary);
- flex-shrink: 0;
- }
-
.domain-title {
font-size: 12.5px;
}
@@ -304,15 +299,6 @@
.subfield-header {
padding: 3px 6px;
- .subfield-icon {
- font-size: 14px;
- width: 14px;
- height: 14px;
- margin-right: 6px;
- color: var(--sg-text-muted);
- flex-shrink: 0;
- }
-
.subfield-title {
font-size: 11.5px;
font-weight: 500;
diff --git a/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.spec.ts b/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.spec.ts
deleted file mode 100644
index 04185b1e..00000000
--- a/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.spec.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { TopicHierarchyComponent } from './topic-hierarchy.component';
-
-describe('TopicHierarchyComponent', () => {
- let component: TopicHierarchyComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- imports: [TopicHierarchyComponent],
- }).compileComponents();
-
- fixture = TestBed.createComponent(TopicHierarchyComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.ts b/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.ts
index c6a042e0..38ccb867 100644
--- a/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.ts
+++ b/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.ts
@@ -37,6 +37,13 @@ import { topicHierarchyColor } from '../../resolvers/utils/topic-colors';
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
import { ComponentTooltipDirective } from '../../directives/component-tooltip.directive';
import { AppTopicTooltipComponent } from '../../shared/ui/app-topic-tooltip/app-topic-tooltip.component';
+import {
+ CHEVRON_RIGHT_ICON,
+ CLOSE_ICON,
+ SEARCH_OFF_ICON,
+ UNFOLD_LESS_ICON,
+ UNFOLD_MORE_ICON,
+} from '../../shared/ui/icons';
@Component({
selector: 'app-topic-hierarchy',
@@ -56,6 +63,11 @@ import { AppTopicTooltipComponent } from '../../shared/ui/app-topic-tooltip/app-
})
export class TopicHierarchyComponent implements OnInit {
readonly AppTopicTooltipComponent = AppTopicTooltipComponent;
+ readonly CHEVRON_RIGHT_ICON = CHEVRON_RIGHT_ICON;
+ readonly CLOSE_ICON = CLOSE_ICON;
+ readonly SEARCH_OFF_ICON = SEARCH_OFF_ICON;
+ readonly UNFOLD_LESS_ICON = UNFOLD_LESS_ICON;
+ readonly UNFOLD_MORE_ICON = UNFOLD_MORE_ICON;
private readonly topicsService = inject(TopicsService);
private readonly topicsV2Service = inject(TopicsV2Service);
@@ -266,16 +278,6 @@ export class TopicHierarchyComponent implements OnInit {
return topicHierarchyColor({ field_name: fieldName });
}
- getDomainIcon(domainName: string | null | undefined): string {
- if (!domainName) return 'category';
- const lower = domainName.toLowerCase();
- if (lower.includes('physical')) return 'science';
- if (lower.includes('life')) return 'biotech';
- if (lower.includes('health')) return 'medical_services';
- if (lower.includes('social')) return 'public';
- return 'category';
- }
-
getDomainTopicCount(domain: TopicHierarchyDomain): number {
let count = 0;
for (const f of domain.fields ?? []) {
diff --git a/webapp/src/app/shared/ui/icons.ts b/webapp/src/app/shared/ui/icons.ts
index 72ff584d..2d1c7d81 100644
--- a/webapp/src/app/shared/ui/icons.ts
+++ b/webapp/src/app/shared/ui/icons.ts
@@ -1,3 +1,4 @@
+// Main
export const BOOKMARKS_ICON = 'bookmarks' as const;
export const COMPANY_CONNECTION_ICON = 'business' as const;
export const DASHBOARD_ICON = 'dashboard' as const;
@@ -16,3 +17,20 @@ export const PERSON_ICON = 'person' as const;
export const PROJECT_ICON = 'work' as const;
export const PUBLICATION_ICON = 'menu_book' as const;
export const TOPIC_ICON = 'topic' as const;
+
+// Custom UI Icons
+export const EXPAND_LESS_ICON = 'expand_less' as const;
+export const EXPAND_MORE_ICON = 'expand_more' as const;
+export const UNFOLD_LESS_ICON = 'unfold_less' as const;
+export const UNFOLD_MORE_ICON = 'unfold_more' as const;
+export const CLEAR_ICON = 'clear' as const;
+export const CLOSE_ICON = 'close' as const;
+export const CHECK_ICON = 'check' as const;
+export const CHEVRON_RIGHT_ICON = 'chevron_right' as const;
+export const SEARCH_ICON = 'search' as const;
+export const SEARCH_OFF_ICON = 'search_off' as const;
+
+// Other
+export const ADD_ICON = 'add' as const;
+export const INFO_OUTLINE_ICON = 'info_outline' as const;
+export const OPEN_IN_NEW_ICON = 'open_in_new' as const;