From 2310681c66f32fc67a24c885b006869d8d92b4ff Mon Sep 17 00:00:00 2001 From: ACX <8075870+acx10@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:46:07 -0700 Subject: [PATCH] Fix sidebar filter text truncation (#2541) * ... * Fix sidebar filter text truncation --------- Co-authored-by: acx10 --- .../book-filter/book-filter.component.html | 6 +++-- .../book-filter/book-filter.component.scss | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.html b/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.html index 5d57bc649..6e0cd5232 100644 --- a/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.html +++ b/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.html @@ -20,7 +20,9 @@ - {{ filterLabels[filterType] || (filterType | titlecase) }} + + {{ filterLabels[filterType] || (filterType | titlecase) }} + @if (activeFilters[filterType]?.length) { ({{ activeFilters[filterType].length }}) @@ -42,7 +44,7 @@ 'active': activeFilters[filterType]?.includes(getFilterValueId(filter)) }" (click)="handleFilterClick(filterType, getFilterValueId(filter))"> - {{ getFilterValueDisplay(filter) }} + {{ getFilterValueDisplay(filter) }} diff --git a/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.scss b/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.scss index 0ae6cf4a8..eeff3e830 100644 --- a/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.scss +++ b/booklore-ui/src/app/features/book/components/book-browser/book-filter/book-filter.component.scss @@ -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;