table 3: replace legend with app-chip component for author display
LocationBasedServices/smartguide/pipeline/head This commit looks good

This commit is contained in:
Steven Tischer
2026-07-24 11:17:14 +02:00
parent 6edca93c1c
commit 103b6180d0
2 changed files with 14 additions and 28 deletions
@@ -126,11 +126,11 @@
[attr.aria-selected]="
treemapProfile()?.author_id === author.author_id
"
[style.--tab-color]="authorColor(author.author_id)"
(click)="selectTreemapAuthor(i)">
<span
class="legend-swatch"
[style.background]="authorColor(author.author_id)"></span>
{{ author.display_name }}
<app-chip [color]="authorColor(author.author_id)">
{{ author.display_name }}
</app-chip>
</button>
}
</div>
@@ -60,13 +60,6 @@ app-chip mat-icon {
vertical-align: text-bottom;
}
.legend-swatch {
width: 12px;
height: 12px;
border-radius: 3px;
flex: 0 0 auto;
}
/* ---- cards ---- */
.card {
background: #fff;
@@ -254,30 +247,23 @@ app-chip mat-icon {
.treemap-author-tab {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 5px 12px;
border: 1px solid var(--sg-border, #d7deee);
border-radius: 999px;
background: var(--sg-surface, #fff);
color: var(--sg-text-muted, #64708f);
font-size: 12px;
font-weight: 600;
border: 0;
padding: 0;
border-radius: 7px;
background: transparent;
cursor: pointer;
transition:
background 0.15s ease,
border-color 0.15s ease,
color 0.15s ease;
transform 0.15s ease,
box-shadow 0.15s ease;
&:hover {
border-color: var(--sg-primary, #2563eb);
color: var(--sg-text, #101a3d);
transform: translateY(-1px);
}
&.active {
border-color: var(--sg-primary, #2563eb);
background: color-mix(in srgb, var(--sg-primary, #2563eb) 10%, #fff);
color: var(--sg-text, #101a3d);
box-shadow:
0 0 0 2px #ffffff,
0 0 0 4px var(--tab-color, var(--sg-primary, #2563eb));
}
}