feat(channels): search box + clickable tag chips; fix(feed): contextual Your-tags

- Channels manager: prominent channel-name search box and the 'Your tags' chips are now
  clickable to filter the table by tag (replacing the hidden per-column DataTable popovers).
  Both filter client-side over the status-filtered list; a focus-channel intent seeds the
  search, the reset intent clears both.
- Feed 'Your tags' sidebar: count user tags in the facet endpoint (the 'other' category) and
  make the widget contextual like language/topic — counts reflect the current filter and
  zero-count chips hide (e.g. a source=search view with no tagged channels shows 'no matching
  tags' instead of the full static list). EN/HU/DE searchPlaceholder.
This commit is contained in:
npeter83 2026-06-30 22:30:35 +02:00
parent 72ae936958
commit 2b5b6ac965
6 changed files with 93 additions and 29 deletions

View file

@ -182,7 +182,8 @@ export default function Sidebar({
const languages = tags.filter((t) => t.category === "language");
const topics = tags.filter((t) => t.category === "topic");
// The user's own (non-system) tags — those assigned to channels in the Channel manager.
// Facets only cover language/topic, so these show their static channel_count.
// Facets cover them too now (the "other" category), so they're contextual like the rest:
// zero-count chips hide once facets load, counts reflect the current filter.
const userTags = tags.filter((t) => !t.system);
const [customDates, setCustomDates] = useState(false);
const [tagManagerOpen, setTagManagerOpen] = useState(false);
@ -407,18 +408,22 @@ export default function Sidebar({
</>
);
}
case "tags":
case "tags": {
const tagChips = visibleChips(userTags);
return (
<div className="flex flex-wrap items-center gap-1.5">
{userTags.map((tg) => (
{tagChips.map((tg) => (
<TagChip
key={tg.id}
tag={tg}
count={tg.channel_count}
count={chipCount(tg)}
active={filters.tags.includes(tg.id)}
onClick={() => toggleTag(tg.id)}
/>
))}
{facetsReady && tagChips.length === 0 && (
<span className="text-[11px] text-muted">{t("sidebar.noMatchingTags")}</span>
)}
<button
onClick={() => setTagManagerOpen(true)}
title={t("sidebar.manageTags")}
@ -429,6 +434,7 @@ export default function Sidebar({
</button>
</div>
);
}
}
}