Fix sidebar filter text truncation (#2541)

* ...

* Fix sidebar filter text truncation

---------

Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
ACX
2026-01-29 19:46:07 -07:00
committed by GitHub
co-authored by acx10
parent 20a65d7214
commit 2310681c66
2 changed files with 28 additions and 2 deletions
@@ -20,7 +20,9 @@
<p-accordion-panel [value]="i">
<p-accordion-header>
<span class="filter-type-label">
{{ filterLabels[filterType] || (filterType | titlecase) }}
<span class="filter-label-text">
{{ filterLabels[filterType] || (filterType | titlecase) }}
</span>
@if (activeFilters[filterType]?.length) {
<span class="active-filter-count">
({{ activeFilters[filterType].length }})
@@ -42,7 +44,7 @@
'active': activeFilters[filterType]?.includes(getFilterValueId(filter))
}"
(click)="handleFilterClick(filterType, getFilterValueId(filter))">
{{ getFilterValueDisplay(filter) }}
<span class="filter-value-text">{{ getFilterValueDisplay(filter) }}</span>
<p-badge class="filter-value-badge" [value]="filter.bookCount"></p-badge>
</div>
</cdk-virtual-scroll-viewport>
@@ -48,11 +48,23 @@
display: inline-flex;
align-items: center;
gap: 0.25rem;
max-width: 100%;
overflow: hidden;
}
.filter-label-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex-shrink: 1;
max-width: 175px;
}
.active-filter-count {
font-size: 0.875rem;
color: var(--primary-color);
flex-shrink: 0;
white-space: nowrap;
}
.filter-list {
@@ -74,6 +86,18 @@
}
}
.filter-value-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
min-width: 0;
}
.filter-value-badge {
flex-shrink: 0;
}
.truncation-notice {
font-size: 0.75rem;
color: #6b7280;