From a7a579ef5773446281eb44f93d4f4be66c44bdbe Mon Sep 17 00:00:00 2001
From: Kazgatari <56477241+Kazgatari@users.noreply.github.com>
Date: Mon, 8 Jun 2026 11:23:14 +0200
Subject: [PATCH] Truncation, mouseover and populate filter button in
person-list
---
.../person-card/person-card.component.html | 27 ++++++++++++++++---
.../person-card/person-card.component.scss | 23 ++++++++++++++--
.../person-card/person-card.component.ts | 21 +++++++++++----
.../person-list/person-list.component.html | 3 ++-
.../person-list/person-list.component.ts | 24 ++++++++++++++---
5 files changed, 83 insertions(+), 15 deletions(-)
diff --git a/webapp/src/app/modules/person-card/person-card.component.html b/webapp/src/app/modules/person-card/person-card.component.html
index 9d07452e..fb162777 100644
--- a/webapp/src/app/modules/person-card/person-card.component.html
+++ b/webapp/src/app/modules/person-card/person-card.component.html
@@ -18,10 +18,11 @@
+ @if (institution(person); as inst) {
+
+
+ business
+ {{ (inst.display_name ?? '') | truncate: 30 }}
+ @if (inst.country_code) {
+
+ {{ inst.country_code.toUpperCase()
+ }}
+ }
+
+
+ }
+
- @for (topic of topics(person); track topic) {
- {{ topic }}
+ @for (topic of topics(person); track topic.id) {
+ {{ topic.display_name }}
}
@@ -56,4 +75,4 @@
-
+
\ No newline at end of file
diff --git a/webapp/src/app/modules/person-card/person-card.component.scss b/webapp/src/app/modules/person-card/person-card.component.scss
index 520008c2..cb82fcb0 100644
--- a/webapp/src/app/modules/person-card/person-card.component.scss
+++ b/webapp/src/app/modules/person-card/person-card.component.scss
@@ -107,11 +107,10 @@
font-weight: 600;
color: var(--sg-text);
}
-
.institution {
display: flex;
align-items: center;
- gap: 15px;
+ gap: 6px;
margin: 0;
font-size: 12px;
color: var(--sg-text-muted);
@@ -120,6 +119,26 @@
white-space: nowrap;
}
+.institution-tag {
+ background: var(--sg-primary-soft);
+ border: 1px solid var(--sg-primary-border, var(--sg-border));
+ color: var(--sg-primary);
+ font-size: 10px;
+ font-weight: 600;
+ padding: 2px 6px;
+ border-radius: 4px;
+ cursor: pointer;
+ display: inline-flex;
+ align-items: center;
+ transition: all 0.2s ease;
+
+ &:hover {
+ background: var(--sg-primary);
+ color: #fff;
+ border-color: var(--sg-primary);
+ }
+}
+
.flag-img {
border: 1px solid;
vertical-align: -10px;
diff --git a/webapp/src/app/modules/person-card/person-card.component.ts b/webapp/src/app/modules/person-card/person-card.component.ts
index 89ebf0e8..26c3cc4c 100644
--- a/webapp/src/app/modules/person-card/person-card.component.ts
+++ b/webapp/src/app/modules/person-card/person-card.component.ts
@@ -2,12 +2,13 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterLink } from '@angular/router';
import { MatIconModule } from '@angular/material/icon';
-import { CustomAuthor, DehydratedInstitution } from '../../api';
+import { CustomAuthor, DehydratedInstitution, WorkTopic } from '../../api';
+import { TruncatePipe } from '../../shared/pipes/truncate.pipe';
@Component({
selector: 'app-person-card',
standalone: true,
- imports: [CommonModule, RouterLink, MatIconModule],
+ imports: [CommonModule, RouterLink, MatIconModule, TruncatePipe],
templateUrl: './person-card.component.html',
styleUrl: './person-card.component.scss',
})
@@ -16,6 +17,7 @@ export class PersonCardComponent {
@Input() isBookmarked = false;
@Output() bookmarkToggle = new EventEmitter