feat(website): show desc-row on index page when a filter is active

On category pages desc-rows are always visible. On the index page they
were always hidden. Now they become visible whenever a tag/category
filter is applied, giving filtered results the same richness as category
pages.

Also tightens two related CSS rules: border-bottom suppression only
fires when the adjacent desc-row is actually visible, and the expand-row
description is hidden while the desc-row is already showing to avoid
duplicate text.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-05-03 13:08:27 +08:00
parent 1afccd8bc9
commit fc8d1ba35e
3 changed files with 19 additions and 3 deletions
+6 -2
View File
@@ -132,6 +132,7 @@ function collapseAll() {
function applyFilters() {
const query = searchInput ? searchInput.value.toLowerCase().trim() : "";
const descRowsVisible = !isIndexDocument || activeFilter !== null;
let visibleCount = 0;
collapseAll();
@@ -159,8 +160,11 @@ function applyFilters() {
}
if (row.hidden !== !show) row.hidden = !show;
if (row._descRow && row._descRow.hidden !== !show) {
row._descRow.hidden = !show;
if (row._descRow) {
const descHidden = !show || !descRowsVisible;
if (row._descRow.hidden !== descHidden) {
row._descRow.hidden = descHidden;
}
}
if (show) {