From 5aff658c16bae130e74b2777a52fa1271d0414f6 Mon Sep 17 00:00:00 2001 From: genja Date: Tue, 18 Aug 2026 11:16:30 +0200 Subject: [PATCH 1/4] replaced the keywords search results navbar with generic navbar component --- .../search-results.component.html | 26 +---- .../search-results.component.scss | 11 --- .../search-results.component.ts | 95 ++++++++++++++++++- 3 files changed, 94 insertions(+), 38 deletions(-) diff --git a/webapp/src/app/modules/keywords-search/search-results/search-results.component.html b/webapp/src/app/modules/keywords-search/search-results/search-results.component.html index d242e9cd..8af0f7ac 100644 --- a/webapp/src/app/modules/keywords-search/search-results/search-results.component.html +++ b/webapp/src/app/modules/keywords-search/search-results/search-results.component.html @@ -64,29 +64,9 @@ - + @if (resultTabPanel) { + + } diff --git a/webapp/src/app/modules/keywords-search/search-results/search-results.component.scss b/webapp/src/app/modules/keywords-search/search-results/search-results.component.scss index b12c502a..61735b93 100644 --- a/webapp/src/app/modules/keywords-search/search-results/search-results.component.scss +++ b/webapp/src/app/modules/keywords-search/search-results/search-results.component.scss @@ -101,13 +101,6 @@ $touch-target: 44px; } } -/* ============================================================ - CHILD ROUTE NAV - ============================================================ */ -.result-nav { - margin-top: 0.5rem; -} - /* ============================================================ EMPTY STATE ============================================================ */ @@ -170,8 +163,4 @@ $touch-target: 44px; width: 100%; justify-content: center; } - - .result-nav { - overflow-x: auto; - } } diff --git a/webapp/src/app/modules/keywords-search/search-results/search-results.component.ts b/webapp/src/app/modules/keywords-search/search-results/search-results.component.ts index d11c1216..e4780ff1 100644 --- a/webapp/src/app/modules/keywords-search/search-results/search-results.component.ts +++ b/webapp/src/app/modules/keywords-search/search-results/search-results.component.ts @@ -24,19 +24,22 @@ import { SearchResultsPayload, SearchResultsStateService, } from './search-results-state.service'; +import { + LinkTabNavBarComponent, + LinkTabNavBarItem, +} from '../../../shared/ui/link-tab-nav-bar/link-tab-nav-bar.component'; @Component({ selector: 'app-keywords-search-results', standalone: true, imports: [ - RouterLink, - RouterLinkActive, RouterOutlet, MatButtonModule, MatCardModule, MatIconModule, TopicChipComponent, MatTabsModule, + LinkTabNavBarComponent, MatSlideToggleModule, MatTooltipModule, ], @@ -63,6 +66,90 @@ export class KeywordsSearchResultsComponent { { path: 'trends', label: 'Visualisierung', icon: 'bar_chart' }, ]; + _links = computed(() => { + const links: LinkTabNavBarItem[] = [ + { + label: 'Personen', + icon: 'groups', + path: 'persons', + queryParams: { + keywords: this.state.payload()?.keywords?.join(','), + fuzzy: this.tabFuzzyValue('persons'), + topics: this.tabFuzzyValue('persons') ? this.state.topicIds() : null, + topicId: null, + }, + queryParamsHandling: 'replace', + disabled: false, + }, + { + label: 'Projekte', + icon: 'work', + path: 'projects', + queryParams: { + keywords: this.state.payload()?.keywords?.join(','), + fuzzy: this.tabFuzzyValue('projects'), + topics: this.tabFuzzyValue('projects') ? this.state.topicIds() : null, + topicId: null, + }, + queryParamsHandling: 'replace', + disabled: false, + }, + { + label: 'Patente', + icon: 'workspace_premium', + path: 'patents', + queryParams: { + keywords: this.state.payload()?.keywords?.join(','), + fuzzy: this.tabFuzzyValue('patents'), + topics: this.tabFuzzyValue('patents') ? this.state.topicIds() : null, + topicId: null, + }, + queryParamsHandling: 'replace', + disabled: false, + }, + { + label: 'Publikationen', + icon: 'article', + path: 'works', + queryParams: { + keywords: this.state.payload()?.keywords?.join(','), + fuzzy: this.tabFuzzyValue('works'), + topics: this.tabFuzzyValue('works') ? this.state.topicIds() : null, + topicId: null, + }, + queryParamsHandling: 'replace', + disabled: false, + }, + { + label: 'Nachrichten', + icon: 'newspaper', + path: 'news', + queryParams: { + keywords: this.state.payload()?.keywords?.join(','), + fuzzy: this.tabFuzzyValue('news'), + topics: this.tabFuzzyValue('news') ? this.state.topicIds() : null, + topicId: null, + }, + queryParamsHandling: 'replace', + disabled: false, + }, + { + label: 'Visualisierung', + icon: 'bar_chart', + path: 'trends', + queryParams: { + keywords: this.state.payload()?.keywords?.join(','), + fuzzy: this.tabFuzzyValue('trends'), + topics: this.tabFuzzyValue('trends') ? this.state.topicIds() : null, + topicId: null, + }, + queryParamsHandling: 'replace', + disabled: false, + }, + ]; + return links; + }); + private readonly lastUserFuzzy = signal(false); readonly selectedKeywordCount = computed(() => this.state.keywords().length); @@ -119,8 +206,8 @@ export class KeywordsSearchResultsComponent { return this.route.snapshot.firstChild?.routeConfig?.path === 'persons'; } - tabFuzzyValue(route: { path: string }): boolean { - if (route.path === 'persons') return true; + tabFuzzyValue(path: string): boolean { + if (path === 'persons') return true; return this.lastUserFuzzy(); } goBackToSearch(): void { From 04e3f97b8bc11452efa0015893395b475dde254b Mon Sep 17 00:00:00 2001 From: genja Date: Sun, 23 Aug 2026 10:59:36 +0200 Subject: [PATCH 2/4] prevented mouse event propagation for chips and togglers --- .../shared/ui/app-author-chip/app-author-chip.component.ts | 1 + .../shared/ui/app-topic-chip/app-topic-chip.component.ts | 1 + .../chip-overflow-toggle.component.html | 2 +- .../chip-overflow-toggle/chip-overflow-toggle.component.ts | 6 +++++- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/webapp/src/app/shared/ui/app-author-chip/app-author-chip.component.ts b/webapp/src/app/shared/ui/app-author-chip/app-author-chip.component.ts index 276bfb24..59b983ff 100644 --- a/webapp/src/app/shared/ui/app-author-chip/app-author-chip.component.ts +++ b/webapp/src/app/shared/ui/app-author-chip/app-author-chip.component.ts @@ -87,6 +87,7 @@ export class AppAuthorChipComponent { } _onChipClick(event: MouseEvent | KeyboardEvent) { + event.stopPropagation(); const author = this._author(); if (this.handleChipClick && author) { this.handleChipClick.emit(author); diff --git a/webapp/src/app/shared/ui/app-topic-chip/app-topic-chip.component.ts b/webapp/src/app/shared/ui/app-topic-chip/app-topic-chip.component.ts index 51d5f3ca..34f1a405 100644 --- a/webapp/src/app/shared/ui/app-topic-chip/app-topic-chip.component.ts +++ b/webapp/src/app/shared/ui/app-topic-chip/app-topic-chip.component.ts @@ -90,6 +90,7 @@ export class AppTopicChipComponent { }); _onChipClick(event: MouseEvent | KeyboardEvent) { + event.stopPropagation(); const topic = this.topic(); if (this.isClickable() && this.handleChipClick && topic) { this.handleChipClick.emit(topic); diff --git a/webapp/src/app/shared/ui/chip-overflow-toggle/chip-overflow-toggle.component.html b/webapp/src/app/shared/ui/chip-overflow-toggle/chip-overflow-toggle.component.html index d9c834d5..60d7ccc5 100644 --- a/webapp/src/app/shared/ui/chip-overflow-toggle/chip-overflow-toggle.component.html +++ b/webapp/src/app/shared/ui/chip-overflow-toggle/chip-overflow-toggle.component.html @@ -2,6 +2,6 @@ type="button" class="chip-overflow-toggle" [attr.aria-expanded]="expanded()" - (click)="toggle.emit()"> + (click)="handleToggleClick($event)"> {{ expanded() ? 'weniger' : '+' + hiddenCount() }} diff --git a/webapp/src/app/shared/ui/chip-overflow-toggle/chip-overflow-toggle.component.ts b/webapp/src/app/shared/ui/chip-overflow-toggle/chip-overflow-toggle.component.ts index 6beff800..cfc26514 100644 --- a/webapp/src/app/shared/ui/chip-overflow-toggle/chip-overflow-toggle.component.ts +++ b/webapp/src/app/shared/ui/chip-overflow-toggle/chip-overflow-toggle.component.ts @@ -10,5 +10,9 @@ export class ChipOverflowToggleComponent { expanded = input(false); hiddenCount = input(0); - toggle = output(); + toggle = output(); + handleToggleClick(event: MouseEvent): void { + event.stopPropagation(); + this.toggle.emit(event); + } } From 9a4a4de3791d35fa914892e62632936c043e9913 Mon Sep 17 00:00:00 2001 From: genja Date: Sun, 23 Aug 2026 11:00:21 +0200 Subject: [PATCH 3/4] prevented mouse event propagation in project tables --- .../bund-project-table.component.html | 4 ++-- .../bund-project-table.component.ts | 6 ++++-- .../dfg-project-table.component.html | 9 +++----- .../dfg-project-table.component.scss | 4 +++- .../dfg-project-table.component.ts | 6 ++++-- .../eu-project-table.component.html | 8 +++---- .../eu-project-table.component.ts | 21 +++++++++++++++---- 7 files changed, 37 insertions(+), 21 deletions(-) diff --git a/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.html b/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.html index f55e54fb..37296c22 100644 --- a/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.html +++ b/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.html @@ -55,7 +55,7 @@ [matTooltip]="getInstitutionTooltipText(institutions[0])" matTooltipPosition="above" [attr.aria-label]="getInstitutionTooltipText(institutions[0])" - (click)="filterByInstitution(institutions[0])"> + (click)="filterByInstitution($event, institutions[0])"> {{ APARTMENT_ICON }} {{ institutions[0].name || institutions[0].recepient || '-' @@ -72,7 +72,7 @@ [class.active]="isFundingTypeActive(project.funding_type)" matTooltip="Nach Typ filtern" matTooltipPosition="above" - (click)="toggleFundingTypeFilter(project.funding_type)"> + (click)="toggleFundingTypeFilter($event, project.funding_type)"> {{ project.funding_type }} diff --git a/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.ts b/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.ts index be0ada59..ec199d6f 100644 --- a/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.ts +++ b/webapp/src/app/shared/ui/bund-project-table/bund-project-table.component.ts @@ -203,7 +203,8 @@ export class BundProjectTableComponent implements OnInit { if (normalized == 'übrige indirekte projektförderung') return 'help'; return 'info'; } - toggleFundingTypeFilter(type: string): void { + toggleFundingTypeFilter(event: Event, type: string): void { + event.stopPropagation(); const selectedTypes = this.selectedFundingTypesQueryParams(); if (selectedTypes.includes(type)) { this.router.navigate([], { @@ -271,7 +272,8 @@ export class BundProjectTableComponent implements OnInit { ); } - filterByInstitution(institution: any): void { + filterByInstitution(event: Event, institution: any): void { + event.stopPropagation(); const institutionName = institution.name ?? institution.recepient; if (!institutionName || !this.institutionFilterEnabled()) return; diff --git a/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.html b/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.html index 0fb0cdf6..22445463 100644 --- a/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.html +++ b/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.html @@ -37,10 +37,7 @@ @let isClassificationsExpanded = isProjectClassificationsExpanded(project); @let visibleClassifications = isClassificationsExpanded ? classifications : classifications.slice(0, 3); -
+
@for (classification of visibleClassifications; track $index) { + (click)="filterByAuthor($event, author.person_id!)"> {{ PERSON_ICON }} {{ author.full_name }} @@ -219,7 +216,7 @@ [matTooltip]="getInstitutionTooltipText(institution)" matTooltipPosition="above" [attr.aria-label]="getInstitutionTooltipText(institution)" - (click)="filterByInstitution(institution)"> + (click)="filterByInstitution($event, institution)"> {{ APARTMENT_ICON }} {{ institution.institute_name_de || institution.institute_name_en diff --git a/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.scss b/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.scss index 29bf2f5e..d4642344 100644 --- a/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.scss +++ b/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.scss @@ -112,7 +112,9 @@ flex-wrap: wrap; gap: 6px; } - +.classification-tags { + padding: 0.5rem 0.5rem; +} .topic-chips { max-width: 320px; } diff --git a/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.ts b/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.ts index c032aefd..f2c3bc16 100644 --- a/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.ts +++ b/webapp/src/app/shared/ui/dfg-project-table/dfg-project-table.component.ts @@ -234,7 +234,8 @@ export class DfgProjectTableComponent implements OnInit { } return `Autor: ${author.full_name}`; } - filterByAuthor(authorId: number): void { + filterByAuthor(event: Event, authorId: number): void { + event.stopPropagation(); if (!authorId || !this.authorFilterEnabled()) return; const selectedAuthorIds = this.selectedAuthorIdsQueryParams(); if (selectedAuthorIds.includes(String(authorId))) { @@ -317,7 +318,8 @@ export class DfgProjectTableComponent implements OnInit { ); } - filterByInstitution(institution: any): void { + filterByInstitution(event: Event, institution: any): void { + event.stopPropagation(); const institutionId = this.getProjectInstitutionId(institution); if (!institutionId || !this.institutionFilterEnabled()) return; diff --git a/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.html b/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.html index 81ec8023..46eaebd7 100644 --- a/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.html +++ b/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.html @@ -19,7 +19,7 @@ [class.active]="isTypeActive(project.project_type)" matTooltip="Nach Typ filtern" matTooltipPosition="above" - (click)="toggleTypeFilter(project.project_type)"> + (click)="toggleTypeFilter($event, project.project_type)"> {{ getProjectTypeLabel(project) }} @@ -92,7 +92,7 @@ [matTooltip]="getOrganizationTooltipText(organization)" matTooltipPosition="above" [attr.aria-label]="getOrganizationTooltipText(organization)" - (click)="filterByOrganization(organization)"> + (click)="filterByOrganization($event, organization)"> {{ APARTMENT_ICON }} {{ getOrganizationName(organization) }} @@ -106,7 +106,7 @@ + (toggle)="toggleProjectOrganizationsExpansion($event, project)" /> }
@@ -133,7 +133,7 @@ + (toggle)="toggleProjectTopicsExpansion($event, project)" /> }
diff --git a/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.ts b/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.ts index 26c5660b..9f9e2945 100644 --- a/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.ts +++ b/webapp/src/app/shared/ui/eu-project-table/eu-project-table.component.ts @@ -207,7 +207,8 @@ export class EuProjectTableComponent { isTypeActive(type: string): boolean { return this.selectedTypesQueryParams().includes(type); } - toggleTypeFilter(type: string): void { + toggleTypeFilter(event: Event, type: string): void { + event.stopPropagation(); const selectedTypes = this.selectedTypesQueryParams(); if (selectedTypes.includes(type)) { this.router.navigate([], { @@ -427,7 +428,11 @@ export class EuProjectTableComponent { return `Organisation: ${name}`; } - filterByOrganization(organization: EuCordisOrganizationSummary | any): void { + filterByOrganization( + event: Event, + organization: EuCordisOrganizationSummary | any, + ): void { + event.stopPropagation(); const organizationId = this.getOrganizationId(organization); if (!organizationId || !this.institutionFilterEnabled()) return; @@ -452,7 +457,11 @@ export class EuProjectTableComponent { return this.expandedProjectOrganizationsIds.includes(projectId); } - toggleProjectOrganizationsExpansion(project: EuCordisProjectSummary): void { + toggleProjectOrganizationsExpansion( + event: Event, + project: EuCordisProjectSummary, + ): void { + event.stopPropagation(); const projectId = this.getProjectId(project); if (!projectId) return; @@ -523,7 +532,11 @@ export class EuProjectTableComponent { return this.expandedProjectTopicsIds.includes(projectId); } - toggleProjectTopicsExpansion(project: EuCordisProjectSummary): void { + toggleProjectTopicsExpansion( + event: Event, + project: EuCordisProjectSummary, + ): void { + event.stopPropagation(); const projectId = this.getProjectId(project); if (!projectId) return; From ef009477866e2ee21999557aecc6754576dfb2b0 Mon Sep 17 00:00:00 2001 From: genja Date: Sun, 23 Aug 2026 11:03:46 +0200 Subject: [PATCH 4/4] disabled search button while new keyword is being added --- .../modules/keywords-search/keywords-search.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp/src/app/modules/keywords-search/keywords-search.component.ts b/webapp/src/app/modules/keywords-search/keywords-search.component.ts index 4a279076..c5d1820c 100644 --- a/webapp/src/app/modules/keywords-search/keywords-search.component.ts +++ b/webapp/src/app/modules/keywords-search/keywords-search.component.ts @@ -623,7 +623,11 @@ export class KeywordsSearchComponent { } isSearchDisabled(): boolean { - return this.selectedKeywords().length === 0 || this.isExtracting(); + return ( + this.selectedKeywords().length === 0 || + this.isExtracting() || + this.loadingNewKeyword() + ); } onExtractKeywordsClick(): void {