feat(detail): link genre and tag chips to the filtered catalogue

Genre chips now deep-link to /?genres=<id> and user-tag chips to
/?tags=<id>, reusing the homepage catalogue's existing filter params —
turning the detail page's metadata into one-tap discovery. Tag chips keep
their remove affordance (the Chip's href branch preventDefaults the remove
button). e2e asserts both chip hrefs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-07-04 21:04:30 +02:00
parent 01d18e7ba2
commit ad1689b818
6 changed files with 68 additions and 6 deletions

View File

@@ -426,7 +426,7 @@
<div class="chip-row" data-testid="manga-genres">
<span class="chip-row-label">Genres</span>
{#each genres as g (g.id)}
<Chip label={g.name} />
<Chip label={g.name} href={`/?genres=${g.id}`} testid={`genre-chip-${g.id}`} />
{/each}
</div>
{/if}
@@ -436,6 +436,8 @@
{#each tags as t (t.id)}
<Chip
label={t.name}
href={`/?tags=${t.id}`}
testid={`tag-chip-${t.id}`}
variant="soft"
onRemove={session.user && t.added_by === session.user.id
? () => removeTag(t)