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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user