feat(filters): make the topic Any/All match toggle prominent
The AND/OR ("Any"/"All") control for topic chips was a single faint corner link
that was easy to miss. Replace it with a labelled segmented control ("Match:
[Any][All]") so the AND option is discoverable. New trilingual 'match' label.
This commit is contained in:
parent
c44721ed98
commit
2866baa3e8
4 changed files with 29 additions and 9 deletions
|
|
@ -412,16 +412,33 @@ export default function Sidebar({
|
|||
const chips = visibleChips(topics);
|
||||
return (
|
||||
<>
|
||||
<div className="flex justify-end mb-1.5">
|
||||
<button
|
||||
onClick={() =>
|
||||
setFilters({ ...filters, tagMode: filters.tagMode === "or" ? "and" : "or" })
|
||||
}
|
||||
className="text-[10px] uppercase tracking-wide text-muted hover:text-accent"
|
||||
title={t("sidebar.tagModeTooltip")}
|
||||
<div
|
||||
className="flex items-center justify-between mb-1.5"
|
||||
title={t("sidebar.tagModeTooltip")}
|
||||
>
|
||||
<span className="text-[10px] uppercase tracking-wide text-muted">
|
||||
{t("sidebar.match")}
|
||||
</span>
|
||||
<div
|
||||
className="flex items-center rounded-full border border-border bg-card p-0.5 text-[10px]"
|
||||
role="group"
|
||||
aria-label={t("sidebar.match")}
|
||||
>
|
||||
{filters.tagMode === "or" ? t("sidebar.any") : t("sidebar.all")}
|
||||
</button>
|
||||
{(["or", "and"] as const).map((m) => (
|
||||
<button
|
||||
key={m}
|
||||
onClick={() => setFilters({ ...filters, tagMode: m })}
|
||||
aria-pressed={filters.tagMode === m}
|
||||
className={`px-2 py-0.5 rounded-full transition ${
|
||||
filters.tagMode === m
|
||||
? "bg-accent text-accent-fg"
|
||||
: "text-muted hover:text-fg"
|
||||
}`}
|
||||
>
|
||||
{m === "or" ? t("sidebar.any") : t("sidebar.all")}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{chips.map((tg) => (
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
"any": "Beliebig",
|
||||
"all": "Alle",
|
||||
"tagModeTooltip": "Beliebige vs. alle ausgewählten Tags treffen",
|
||||
"match": "Treffer",
|
||||
"custom": "Benutzerdefiniert",
|
||||
"from": "Von",
|
||||
"to": "Bis",
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
"any": "Any",
|
||||
"all": "All",
|
||||
"tagModeTooltip": "Match any vs all selected tags",
|
||||
"match": "Match",
|
||||
"custom": "Custom",
|
||||
"from": "From",
|
||||
"to": "To",
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
"any": "Bármelyik",
|
||||
"all": "Összes",
|
||||
"tagModeTooltip": "Bármelyik vagy az összes kijelölt címke illeszkedjen",
|
||||
"match": "Egyezés",
|
||||
"custom": "Egyéni",
|
||||
"from": "Ettől",
|
||||
"to": "Eddig",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue