fix: remove top picks rationale badges

This commit is contained in:
2026-06-28 12:51:46 +02:00
parent 37c5e66217
commit 44d4b7c342
2 changed files with 3 additions and 10 deletions

View File

@@ -109,7 +109,7 @@ func TestRenderWithNonStringFragment(t *testing.T) {
}
}
func TestTopPicksTemplateRendersRecommendationRationale(t *testing.T) {
func TestTopPicksTemplateDoesNotRenderRecommendationRationale(t *testing.T) {
r, err := ProvideRenderer()
if err != nil {
t.Fatal(err)
@@ -134,8 +134,8 @@ func TestTopPicksTemplateRendersRecommendationRationale(t *testing.T) {
body := buf.String()
for _, want := range []string{"Why this was picked", "Sports", "Production I.G"} {
if !strings.Contains(body, want) {
t.Fatalf("top picks template missing %q in output:\n%s", want, body)
if strings.Contains(body, want) {
t.Fatalf("top picks template should not render %q:\n%s", want, body)
}
}
}

View File

@@ -24,13 +24,6 @@
<div class="flex flex-col gap-2">
{{template "anime_card" dict "Anime" . "WithActions" true "HideTitle" true "IsWatchlist" (index $.WatchlistMap .MalID)}}
<h3 class="line-clamp-2 text-sm font-normal text-foreground">{{.DisplayTitle}}</h3>
{{if .RecommendationRationale}}
<div class="flex flex-wrap gap-1.5" aria-label="Why this was picked">
{{range .RecommendationRationale}}
<span class="rounded-full bg-background-button px-2 py-1 text-[0.68rem] leading-none text-foreground-muted">{{.}}</span>
{{end}}
</div>
{{end}}
</div>
{{end}}
</div>