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:
+4
-2
@@ -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>
|
||||
|
||||
+24
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user