feat(news): add tooltip for relevance header in news list
LocationBasedServices/smartguide/pipeline/head There was a failure building this commit
LocationBasedServices/smartguide/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -38,7 +38,19 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="relevance">
|
||||
<th mat-header-cell *matHeaderCellDef>Relevanz</th>
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
<span class="relevance-header">
|
||||
Relevanz
|
||||
<mat-icon
|
||||
class="relevance-info"
|
||||
tabindex="0"
|
||||
aria-label="Was bedeutet die Relevanz?"
|
||||
[matTooltip]="relevanceHelp"
|
||||
matTooltipClass="relevance-tooltip">
|
||||
info
|
||||
</mat-icon>
|
||||
</span>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let article">
|
||||
@if (article.relevant === true) {
|
||||
<span class="relevance-badge is-relevant">
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user