From 7ad3e080b673715a9ecbff73e7d531fc5932d35c Mon Sep 17 00:00:00 2001 From: Steven Tischer Date: Tue, 23 Jun 2026 13:54:57 +0200 Subject: [PATCH] feat(news): add tooltip for relevance header in news list --- .../ui/news-list/news-list.component.html | 14 +++++++++- .../ui/news-list/news-list.component.scss | 26 +++++++++++++++++++ .../ui/news-list/news-list.component.ts | 7 +++++ 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/webapp/src/app/shared/ui/news-list/news-list.component.html b/webapp/src/app/shared/ui/news-list/news-list.component.html index 68e59aab..7a5eb812 100644 --- a/webapp/src/app/shared/ui/news-list/news-list.component.html +++ b/webapp/src/app/shared/ui/news-list/news-list.component.html @@ -38,7 +38,19 @@ - Relevanz + + + Relevanz + + info + + + @if (article.relevant === true) { diff --git a/webapp/src/app/shared/ui/news-list/news-list.component.scss b/webapp/src/app/shared/ui/news-list/news-list.component.scss index 9f936453..e03c48de 100644 --- a/webapp/src/app/shared/ui/news-list/news-list.component.scss +++ b/webapp/src/app/shared/ui/news-list/news-list.component.scss @@ -153,6 +153,32 @@ table { font-weight: 700; } +.relevance-header { + display: inline-flex; + align-items: center; + gap: 4px; +} + +.relevance-info { + font-size: 15px; + width: 15px; + height: 15px; + color: var(--sg-text-muted); + cursor: help; + + &:hover, + &:focus { + color: var(--sg-text); + } +} + +::ng-deep .relevance-tooltip.mdc-tooltip .mdc-tooltip__surface { + max-width: 260px; + font-size: 12.5px; + line-height: 1.5; + padding: 8px 12px; +} + ::ng-deep .mat-mdc-row { height: 72px; } diff --git a/webapp/src/app/shared/ui/news-list/news-list.component.ts b/webapp/src/app/shared/ui/news-list/news-list.component.ts index 8ffafc05..93896785 100644 --- a/webapp/src/app/shared/ui/news-list/news-list.component.ts +++ b/webapp/src/app/shared/ui/news-list/news-list.component.ts @@ -16,6 +16,7 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatTableModule } from '@angular/material/table'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; +import { MatTooltipModule } from '@angular/material/tooltip'; import { PaginationService } from '../../services/pagination.service'; @@ -40,6 +41,7 @@ export type SortOrder = 'desc' | 'asc'; MatPaginatorModule, MatProgressSpinnerModule, MatTableModule, + MatTooltipModule, NgTemplateOutlet, ReactiveFormsModule, RouterLink, @@ -50,6 +52,11 @@ export type SortOrder = 'desc' | 'asc'; export class NewsListComponent { readonly paginationService = inject(PaginationService); + readonly relevanceHelp = + 'Zeigt, ob ein Artikel inhaltlich über eine konkrete Person berichtet ' + + '(Relevant) oder eine allgemeine Mitteilung ohne Personenbezug ist ' + + '(Nicht relevant).'; + @Input({ required: true }) articles: NewsArticleBase[] = []; @Input({ required: true }) displayedColumns: string[] = []; @Input() total = 0;