changed icons
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
(click)="expandAll()"
|
||||
matTooltip="Alle Ebenen ausklappen"
|
||||
aria-label="Alle Ebenen ausklappen">
|
||||
<mat-icon>unfold_more</mat-icon>
|
||||
<mat-icon>{{ UNFOLD_MORE_ICON }}</mat-icon>
|
||||
<span>Alle ausklappen</span>
|
||||
</button>
|
||||
<button
|
||||
@@ -43,7 +43,7 @@
|
||||
(click)="collapseAll()"
|
||||
matTooltip="Alle Ebenen einklappen"
|
||||
aria-label="Alle Ebenen einklappen">
|
||||
<mat-icon>unfold_less</mat-icon>
|
||||
<mat-icon>{{ UNFOLD_LESS_ICON }}</mat-icon>
|
||||
<span>Alle einklappen</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -59,7 +59,7 @@
|
||||
(click)="clearSelection()"
|
||||
matTooltip="Auswahl aufheben"
|
||||
aria-label="Auswahl aufheben">
|
||||
<mat-icon>close</mat-icon>
|
||||
<mat-icon>{{ CLOSE_ICON }}</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
@@ -76,7 +76,7 @@
|
||||
</div>
|
||||
} @else if (searchResults().length === 0) {
|
||||
<div class="empty-search-state">
|
||||
<mat-icon>search_off</mat-icon>
|
||||
<mat-icon>{{ SEARCH_OFF_ICON }}</mat-icon>
|
||||
<p>Keine Themen für „{{ searchQuery() }}“ gefunden.</p>
|
||||
</div>
|
||||
} @else {
|
||||
@@ -139,20 +139,11 @@
|
||||
class="node-header domain-header"
|
||||
(click)="toggleDomain(domain.name)"
|
||||
[attr.aria-expanded]="expandedDomains().has(domain.name)">
|
||||
<mat-icon class="domain-icon">{{
|
||||
getDomainIcon(domain.name)
|
||||
}}</mat-icon>
|
||||
<span class="node-title domain-title">{{ domain.name }}</span>
|
||||
<span class="node-count-badge">{{
|
||||
getDomainTopicCount(domain)
|
||||
}}</span>
|
||||
<mat-icon class="chevron-icon">
|
||||
{{
|
||||
expandedDomains().has(domain.name)
|
||||
? 'expand_more'
|
||||
: 'chevron_right'
|
||||
}}
|
||||
</mat-icon>
|
||||
<mat-icon class="chevron-icon">{{ CHEVRON_RIGHT_ICON }}</mat-icon>
|
||||
</button>
|
||||
|
||||
<!-- Fields Container -->
|
||||
@@ -176,13 +167,9 @@
|
||||
<span class="node-count-badge">{{
|
||||
getFieldTopicCount(field)
|
||||
}}</span>
|
||||
<mat-icon class="chevron-icon">
|
||||
{{
|
||||
expandedFields().has(field.name)
|
||||
? 'expand_more'
|
||||
: 'chevron_right'
|
||||
}}
|
||||
</mat-icon>
|
||||
<mat-icon class="chevron-icon">{{
|
||||
CHEVRON_RIGHT_ICON
|
||||
}}</mat-icon>
|
||||
</button>
|
||||
|
||||
<!-- Subfields Container -->
|
||||
@@ -201,22 +188,15 @@
|
||||
[attr.aria-expanded]="
|
||||
expandedSubfields().has(subfield.name)
|
||||
">
|
||||
<mat-icon class="subfield-icon"
|
||||
>folder_open</mat-icon
|
||||
>
|
||||
<span class="node-title subfield-title">{{
|
||||
subfield.name
|
||||
}}</span>
|
||||
<span class="node-count-badge">{{
|
||||
getSubfieldTopicCount(subfield)
|
||||
}}</span>
|
||||
<mat-icon class="chevron-icon">
|
||||
{{
|
||||
expandedSubfields().has(subfield.name)
|
||||
? 'expand_more'
|
||||
: 'chevron_right'
|
||||
}}
|
||||
</mat-icon>
|
||||
<mat-icon class="chevron-icon">{{
|
||||
CHEVRON_RIGHT_ICON
|
||||
}}</mat-icon>
|
||||
</button>
|
||||
|
||||
<!-- Topics Leaf List (Level 4) -->
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<TopicHierarchyComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [TopicHierarchyComponent],
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TopicHierarchyComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -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 ?? []) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user