From f25c88c106bb686f32f81110fb0a87a40d1b3b85 Mon Sep 17 00:00:00 2001 From: Ryan Gossiaux Date: Fri, 17 Jan 2025 02:39:47 -0500 Subject: [PATCH] Don't show meta tags by default for nested metas We made a change to not show meta tags if there's only 1, which reduces a lot of clutter. Feeder puzzles to a single meta don't have that meta's tag by default already. However, nested meta puzzles would still show the tag for their parent meta. I think those are unnecessary as well (it's conveyed by the table indentaiton) so this commit hides them for the case of a single parent meta. If there are multiple parent metas then the tags are shown again. --- hunts/src/TagCell.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hunts/src/TagCell.tsx b/hunts/src/TagCell.tsx index 0c5d8b3d..1683270c 100644 --- a/hunts/src/TagCell.tsx +++ b/hunts/src/TagCell.tsx @@ -14,7 +14,7 @@ function TagCell({ row }: { row: Row }) { const puzzleId = row.original.id; const shouldShowMetaTags = - row.original.tags.filter((t) => t.is_meta).length > 1; + row.original.tags.filter((t) => t.is_meta && t.name !== row.original.name).length > 1; const tagsToShow = shouldShowMetaTags ? row.original.tags.filter(t => t.name !== row.original.name) : row.original.tags.filter((t) => !t.is_meta && t.name !== row.original.name);